blob: 18047ced43494f767b885f6a8ee5e502d5c4db90 [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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Victor Stinner0198f522018-12-20 16:03:01 +0100670LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700671CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000672BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200673CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000674OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700675LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
Miss Islington (bot)69a3f152018-10-24 17:32:04 -0700682LLVM_AR_FOUND
683target_os
684target_vendor
685target_cpu
686target
687LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700688DEF_MAKE_RULE
689DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000690ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000691LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100692MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000693INSTALL_DATA
694INSTALL_SCRIPT
695INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200696ac_ct_READELF
697READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000698ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200699ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701GNULD
702LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000703LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000704RUNSHARED
705INSTSONAME
706LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000707PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000708BLDLIBRARY
709DLLLIBRARY
710LDLIBRARY
711LIBRARY
712BUILDEXEEXT
713EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200714NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200715MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716PLATFORM_TRIPLET
717MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200718ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MAINCC
720CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700721SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200722GREP
723CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731EXPORT_MACOSX_DEPLOYMENT_TARGET
732CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000734MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000735FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800737FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKALTINSTALLLAST
739FRAMEWORKALTINSTALLFIRST
740FRAMEWORKINSTALLLAST
741FRAMEWORKINSTALLFIRST
742PYTHONFRAMEWORKINSTALLDIR
743PYTHONFRAMEWORKPREFIX
744PYTHONFRAMEWORKDIR
745PYTHONFRAMEWORKIDENTIFIER
746PYTHONFRAMEWORK
747LIPO_32BIT_FLAGS
748ARCH_RUN_32BIT
749UNIVERSALSDK
750CONFIG_ARGS
751SOVERSION
752VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200754PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
Benjamin Peterson03958692019-02-25 21:59:37 -0800787runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
814with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600815with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200821with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000822enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700823with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100824with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100825with_address_sanitizer
Gregory P. Smith5f4d05d2018-11-12 13:48:24 -0800826with_memory_sanitizer
827with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_libs
829with_system_expat
830with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100831with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000832enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700833with_tcltk_includes
834with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000836enable_ipv6
837with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000839with_c_locale_coercion
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_libm
843with_libc
844enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800846with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100847with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100848with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000849'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 ac_precious_vars='build_alias
851host_alias
852target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100853MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854CC
855CFLAGS
856LDFLAGS
857LIBS
858CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100859CPP
860PKG_CONFIG
861PKG_CONFIG_PATH
862PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000866ac_init_help=
867ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000868ac_unrecognized_opts=
869ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870# The variables have the same names as the options, with
871# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000872cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875no_recursion=
876prefix=NONE
877program_prefix=NONE
878program_suffix=NONE
879program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884x_includes=NONE
885x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000886
887# Installation directory options.
888# These are left unexpanded so users can "make install exec_prefix=/foo"
889# and all the variables that are supposed to be based on exec_prefix
890# by default will actually change.
891# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893bindir='${exec_prefix}/bin'
894sbindir='${exec_prefix}/sbin'
895libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896datarootdir='${prefix}/share'
897datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898sysconfdir='${prefix}/etc'
899sharedstatedir='${prefix}/com'
900localstatedir='${prefix}/var'
Benjamin Peterson03958692019-02-25 21:59:37 -0800901runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902includedir='${prefix}/include'
903oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
905infodir='${datarootdir}/info'
906htmldir='${docdir}'
907dvidir='${docdir}'
908pdfdir='${docdir}'
909psdir='${docdir}'
910libdir='${exec_prefix}/lib'
911localedir='${datarootdir}/locale'
912mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 # If the previous option needs an argument, assign it.
919 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 ac_prev=
922 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200926 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
927 *=) ac_optarg= ;;
928 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Accept the important Cygnus configure options, so we can diagnose typos.
932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 case $ac_dashdash$ac_option in
934 --)
935 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -bindir | --bindir | --bindi | --bind | --bin | --bi)
938 ac_prev=bindir ;;
939 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 -cache-file | --cache-file | --cache-fil | --cache-fi \
948 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
949 ac_prev=cache_file ;;
950 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
951 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 cache_file=$ac_optarg ;;
953
954 --config-cache | -C)
955 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
963 | --dataroo | --dataro | --datar)
964 ac_prev=datarootdir ;;
965 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
966 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
967 datarootdir=$ac_optarg ;;
968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200973 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 ac_useropt_orig=$ac_useropt
975 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
976 case $ac_user_opts in
977 *"
978"enable_$ac_useropt"
979"*) ;;
980 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
981 ac_unrecognized_sep=', ';;
982 esac
983 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984
985 -docdir | --docdir | --docdi | --doc | --do)
986 ac_prev=docdir ;;
987 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
988 docdir=$ac_optarg ;;
989
990 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
991 ac_prev=dvidir ;;
992 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
993 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200999 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001000 ac_useropt_orig=$ac_useropt
1001 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1002 case $ac_user_opts in
1003 *"
1004"enable_$ac_useropt"
1005"*) ;;
1006 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1007 ac_unrecognized_sep=', ';;
1008 esac
1009 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1012 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1013 | --exec | --exe | --ex)
1014 ac_prev=exec_prefix ;;
1015 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1016 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1017 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001021 # Obsolete; use --with-gas.
1022 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 -help | --help | --hel | --he | -h)
1025 ac_init_help=long ;;
1026 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1027 ac_init_help=recursive ;;
1028 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1029 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1037 ac_prev=htmldir ;;
1038 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1039 | --ht=*)
1040 htmldir=$ac_optarg ;;
1041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -includedir | --includedir | --includedi | --included | --include \
1043 | --includ | --inclu | --incl | --inc)
1044 ac_prev=includedir ;;
1045 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1046 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -infodir | --infodir | --infodi | --infod | --info | --inf)
1050 ac_prev=infodir ;;
1051 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libdir | --libdir | --libdi | --libd)
1055 ac_prev=libdir ;;
1056 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1060 | --libexe | --libex | --libe)
1061 ac_prev=libexecdir ;;
1062 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1063 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 -localedir | --localedir | --localedi | --localed | --locale)
1067 ac_prev=localedir ;;
1068 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1069 localedir=$ac_optarg ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 ac_prev=localstatedir ;;
1074 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1079 ac_prev=mandir ;;
1080 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 # Obsolete; use --without-fp.
1085 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 no_create=yes ;;
1090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1092 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1093 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1096 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1097 | --oldin | --oldi | --old | --ol | --o)
1098 ac_prev=oldincludedir ;;
1099 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1100 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1101 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1105 ac_prev=prefix ;;
1106 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1110 | --program-pre | --program-pr | --program-p)
1111 ac_prev=program_prefix ;;
1112 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1113 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1117 | --program-suf | --program-su | --program-s)
1118 ac_prev=program_suffix ;;
1119 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1120 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -program-transform-name | --program-transform-name \
1124 | --program-transform-nam | --program-transform-na \
1125 | --program-transform-n | --program-transform- \
1126 | --program-transform | --program-transfor \
1127 | --program-transfo | --program-transf \
1128 | --program-trans | --program-tran \
1129 | --progr-tra | --program-tr | --program-t)
1130 ac_prev=program_transform_name ;;
1131 -program-transform-name=* | --program-transform-name=* \
1132 | --program-transform-nam=* | --program-transform-na=* \
1133 | --program-transform-n=* | --program-transform-=* \
1134 | --program-transform=* | --program-transfor=* \
1135 | --program-transfo=* | --program-transf=* \
1136 | --program-trans=* | --program-tran=* \
1137 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1141 ac_prev=pdfdir ;;
1142 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1143 pdfdir=$ac_optarg ;;
1144
1145 -psdir | --psdir | --psdi | --psd | --ps)
1146 ac_prev=psdir ;;
1147 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1148 psdir=$ac_optarg ;;
1149
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1151 | -silent | --silent | --silen | --sile | --sil)
1152 silent=yes ;;
1153
Benjamin Peterson03958692019-02-25 21:59:37 -08001154 -runstatedir | --runstatedir | --runstatedi | --runstated \
1155 | --runstate | --runstat | --runsta | --runst | --runs \
1156 | --run | --ru | --r)
1157 ac_prev=runstatedir ;;
1158 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1159 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1160 | --run=* | --ru=* | --r=*)
1161 runstatedir=$ac_optarg ;;
1162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1164 ac_prev=sbindir ;;
1165 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1166 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
1169 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1170 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1171 | --sharedst | --shareds | --shared | --share | --shar \
1172 | --sha | --sh)
1173 ac_prev=sharedstatedir ;;
1174 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1175 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1176 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1177 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 -site | --site | --sit)
1181 ac_prev=site ;;
1182 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1186 ac_prev=srcdir ;;
1187 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001190 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1191 | --syscon | --sysco | --sysc | --sys | --sy)
1192 ac_prev=sysconfdir ;;
1193 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1194 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001196
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1203 verbose=yes ;;
1204
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 -version | --version | --versio | --versi | --vers | -V)
1206 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt_orig=$ac_useropt
1214 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215 case $ac_user_opts in
1216 *"
1217"with_$ac_useropt"
1218"*) ;;
1219 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1220 ac_unrecognized_sep=', ';;
1221 esac
1222 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
1224 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001228 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 ac_useropt_orig=$ac_useropt
1230 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1231 case $ac_user_opts in
1232 *"
1233"with_$ac_useropt"
1234"*) ;;
1235 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1236 ac_unrecognized_sep=', ';;
1237 esac
1238 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240 --x)
1241 # Obsolete; use --with-x.
1242 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
1244 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1245 | --x-incl | --x-inc | --x-in | --x-i)
1246 ac_prev=x_includes ;;
1247 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1248 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
1251 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1252 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1253 ac_prev=x_libraries ;;
1254 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1255 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1259Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ;;
1261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 *=*)
1263 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1264 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 case $ac_envvar in #(
1266 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001267 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 export $ac_envvar ;;
1271
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001272 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001277 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278 ;;
1279
1280 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281done
1282
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001285 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286fi
1287
Matthias Kloseb9621712010-04-24 17:59:49 +00001288if test -n "$ac_unrecognized_opts"; then
1289 case $enable_option_checking in
1290 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1293 esac
1294fi
1295
1296# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1298 datadir sysconfdir sharedstatedir localstatedir includedir \
1299 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson03958692019-02-25 21:59:37 -08001300 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001303 # Remove trailing slashes.
1304 case $ac_val in
1305 */ )
1306 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1307 eval $ac_var=\$ac_val;;
1308 esac
1309 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 [\\/$]* | ?:[\\/]* ) continue;;
1312 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001314 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001315done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317# There might be people who depend on the old broken behavior: `$host'
1318# used to hold the argument of --host etc.
1319# FIXME: To remove some day.
1320build=$build_alias
1321host=$host_alias
1322target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Martin v. Löwis11437992002-04-12 09:54:03 +00001324# FIXME: To remove some day.
1325if test "x$host_alias" != x; then
1326 if test "x$build_alias" = x; then
1327 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001328 elif test "x$build_alias" != "x$host_alias"; then
1329 cross_compiling=yes
1330 fi
1331fi
1332
1333ac_tool_prefix=
1334test -n "$host_alias" && ac_tool_prefix=$host_alias-
1335
1336test "$silent" = yes && exec 6>/dev/null
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339ac_pwd=`pwd` && test -n "$ac_pwd" &&
1340ac_ls_di=`ls -di .` &&
1341ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001344 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345
1346
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347# Find the source files, if location was not specified.
1348if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001349 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001351 ac_confdir=`$as_dirname -- "$as_myself" ||
1352$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1353 X"$as_myself" : 'X\(//\)[^/]' \| \
1354 X"$as_myself" : 'X\(//\)$' \| \
1355 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1356$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001357 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\/\)[^/].*/{
1362 s//\1/
1363 q
1364 }
1365 /^X\(\/\/\)$/{
1366 s//\1/
1367 q
1368 }
1369 /^X\(\/\).*/{
1370 s//\1/
1371 q
1372 }
1373 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001374 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001376 srcdir=..
1377 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378else
1379 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381if test ! -r "$srcdir/$ac_unique_file"; then
1382 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001383 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1386ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001387 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001388 pwd)`
1389# When building in place, set srcdir=.
1390if test "$ac_abs_confdir" = "$ac_pwd"; then
1391 srcdir=.
1392fi
1393# Remove unnecessary trailing slashes from srcdir.
1394# Double slashes in file names in object file debugging info
1395# mess up M-x gdb in Emacs.
1396case $srcdir in
1397*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1398esac
1399for ac_var in $ac_precious_vars; do
1400 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_env_${ac_var}_value=\$${ac_var}
1402 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1403 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1404done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001405
Martin v. Löwis11437992002-04-12 09:54:03 +00001406#
1407# Report the --help message.
1408#
1409if test "$ac_init_help" = "long"; then
1410 # Omit some internal or obsolete options to make the list less imposing.
1411 # This message is too long to be a string in the A/UX 3.1 sh.
1412 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001413\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414
1415Usage: $0 [OPTION]... [VAR=VALUE]...
1416
1417To assign environment variables (e.g., CC, CFLAGS...), specify them as
1418VAR=VALUE. See below for descriptions of some of the useful variables.
1419
1420Defaults for the options are specified in brackets.
1421
1422Configuration:
1423 -h, --help display this help and exit
1424 --help=short display options specific to this package
1425 --help=recursive display the short help of all the included packages
1426 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001427 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --cache-file=FILE cache test results in FILE [disabled]
1429 -C, --config-cache alias for \`--cache-file=config.cache'
1430 -n, --no-create do not create output files
1431 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1432
Martin v. Löwis11437992002-04-12 09:54:03 +00001433Installation directories:
1434 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438
1439By default, \`make install' will install all the files in
1440\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1441an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1442for instance \`--prefix=\$HOME'.
1443
1444For better control, use the options below.
1445
1446Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --bindir=DIR user executables [EPREFIX/bin]
1448 --sbindir=DIR system admin executables [EPREFIX/sbin]
1449 --libexecdir=DIR program executables [EPREFIX/libexec]
1450 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1451 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1452 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson03958692019-02-25 21:59:37 -08001453 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001454 --libdir=DIR object code libraries [EPREFIX/lib]
1455 --includedir=DIR C header files [PREFIX/include]
1456 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1457 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1458 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1459 --infodir=DIR info documentation [DATAROOTDIR/info]
1460 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1461 --mandir=DIR man documentation [DATAROOTDIR/man]
1462 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1463 --htmldir=DIR html documentation [DOCDIR]
1464 --dvidir=DIR dvi documentation [DOCDIR]
1465 --pdfdir=DIR pdf documentation [DOCDIR]
1466 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468
1469 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001470
1471System types:
1472 --build=BUILD configure for building on BUILD [guessed]
1473 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001474 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475_ACEOF
1476fi
1477
1478if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001479 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001480 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001481 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 cat <<\_ACEOF
1483
1484Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1487 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001488 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001489 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --enable-framework[=INSTALLDIR]
1491 Build (MacOSX|Darwin) framework
1492 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001493 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001494 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1495 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001496 --enable-loadable-sqlite-extensions
1497 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --enable-ipv6 Enable ipv6 (with ipv4) support
1499 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001500 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001502
1503Optional Packages:
1504 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1505 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001506 --with-universal-archs=ARCH
1507 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001508 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1509 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001510 --with-framework-name=FRAMEWORK
1511 specify an alternate name of the framework built
1512 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001514 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-cxx-main=<compiler>
1516 compile main() and link python executable with C++
1517 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-suffix=.exe set executable suffix
1519 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001520 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001521 --with-lto Enable Link Time Optimization in any build. Disabled
1522 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001523 --with-hash-algorithm=[fnv|siphash24]
1524 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001525 --with-address-sanitizer
Gregory P. Smith5f4d05d2018-11-12 13:48:24 -08001526 enable AddressSanitizer (asan)
1527 --with-memory-sanitizer enable MemorySanitizer (msan)
1528 --with-undefined-behavior-sanitizer
1529 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001531 --with-system-expat build pyexpat module using an installed expat
1532 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001533 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001534 --with-system-libmpdec build _decimal module using an installed libmpdec
1535 library
Ned Deilyd819b932013-09-06 01:07:05 -07001536 --with-tcltk-includes='-I...'
1537 override search for Tcl and Tk include files
1538 --with-tcltk-libs='-L...'
1539 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001540 --with-dbmliborder=db1:db2:...
1541 order to check db backends for dbm. Valid value is a
1542 colon separated string with the backend names
1543 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001544 --with(out)-doc-strings disable/enable documentation strings
1545 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001546 --with(out)-c-locale-coercion
1547 disable/enable C locale coercion to a UTF-8 based
1548 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001549 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001550 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001551 --with-libm=STRING math library
1552 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001553 --with(out)-computed-gotos
1554 Use computed gotos in evaluation loop (enabled by
1555 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001556 --with(out)-ensurepip=[=upgrade]
1557 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001558 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001559 --with-ssl-default-suites=[python|openssl|STRING]
1560 Override default cipher suites string, python: use
1561 Python's preferred selection (default), openssl:
1562 leave OpenSSL's defaults untouched, STRING: use a
1563 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001566 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 CC C compiler command
1568 CFLAGS C compiler flags
1569 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1570 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001575 PKG_CONFIG path to pkg-config utility
1576 PKG_CONFIG_PATH
1577 directories to add to pkg-config's search path
1578 PKG_CONFIG_LIBDIR
1579 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001580
1581Use these variables to override the choices made by `configure' or to help
1582it to find libraries and programs with nonstandard names/locations.
1583
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001584Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001587fi
1588
1589if test "$ac_init_help" = "recursive"; then
1590 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001592 test -d "$ac_dir" ||
1593 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1594 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_builddir=.
1596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597case "$ac_dir" in
1598.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1599*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 case $ac_top_builddir_sub in
1604 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1605 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1606 esac ;;
1607esac
1608ac_abs_top_builddir=$ac_pwd
1609ac_abs_builddir=$ac_pwd$ac_dir_suffix
1610# for backward compatibility:
1611ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001612
1613case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 ac_top_srcdir=$ac_top_builddir_sub
1617 ac_abs_top_srcdir=$ac_pwd ;;
1618 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 ac_top_srcdir=$srcdir
1621 ac_abs_top_srcdir=$srcdir ;;
1622 *) # Relative name.
1623 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1624 ac_top_srcdir=$ac_top_build_prefix$srcdir
1625 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001626esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629 cd "$ac_dir" || { ac_status=$?; continue; }
1630 # Check for guested configure.
1631 if test -f "$ac_srcdir/configure.gnu"; then
1632 echo &&
1633 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1634 elif test -f "$ac_srcdir/configure"; then
1635 echo &&
1636 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001638 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001639 fi || ac_status=$?
1640 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001641 done
1642fi
1643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001645if $ac_init_version; then
1646 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001647python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001648generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001649
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001650Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001651This configure script is free software; the Free Software Foundation
1652gives unlimited permission to copy, distribute and modify it.
1653_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001656
1657## ------------------------ ##
1658## Autoconf initialization. ##
1659## ------------------------ ##
1660
1661# ac_fn_c_try_compile LINENO
1662# --------------------------
1663# Try to compile conftest.$ac_ext, and return whether this succeeded.
1664ac_fn_c_try_compile ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 rm -f conftest.$ac_objext
1668 if { { ac_try="$ac_compile"
1669case "(($ac_try" in
1670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671 *) ac_try_echo=$ac_try;;
1672esac
1673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674$as_echo "$ac_try_echo"; } >&5
1675 (eval "$ac_compile") 2>conftest.err
1676 ac_status=$?
1677 if test -s conftest.err; then
1678 grep -v '^ *+' conftest.err >conftest.er1
1679 cat conftest.er1 >&5
1680 mv -f conftest.er1 conftest.err
1681 fi
1682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1683 test $ac_status = 0; } && {
1684 test -z "$ac_c_werror_flag" ||
1685 test ! -s conftest.err
1686 } && test -s conftest.$ac_objext; then :
1687 ac_retval=0
1688else
1689 $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
1691
1692 ac_retval=1
1693fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001694 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 as_fn_set_status $ac_retval
1696
1697} # ac_fn_c_try_compile
1698
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001699# ac_fn_c_try_cpp LINENO
1700# ----------------------
1701# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1702ac_fn_c_try_cpp ()
1703{
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705 if { { ac_try="$ac_cpp conftest.$ac_ext"
1706case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1713 ac_status=$?
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1718 fi
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } > conftest.i && {
1721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1722 test ! -s conftest.err
1723 }; then :
1724 ac_retval=0
1725else
1726 $as_echo "$as_me: failed program was:" >&5
1727sed 's/^/| /' conftest.$ac_ext >&5
1728
1729 ac_retval=1
1730fi
1731 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1732 as_fn_set_status $ac_retval
1733
1734} # ac_fn_c_try_cpp
1735
Matthias Kloseb9621712010-04-24 17:59:49 +00001736# ac_fn_c_try_link LINENO
1737# -----------------------
1738# Try to link conftest.$ac_ext, and return whether this succeeded.
1739ac_fn_c_try_link ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742 rm -f conftest.$ac_objext conftest$ac_exeext
1743 if { { ac_try="$ac_link"
1744case "(($ac_try" in
1745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1746 *) ac_try_echo=$ac_try;;
1747esac
1748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1749$as_echo "$ac_try_echo"; } >&5
1750 (eval "$ac_link") 2>conftest.err
1751 ac_status=$?
1752 if test -s conftest.err; then
1753 grep -v '^ *+' conftest.err >conftest.er1
1754 cat conftest.er1 >&5
1755 mv -f conftest.er1 conftest.err
1756 fi
1757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758 test $ac_status = 0; } && {
1759 test -z "$ac_c_werror_flag" ||
1760 test ! -s conftest.err
1761 } && test -s conftest$ac_exeext && {
1762 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001763 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 }; then :
1765 ac_retval=0
1766else
1767 $as_echo "$as_me: failed program was:" >&5
1768sed 's/^/| /' conftest.$ac_ext >&5
1769
1770 ac_retval=1
1771fi
1772 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1773 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1774 # interfere with the next link command; also delete a directory that is
1775 # left behind by Apple's compiler. We do this before executing the actions.
1776 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 as_fn_set_status $ac_retval
1779
1780} # ac_fn_c_try_link
1781
Matthias Kloseb9621712010-04-24 17:59:49 +00001782# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1783# -------------------------------------------------------
1784# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1785# the include files in INCLUDES and setting the cache variable VAR
1786# accordingly.
1787ac_fn_c_check_header_mongrel ()
1788{
1789 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001790 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1792$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001793if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 $as_echo_n "(cached) " >&6
1795fi
1796eval ac_res=\$$3
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1798$as_echo "$ac_res" >&6; }
1799else
1800 # Is the header compilable?
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1802$as_echo_n "checking $2 usability... " >&6; }
1803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1804/* end confdefs.h. */
1805$4
1806#include <$2>
1807_ACEOF
1808if ac_fn_c_try_compile "$LINENO"; then :
1809 ac_header_compiler=yes
1810else
1811 ac_header_compiler=no
1812fi
1813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1815$as_echo "$ac_header_compiler" >&6; }
1816
1817# Is the header present?
1818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1819$as_echo_n "checking $2 presence... " >&6; }
1820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_cpp "$LINENO"; then :
1825 ac_header_preproc=yes
1826else
1827 ac_header_preproc=no
1828fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001829rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1831$as_echo "$ac_header_preproc" >&6; }
1832
1833# So? What about this header?
1834case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1835 yes:no: )
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1837$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1840 ;;
1841 no:yes:* )
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1843$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1845$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1847$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1849$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1851$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001852( $as_echo "## --------------------------------------- ##
1853## Report this to https://bugs.python.org/ ##
1854## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001855 ) | sed "s/^/$as_me: WARNING: /" >&2
1856 ;;
1857esac
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1859$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001860if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001861 $as_echo_n "(cached) " >&6
1862else
1863 eval "$3=\$ac_header_compiler"
1864fi
1865eval ac_res=\$$3
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1867$as_echo "$ac_res" >&6; }
1868fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001869 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001870
1871} # ac_fn_c_check_header_mongrel
1872
1873# ac_fn_c_try_run LINENO
1874# ----------------------
1875# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1876# that executables *can* be run.
1877ac_fn_c_try_run ()
1878{
1879 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880 if { { ac_try="$ac_link"
1881case "(($ac_try" in
1882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1883 *) ac_try_echo=$ac_try;;
1884esac
1885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1886$as_echo "$ac_try_echo"; } >&5
1887 (eval "$ac_link") 2>&5
1888 ac_status=$?
1889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1890 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1891 { { case "(($ac_try" in
1892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893 *) ac_try_echo=$ac_try;;
1894esac
1895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896$as_echo "$ac_try_echo"; } >&5
1897 (eval "$ac_try") 2>&5
1898 ac_status=$?
1899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1900 test $ac_status = 0; }; }; then :
1901 ac_retval=0
1902else
1903 $as_echo "$as_me: program exited with status $ac_status" >&5
1904 $as_echo "$as_me: failed program was:" >&5
1905sed 's/^/| /' conftest.$ac_ext >&5
1906
1907 ac_retval=$ac_status
1908fi
1909 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 as_fn_set_status $ac_retval
1912
1913} # ac_fn_c_try_run
1914
1915# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1916# -------------------------------------------------------
1917# Tests whether HEADER exists and can be compiled using the include files in
1918# INCLUDES, setting the cache variable VAR accordingly.
1919ac_fn_c_check_header_compile ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1923$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1928/* end confdefs.h. */
1929$4
1930#include <$2>
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 eval "$3=yes"
1934else
1935 eval "$3=no"
1936fi
1937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1938fi
1939eval ac_res=\$$3
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1941$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001943
1944} # ac_fn_c_check_header_compile
1945
Matthias Kloseb9621712010-04-24 17:59:49 +00001946# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1947# -------------------------------------------
1948# Tests whether TYPE exists after having included INCLUDES, setting cache
1949# variable VAR accordingly.
1950ac_fn_c_check_type ()
1951{
1952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1954$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001955if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001956 $as_echo_n "(cached) " >&6
1957else
1958 eval "$3=no"
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof ($2))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1973/* end confdefs.h. */
1974$4
1975int
1976main ()
1977{
1978if (sizeof (($2)))
1979 return 0;
1980 ;
1981 return 0;
1982}
1983_ACEOF
1984if ac_fn_c_try_compile "$LINENO"; then :
1985
1986else
1987 eval "$3=yes"
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1992fi
1993eval ac_res=\$$3
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001997
1998} # ac_fn_c_check_type
1999
Matthias Kloseb9621712010-04-24 17:59:49 +00002000# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2001# --------------------------------------------
2002# Tries to find the compile-time value of EXPR in a program that includes
2003# INCLUDES, setting VAR accordingly. Returns whether the value could be
2004# computed
2005ac_fn_c_compute_int ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 if test "$cross_compiling" = yes; then
2009 # Depending upon the size, compute the lo and hi bounds.
2010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002017test_array [0] = 0;
2018return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002034test_array [0] = 0;
2035return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=$ac_mid; break
2087else
2088 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089 if test $ac_mid -le $ac_hi; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 ac_lo= ac_hi=
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103# Binary search between lo and hi bounds.
2104while test "x$ac_lo" != "x$ac_hi"; do
2105 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002113test_array [0] = 0;
2114return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002115
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_hi=$ac_mid
2122else
2123 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2124fi
2125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126done
2127case $ac_lo in #((
2128?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2129'') ac_retval=1 ;;
2130esac
2131 else
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135static long int longval () { return $2; }
2136static unsigned long int ulongval () { return $2; }
2137#include <stdio.h>
2138#include <stdlib.h>
2139int
2140main ()
2141{
2142
2143 FILE *f = fopen ("conftest.val", "w");
2144 if (! f)
2145 return 1;
2146 if (($2) < 0)
2147 {
2148 long int i = longval ();
2149 if (i != ($2))
2150 return 1;
2151 fprintf (f, "%ld", i);
2152 }
2153 else
2154 {
2155 unsigned long int i = ulongval ();
2156 if (i != ($2))
2157 return 1;
2158 fprintf (f, "%lu", i);
2159 }
2160 /* Do not output a trailing newline, as this causes \r\n confusion
2161 on some platforms. */
2162 return ferror (f) || fclose (f) != 0;
2163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_run "$LINENO"; then :
2169 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2170else
2171 ac_retval=1
2172fi
2173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2174 conftest.$ac_objext conftest.beam conftest.$ac_ext
2175rm -f conftest.val
2176
2177 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002178 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 as_fn_set_status $ac_retval
2180
2181} # ac_fn_c_compute_int
2182
2183# ac_fn_c_check_func LINENO FUNC VAR
2184# ----------------------------------
2185# Tests whether FUNC exists, setting the cache variable VAR accordingly
2186ac_fn_c_check_func ()
2187{
2188 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2190$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002191if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002192 $as_echo_n "(cached) " >&6
2193else
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195/* end confdefs.h. */
2196/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2197 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2198#define $2 innocuous_$2
2199
2200/* System header to define __stub macros and hopefully few prototypes,
2201 which can conflict with char $2 (); below.
2202 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2203 <limits.h> exists even on freestanding compilers. */
2204
2205#ifdef __STDC__
2206# include <limits.h>
2207#else
2208# include <assert.h>
2209#endif
2210
2211#undef $2
2212
2213/* Override any GCC internal prototype to avoid an error.
2214 Use char because int might match the return type of a GCC
2215 builtin and then its argument prototype would still apply. */
2216#ifdef __cplusplus
2217extern "C"
2218#endif
2219char $2 ();
2220/* The GNU C library defines this for functions which it implements
2221 to always fail with ENOSYS. Some functions are actually named
2222 something starting with __ and the normal name is an alias. */
2223#if defined __stub_$2 || defined __stub___$2
2224choke me
2225#endif
2226
2227int
2228main ()
2229{
2230return $2 ();
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_link "$LINENO"; then :
2236 eval "$3=yes"
2237else
2238 eval "$3=no"
2239fi
2240rm -f core conftest.err conftest.$ac_objext \
2241 conftest$ac_exeext conftest.$ac_ext
2242fi
2243eval ac_res=\$$3
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2245$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002246 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002247
2248} # ac_fn_c_check_func
2249
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002250# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2251# ---------------------------------------------
2252# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2253# accordingly.
2254ac_fn_c_check_decl ()
2255{
2256 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2257 as_decl_name=`echo $2|sed 's/ *(.*//'`
2258 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2260$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2261if eval \${$3+:} false; then :
2262 $as_echo_n "(cached) " >&6
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266$4
2267int
2268main ()
2269{
2270#ifndef $as_decl_name
2271#ifdef __cplusplus
2272 (void) $as_decl_use;
2273#else
2274 (void) $as_decl_name;
2275#endif
2276#endif
2277
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_compile "$LINENO"; then :
2283 eval "$3=yes"
2284else
2285 eval "$3=no"
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$3
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
2292 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2293
2294} # ac_fn_c_check_decl
2295
Matthias Kloseb9621712010-04-24 17:59:49 +00002296# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2297# ----------------------------------------------------
2298# Tries to find if the field MEMBER exists in type AGGR, after including
2299# INCLUDES, setting cache variable VAR accordingly.
2300ac_fn_c_check_member ()
2301{
2302 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2304$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002305if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$5
2311int
2312main ()
2313{
2314static $2 ac_aggr;
2315if (ac_aggr.$3)
2316return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$4=yes"
2323else
2324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h. */
2326$5
2327int
2328main ()
2329{
2330static $2 ac_aggr;
2331if (sizeof ac_aggr.$3)
2332return 0;
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_compile "$LINENO"; then :
2338 eval "$4=yes"
2339else
2340 eval "$4=no"
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345fi
2346eval ac_res=\$$4
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2348$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002349 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002350
2351} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002352cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002353This file contains any messages produced by compilers while
2354running configure, to aid debugging if configure makes a mistake.
2355
Ned Deily4829bc62016-09-12 17:29:04 -04002356It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002357generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002358
2359 $ $0 $@
2360
2361_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002362exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002363{
2364cat <<_ASUNAME
2365## --------- ##
2366## Platform. ##
2367## --------- ##
2368
2369hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2370uname -m = `(uname -m) 2>/dev/null || echo unknown`
2371uname -r = `(uname -r) 2>/dev/null || echo unknown`
2372uname -s = `(uname -s) 2>/dev/null || echo unknown`
2373uname -v = `(uname -v) 2>/dev/null || echo unknown`
2374
2375/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2376/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2377
2378/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2379/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2380/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002382/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2383/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2384/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2385
2386_ASUNAME
2387
2388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002393 $as_echo "PATH: $as_dir"
2394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002395IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002396
2397} >&5
2398
2399cat >&5 <<_ACEOF
2400
2401
2402## ----------- ##
2403## Core tests. ##
2404## ----------- ##
2405
2406_ACEOF
2407
2408
2409# Keep a trace of the command line.
2410# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002414ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_configure_args0=
2416ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002417ac_must_keep_next=false
2418for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002419do
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 for ac_arg
2421 do
2422 case $ac_arg in
2423 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2424 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2425 | -silent | --silent | --silen | --sile | --sil)
2426 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002427 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 esac
2430 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002437 case $ac_arg in
2438 *=* | --config-cache | -C | -disable-* | --disable-* \
2439 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2440 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2441 | -with-* | --with-* | -without-* | --without-* | --x)
2442 case "$ac_configure_args0 " in
2443 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2444 esac
2445 ;;
2446 -* ) ac_must_keep_next=true ;;
2447 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002449 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 ;;
2451 esac
2452 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
Matthias Kloseb9621712010-04-24 17:59:49 +00002454{ ac_configure_args0=; unset ac_configure_args0;}
2455{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457# When interrupted or exit'd, cleanup temporary files, and complete
2458# config.log. We remove comments because anyway the quotes in there
2459# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460# WARNING: Use '\'' to represent an apostrophe within the trap.
2461# 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 +00002462trap 'exit_status=$?
2463 # Save into config.log some information that might help in debugging.
2464 {
2465 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002466
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002467 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002468## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002469## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 echo
2471 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472(
2473 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2474 eval ac_val=\$$ac_var
2475 case $ac_val in #(
2476 *${as_nl}*)
2477 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2479$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac
2481 case $ac_var in #(
2482 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002483 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2484 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac ;;
2486 esac
2487 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2490 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 "s/'\''/'\''\\\\'\'''\''/g;
2493 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2494 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002497 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac |
2499 sort
2500)
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002502
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002504## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 echo
2507 for ac_var in $ac_subst_vars
2508 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 eval ac_val=\$$ac_var
2510 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 done | sort
2515 echo
2516
2517 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 echo
2522 for ac_var in $ac_subst_files
2523 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 eval ac_val=\$$ac_var
2525 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 done | sort
2530 echo
2531 fi
2532
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002535## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 echo
2540 fi
2541 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002542 $as_echo "$as_me: caught signal $ac_signal"
2543 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 rm -f core *.core core.conftest.* &&
2546 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002549for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002551done
2552ac_signal=0
2553
2554# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002556
Matthias Kloseb9621712010-04-24 17:59:49 +00002557$as_echo "/* confdefs.h */" > confdefs.h
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559# Predefined preprocessor variables.
2560
2561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_NAME "$PACKAGE_NAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_VERSION "$PACKAGE_VERSION"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_STRING "$PACKAGE_STRING"
2575_ACEOF
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2579_ACEOF
2580
Matthias Kloseb9621712010-04-24 17:59:49 +00002581cat >>confdefs.h <<_ACEOF
2582#define PACKAGE_URL "$PACKAGE_URL"
2583_ACEOF
2584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
2586# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002587# Prefer an explicitly selected file to automatically selected ones.
2588ac_site_file1=NONE
2589ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002591 # We do not want a PATH search for config.site.
2592 case $CONFIG_SITE in #((
2593 -*) ac_site_file1=./$CONFIG_SITE;;
2594 */*) ac_site_file1=$CONFIG_SITE;;
2595 *) ac_site_file1=./$CONFIG_SITE;;
2596 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 ac_site_file1=$prefix/share/config.site
2599 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600else
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 ac_site_file1=$ac_default_prefix/share/config.site
2602 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002604for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605do
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 test "x$ac_site_file" = xNONE && continue
2607 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2609$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611 . "$ac_site_file" \
2612 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2614as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002615See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616 fi
2617done
2618
2619if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 # Some versions of bash will fail to source /dev/null (special files
2621 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2622 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2623 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2624$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2627 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 esac
2629 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630else
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2632$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 >$cache_file
2634fi
2635
2636# Check that the precious variables saved in the cache have kept the same
2637# value.
2638ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2641 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2643 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 case $ac_old_set,$ac_new_set in
2645 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2647$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 +00002648 ac_cache_corrupted=: ;;
2649 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2651$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 ac_cache_corrupted=: ;;
2653 ,);;
2654 *)
2655 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 # differences in whitespace do not lead to failure.
2657 ac_old_val_w=`echo x $ac_old_val`
2658 ac_new_val_w=`echo x $ac_new_val`
2659 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2661$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2662 ac_cache_corrupted=:
2663 else
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2665$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2666 eval $ac_var=\$ac_old_val
2667 fi
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2669$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2671$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 fi;;
2673 esac
2674 # Pass precious variables to config.status.
2675 if test "$ac_new_set" = set; then
2676 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 *) ac_arg=$ac_var=$ac_new_val ;;
2679 esac
2680 case " $ac_configure_args " in
2681 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 esac
2684 fi
2685done
2686if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2690$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002691 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002693## -------------------- ##
2694## Main body of script. ##
2695## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696
Guido van Rossum7f43da71994-08-01 12:15:30 +00002697ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002699ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2700ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2701ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002702
Guido van Rossum627b2d71993-12-24 10:39:16 +00002703
Michael W. Hudson54241132001-12-07 15:38:26 +00002704
Trent Nelson4d4ec652012-10-16 08:51:24 -04002705
Christian Heimesff5be6e2018-01-20 13:19:21 +01002706
2707
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002708if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002709 # If we're building out-of-tree, we need to make sure the following
2710 # resources get picked up before their $srcdir counterparts.
2711 # Objects/ -> typeslots.inc
2712 # Include/ -> Python-ast.h, graminit.h
2713 # Python/ -> importlib.h
2714 # (A side effect of this is that these resources will automatically be
2715 # regenerated when building out-of-tree, regardless of whether or not
2716 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2717 # off.)
2718 BASECPPFLAGS="-IObjects -IInclude -IPython"
2719else
2720 BASECPPFLAGS=""
2721fi
2722
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723
2724
2725
2726
Victor Stinner9ed34a82017-05-02 22:35:58 +02002727if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002728then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729# Extract the first word of "git", so it can be a program name with args.
2730set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2732$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734 $as_echo_n "(cached) " >&6
2735else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736 if test -n "$HAS_GIT"; then
2737 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738else
2739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2740for as_dir in $PATH
2741do
2742 IFS=$as_save_IFS
2743 test -z "$as_dir" && as_dir=.
2744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002746 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2748 break 2
2749 fi
2750done
2751 done
2752IFS=$as_save_IFS
2753
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
2756fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757HAS_GIT=$ac_cv_prog_HAS_GIT
2758if test -n "$HAS_GIT"; then
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2760$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2763$as_echo "no" >&6; }
2764fi
2765
2766
2767else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771then
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04002772 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2773 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2774 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002775else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002776 GITVERSION=""
2777 GITTAG=""
2778 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779fi
2780
2781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002782ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002783
2784
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002785ac_aux_dir=
2786for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2787 if test -f "$ac_dir/install-sh"; then
2788 ac_aux_dir=$ac_dir
2789 ac_install_sh="$ac_aux_dir/install-sh -c"
2790 break
2791 elif test -f "$ac_dir/install.sh"; then
2792 ac_aux_dir=$ac_dir
2793 ac_install_sh="$ac_aux_dir/install.sh -c"
2794 break
2795 elif test -f "$ac_dir/shtool"; then
2796 ac_aux_dir=$ac_dir
2797 ac_install_sh="$ac_aux_dir/shtool install -c"
2798 break
2799 fi
2800done
2801if test -z "$ac_aux_dir"; then
2802 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2803fi
2804
2805# These three variables are undocumented and unsupported,
2806# and are intended to be withdrawn in a future Autoconf release.
2807# They can cause serious problems if a builder's source tree is in a directory
2808# whose full name contains unusual characters.
2809ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2810ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2811ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2812
2813
2814# Make sure we can run config.sub.
2815$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2816 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2817
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2819$as_echo_n "checking build system type... " >&6; }
2820if ${ac_cv_build+:} false; then :
2821 $as_echo_n "(cached) " >&6
2822else
2823 ac_build_alias=$build_alias
2824test "x$ac_build_alias" = x &&
2825 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2826test "x$ac_build_alias" = x &&
2827 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2828ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2829 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2830
2831fi
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2833$as_echo "$ac_cv_build" >&6; }
2834case $ac_cv_build in
2835*-*-*) ;;
2836*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2837esac
2838build=$ac_cv_build
2839ac_save_IFS=$IFS; IFS='-'
2840set x $ac_cv_build
2841shift
2842build_cpu=$1
2843build_vendor=$2
2844shift; shift
2845# Remember, the first character of IFS is used to create $*,
2846# except with old shells:
2847build_os=$*
2848IFS=$ac_save_IFS
2849case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2850
2851
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2853$as_echo_n "checking host system type... " >&6; }
2854if ${ac_cv_host+:} false; then :
2855 $as_echo_n "(cached) " >&6
2856else
2857 if test "x$host_alias" = x; then
2858 ac_cv_host=$ac_cv_build
2859else
2860 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2861 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2862fi
2863
2864fi
2865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2866$as_echo "$ac_cv_host" >&6; }
2867case $ac_cv_host in
2868*-*-*) ;;
2869*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2870esac
2871host=$ac_cv_host
2872ac_save_IFS=$IFS; IFS='-'
2873set x $ac_cv_host
2874shift
2875host_cpu=$1
2876host_vendor=$2
2877shift; shift
2878# Remember, the first character of IFS is used to create $*,
2879# except with old shells:
2880host_os=$*
2881IFS=$ac_save_IFS
2882case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2883
2884
2885
doko@python.orga10e4a92013-01-25 18:45:12 +01002886
2887
Ned Deilyfcbc2462014-08-22 13:32:49 -07002888# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2889rm -f pybuilddir.txt
2890
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002891for ac_prog in python$PACKAGE_VERSION python3 python
2892do
2893 # Extract the first word of "$ac_prog", so it can be a program name with args.
2894set dummy $ac_prog; ac_word=$2
2895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2896$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898 $as_echo_n "(cached) " >&6
2899else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002900 if test -n "$PYTHON_FOR_REGEN"; then
2901 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002902else
2903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2904for as_dir in $PATH
2905do
2906 IFS=$as_save_IFS
2907 test -z "$as_dir" && as_dir=.
2908 for ac_exec_ext in '' $ac_executable_extensions; do
2909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002910 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2912 break 2
2913 fi
2914done
2915 done
2916IFS=$as_save_IFS
2917
2918fi
2919fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002920PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2921if test -n "$PYTHON_FOR_REGEN"; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2923$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002924else
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2926$as_echo "no" >&6; }
2927fi
2928
2929
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002932test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002933
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002934
2935
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002936if test "$cross_compiling" = yes; then
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2938$as_echo_n "checking for python interpreter for cross build... " >&6; }
2939 if test -z "$PYTHON_FOR_BUILD"; then
2940 for interp in python$PACKAGE_VERSION python3 python; do
2941 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002942 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 +02002943 break
2944 fi
2945 interp=
2946 done
2947 if test x$interp = x; then
2948 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2951$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002952 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 +02002953 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002954elif test "$cross_compiling" = maybe; then
2955 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956else
2957 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
Benjamin Petersond23f8222009-04-05 19:13:16 +00002962if test "$prefix" != "/"; then
2963 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2964fi
2965
2966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
2968
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002969# We don't use PACKAGE_ variables, and they cause conflicts
2970# with other autoconf-based packages that include Python.h
2971grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2972rm confdefs.h
2973mv confdefs.h.new confdefs.h
2974
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002975
Ned Deily4829bc62016-09-12 17:29:04 -04002976VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002977
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002978# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002979
2980SOVERSION=1.0
2981
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002982# The later defininition of _XOPEN_SOURCE disables certain features
2983# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002986
2987
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002993
2994
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2996# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2997# them.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003000
3001
Martin v. Löwisd6320502004-08-12 13:45:08 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3004# them.
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003007
3008
3009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003011
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003012# Arguments passed to configure.
3013
3014CONFIG_ARGS="$ac_configure_args"
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3017$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003019if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 case $enableval in
3022 yes)
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003023 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # information
3025 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003026 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003028 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3029 if test ! -d "${enableval}"
3030 then
3031 enableval=/
3032 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
3036 case $enableval in
3037 no)
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040 ;;
3041 *)
3042 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 if test ! -d "${UNIVERSALSDK}"
3044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003045 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 ;;
3048 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051else
3052
3053 UNIVERSALSDK=
3054 enable_universalsdk=
3055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058if test -n "${UNIVERSALSDK}"
3059then
Matthias Kloseb9621712010-04-24 17:59:49 +00003060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3061$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062else
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deily87adb6e2013-10-18 21:09:56 -07003069ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003070
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071# For backward compatibility reasons we prefer to select '32-bit' if available,
3072# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074if test "`uname -s`" = "Darwin"
3075then
3076 if test -n "${UNIVERSALSDK}"
3077 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003078 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079 then
3080 UNIVERSAL_ARCHS="intel"
3081 fi
3082 fi
3083fi
3084
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094fi
3095
Ned Deily87adb6e2013-10-18 21:09:56 -07003096if test -n "${UNIVERSALSDK}"
3097then
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3099$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3100else
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3102$as_echo "no" >&6; }
3103fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003105
3106# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108 withval=$with_framework_name;
3109 PYTHONFRAMEWORK=${withval}
3110 PYTHONFRAMEWORKDIR=${withval}.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3112
3113else
3114
3115 PYTHONFRAMEWORK=Python
3116 PYTHONFRAMEWORKDIR=Python.framework
3117 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3118
3119fi
3120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003124 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003126 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 esac
3128 case $enableval in
3129 no)
3130 PYTHONFRAMEWORK=
3131 PYTHONFRAMEWORKDIR=no-framework
3132 PYTHONFRAMEWORKPREFIX=
3133 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST=
3135 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 FRAMEWORKALTINSTALLFIRST=
3137 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE"; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003145 ;;
3146 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003150 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003151 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3152 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003153 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 if test "x${prefix}" = "xNONE" ; then
3157 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 else
3160 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3161 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162
3163 case "${enableval}" in
3164 /System*)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 if test "${prefix}" = "NONE" ; then
3167 # See below
3168 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3169 fi
3170 ;;
3171
3172 /Library*)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175
3176 */Library/Frameworks)
3177 MDIR="`dirname "${enableval}"`"
3178 MDIR="`dirname "${MDIR}"`"
3179 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3180
3181 if test "${prefix}" = "NONE"; then
3182 # User hasn't specified the
3183 # --prefix option, but wants to install
3184 # the framework in a non-default location,
3185 # ensure that the compatibility links get
3186 # installed relative to that prefix as well
3187 # instead of in /usr/local.
3188 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3189 fi
3190 ;;
3191
3192 *)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195 esac
3196
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003205 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3206
3207 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3208
Jack Jansene578a632001-08-15 01:27:14 +00003209 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Guido van Rossum563e7081996-09-10 18:20:48 +00003211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003214 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORKPREFIX=
3216 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217 FRAMEWORKINSTALLFIRST=
3218 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219 FRAMEWORKALTINSTALLFIRST=
3220 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003245
3246cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003247#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003248_ACEOF
3249
3250
Jack Jansene578a632001-08-15 01:27:14 +00003251##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003252## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003253## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003254##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003255# Set name for machine-dependent library files
3256
Matthias Kloseb9621712010-04-24 17:59:49 +00003257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3258$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259if test -z "$MACHDEP"
3260then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 # avoid using uname for cross builds
3262 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003263 # ac_sys_system and ac_sys_release are used for setting
3264 # a lot of different things including 'define_xopen_source'
3265 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003267 *-*-linux-android*)
3268 ac_sys_system=Linux-android
3269 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 *-*-linux*)
3271 ac_sys_system=Linux
3272 ;;
3273 *-*-cygwin*)
3274 ac_sys_system=Cygwin
3275 ;;
3276 *)
3277 # for now, limit cross builds to known configurations
3278 MACHDEP="unknown"
3279 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3280 esac
3281 ac_sys_release=
3282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003284 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003285 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003286 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003288 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 fi
3291 ac_md_system=`echo $ac_sys_system |
3292 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3293 ac_md_release=`echo $ac_sys_release |
3294 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3295 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003296
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003298 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003299 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003300 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003301 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303fi
Guido van Rossum91922671997-10-09 20:24:13 +00003304
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003305
3306if test "$cross_compiling" = yes; then
3307 case "$host" in
3308 *-*-linux*)
3309 case "$host_cpu" in
3310 arm*)
3311 _host_cpu=arm
3312 ;;
3313 *)
3314 _host_cpu=$host_cpu
3315 esac
3316 ;;
3317 *-*-cygwin*)
3318 _host_cpu=
3319 ;;
3320 *)
3321 # for now, limit cross builds to known configurations
3322 MACHDEP="unknown"
3323 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3324 esac
3325 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3326fi
3327
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003328# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3329# disable features if it is defined, without any means to access these
3330# features as extensions. For these systems, we skip the definition of
3331# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3332# some feature, make sure there is no alternative way to access this
3333# feature. Also, when using wildcards, make sure you have verified the
3334# need for not defining _XOPEN_SOURCE on all systems matching the
3335# wildcard, and that the wildcard does not include future systems
3336# (which may remove their limitations).
3337case $ac_sys_system/$ac_sys_release in
3338 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3339 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003340 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003341 # In addition, Stefan Krah confirms that issue #1244610 exists through
3342 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003343 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344 define_xopen_source=no
3345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003350
3351 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003352 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3354 # also defined. This can be overridden by defining _BSD_SOURCE
3355 # As this has a different meaning on Linux, only define it on OpenBSD
3356
Matthias Kloseb9621712010-04-24 17:59:49 +00003357$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003358
3359 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003360 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3361 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3362 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003363 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 +00003364 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003365 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3366 # request to enable features supported by the standard as a request
3367 # to disable features not supported by the standard. The best way
3368 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3369 # entirely and define __EXTENSIONS__ instead.
3370 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003371 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3373 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003374 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003375 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003376 define_xopen_source=no;;
3377 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003378 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003381 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3382 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3383 # identifies itself as Darwin/7.*
3384 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # disables platform specific features beyond repair.
3386 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3387 # has no effect, don't bother defining them
3388 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003389 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003390 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3393 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3394 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003395 AIX/4)
3396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 AIX/5)
3398 if test `uname -r` -eq 1; then
3399 define_xopen_source=no
3400 fi
3401 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003402 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3403 # defining NI_NUMERICHOST.
3404 QNX/6.3.2)
3405 define_xopen_source=no
3406 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408esac
3409
3410if test $define_xopen_source = yes
3411then
Victor Stinner14d098d2011-09-07 22:29:43 +02003412 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Victor Stinner14d098d2011-09-07 22:29:43 +02003414$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3418 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3419 # several APIs are not declared. Since this is also needed in some
3420 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Matthias Kloseb9621712010-04-24 17:59:49 +00003422$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
3424
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003426$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428fi
3429
Christian Heimes647cd872013-12-07 23:39:33 +01003430# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3431case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432 hp*|HP*)
3433 define_stdc_a1=yes;;
3434 *)
3435 define_stdc_a1=no;;
3436esac
3437
3438if test $define_stdc_a1 = yes
3439then
Christian Heimes647cd872013-12-07 23:39:33 +01003440
3441$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3442
Christian Heimesb02bcae2013-12-08 15:21:08 +01003443fi
Christian Heimes647cd872013-12-07 23:39:33 +01003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3446# it may influence the way we can build extensions, so distutils
3447# needs to check it
3448
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003451EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003452
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003454
3455# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3456# for debug/optimization stuff. BASECFLAGS is for flags that are required
3457# just to get things to compile and link. Users are free to override OPT
3458# when running configure or make. The build should not break if they do.
3459# BASECFLAGS should generally not be messed with, however.
3460
3461# XXX shouldn't some/most/all of this code be merged with the stuff later
3462# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3464$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003467if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003470 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471 without_gcc=yes;;
3472 yes) CC=gcc
3473 without_gcc=no;;
3474 *) CC=$withval
3475 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003479 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003480 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003481 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003482 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003483 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484fi
3485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3487$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003488
Zachary Ware5af85642015-12-21 12:09:17 -06003489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3490$as_echo_n "checking for --with-icc... " >&6; }
3491
3492# Check whether --with-icc was given.
3493if test "${with_icc+set}" = set; then :
3494 withval=$with_icc;
3495 case $withval in
3496 no) CC=${CC:-cc}
3497 with_icc=no;;
3498 yes) CC=icc
3499 CXX=icpc
3500 with_icc=yes;;
3501 *) CC=$withval
3502 with_icc=$withval;;
3503 esac
3504else
3505
3506 with_icc=no
3507fi
3508
3509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3510$as_echo "$with_icc" >&6; }
3511
Guido van Rossum8b131c51995-03-09 14:10:13 +00003512# If the user switches compilers, we can't believe the cache
3513if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3514then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003515 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003516(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003517fi
3518
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003519# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3520# when the compiler supports them, but we don't always want -O2, and
3521# we set -g later.
3522if test -z "$CFLAGS"; then
3523 CFLAGS=
3524fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525
3526if test "$ac_sys_system" = "Darwin"
3527then
3528 # Compiler selection on MacOSX is more complicated than
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003529 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 # information
3531 if test -z "${CC}"
3532 then
3533 found_gcc=
3534 found_clang=
3535 as_save_IFS=$IFS; IFS=:
3536 for as_dir in $PATH
3537 do
3538 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003539 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003541 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003542 fi
3543 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003544 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003545 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003546 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547 fi
3548 fi
3549 done
3550 IFS=$as_save_IFS
3551
3552 if test -n "$found_gcc" -a -n "$found_clang"
3553 then
3554 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3555 then
3556 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3557$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3558 CC="$found_clang"
3559 CXX="$found_clang++"
3560 fi
3561
3562
3563 elif test -z "$found_gcc" -a -n "$found_clang"
3564 then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3566$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3567 CC="$found_clang"
3568 CXX="$found_clang++"
3569
3570 elif test -z "$found_gcc" -a -z "$found_clang"
3571 then
3572 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3573 if test -n "${found_clang}"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3576$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3577 CC="${found_clang}"
3578 CXX="`/usr/bin/xcrun -find clang++`"
3579
3580 # else: use default behaviour
3581 fi
3582 fi
3583 fi
3584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003585ac_ext=c
3586ac_cpp='$CPP $CPPFLAGS'
3587ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3588ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3589ac_compiler_gnu=$ac_cv_c_compiler_gnu
3590if test -n "$ac_tool_prefix"; then
3591 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3592set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3594$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003595if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003597else
3598 if test -n "$CC"; then
3599 ac_cv_prog_CC="$CC" # Let the user override the test.
3600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3602for as_dir in $PATH
3603do
3604 IFS=$as_save_IFS
3605 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 $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 +00003610 break 2
3611 fi
3612done
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003615
Jack Jansendd19cf82001-12-06 22:36:17 +00003616fi
3617fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003618CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003619if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3621$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003622else
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3624$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003625fi
3626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627
Martin v. Löwis11437992002-04-12 09:54:03 +00003628fi
3629if test -z "$ac_cv_prog_CC"; then
3630 ac_ct_CC=$CC
3631 # Extract the first word of "gcc", so it can be a program name with args.
3632set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3634$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003635if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003637else
3638 if test -n "$ac_ct_CC"; then
3639 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3640else
3641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3642for as_dir in $PATH
3643do
3644 IFS=$as_save_IFS
3645 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 $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 +00003650 break 2
3651 fi
3652done
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003655
3656fi
3657fi
3658ac_ct_CC=$ac_cv_prog_ac_ct_CC
3659if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3661$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3664$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 if test "x$ac_ct_CC" = x; then
3668 CC=""
3669 else
3670 case $cross_compiling:$ac_tool_warned in
3671yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674ac_tool_warned=yes ;;
3675esac
3676 CC=$ac_ct_CC
3677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003678else
3679 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003680fi
3681
Jack Jansendd19cf82001-12-06 22:36:17 +00003682if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683 if test -n "$ac_tool_prefix"; then
3684 # 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 +00003685set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3687$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003688if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003690else
3691 if test -n "$CC"; then
3692 ac_cv_prog_CC="$CC" # Let the user override the test.
3693else
Martin v. Löwis11437992002-04-12 09:54:03 +00003694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3695for as_dir in $PATH
3696do
3697 IFS=$as_save_IFS
3698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 $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 +00003703 break 2
3704 fi
3705done
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003708
3709fi
3710fi
3711CC=$ac_cv_prog_CC
3712if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003718fi
3719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
3723if test -z "$CC"; then
3724 # Extract the first word of "cc", so it can be a program name with args.
3725set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003728if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003730else
3731 if test -n "$CC"; then
3732 ac_cv_prog_CC="$CC" # Let the user override the test.
3733else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003734 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3736for as_dir in $PATH
3737do
3738 IFS=$as_save_IFS
3739 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3743 ac_prog_rejected=yes
3744 continue
3745 fi
3746 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $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 +00003748 break 2
3749 fi
3750done
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754if test $ac_prog_rejected = yes; then
3755 # We found a bogon in the path, so make sure we never use it.
3756 set dummy $ac_cv_prog_CC
3757 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 # We chose a different compiler from the bogus one.
3760 # However, it has the same basename, so the bogon will be chosen
3761 # first if we set CC to just the basename; use the full file name.
3762 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003763 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764 fi
3765fi
3766fi
3767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003768CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3771$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772else
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3774$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003775fi
3776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
3779if test -z "$CC"; then
3780 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 do
3783 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3784set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3786$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003787if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003789else
3790 if test -n "$CC"; then
3791 ac_cv_prog_CC="$CC" # Let the user override the test.
3792else
Martin v. Löwis11437992002-04-12 09:54:03 +00003793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3794for as_dir in $PATH
3795do
3796 IFS=$as_save_IFS
3797 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 $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 +00003802 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804done
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003807
3808fi
3809fi
3810CC=$ac_cv_prog_CC
3811if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3813$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814else
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3816$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003817fi
3818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 test -n "$CC" && break
3821 done
3822fi
3823if test -z "$CC"; then
3824 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003826do
3827 # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003831if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
3834 if test -n "$ac_ct_CC"; then
3835 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3836else
3837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3838for as_dir in $PATH
3839do
3840 IFS=$as_save_IFS
3841 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 $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 +00003846 break 2
3847 fi
3848done
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
3853fi
3854ac_ct_CC=$ac_cv_prog_ac_ct_CC
3855if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3857$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858else
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3860$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003861fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 test -n "$ac_ct_CC" && break
3865done
Michael W. Hudson54241132001-12-07 15:38:26 +00003866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867 if test "x$ac_ct_CC" = x; then
3868 CC=""
3869 else
3870 case $cross_compiling:$ac_tool_warned in
3871yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874ac_tool_warned=yes ;;
3875esac
3876 CC=$ac_ct_CC
3877 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003878fi
3879
3880fi
3881
3882
Matthias Kloseb9621712010-04-24 17:59:49 +00003883test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003885as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003886See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003887
3888# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003889$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3890set X $ac_compile
3891ac_compiler=$2
3892for ac_option in --version -v -V -qversion; do
3893 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894case "(($ac_try" in
3895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3896 *) ac_try_echo=$ac_try;;
3897esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3899$as_echo "$ac_try_echo"; } >&5
3900 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003902 if test -s conftest.err; then
3903 sed '10a\
3904... rest of stderr output deleted ...
3905 10q' conftest.err >conftest.er1
3906 cat conftest.er1 >&5
3907 fi
3908 rm -f conftest.er1 conftest.err
3909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3910 test $ac_status = 0; }
3911done
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
Matthias Kloseb9621712010-04-24 17:59:49 +00003913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003914/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003915
Martin v. Löwis11437992002-04-12 09:54:03 +00003916int
3917main ()
3918{
3919
3920 ;
3921 return 0;
3922}
3923_ACEOF
3924ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003925ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003926# Try to create an executable without -o first, disregard a.out.
3927# It will help us diagnose broken compilers, and finding out an intuition
3928# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3930$as_echo_n "checking whether the C compiler works... " >&6; }
3931ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3932
3933# The possible output files:
3934ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936ac_rmfiles=
3937for ac_file in $ac_files
3938do
3939 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3942 esac
3943done
3944rm -f $ac_rmfiles
3945
Matthias Kloseb9621712010-04-24 17:59:49 +00003946if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3952$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3956 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3958# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3959# in a Makefile. We should not override ac_cv_exeext if it was cached,
3960# so that the user can short-circuit this test for compilers unknown to
3961# Autoconf.
3962for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003963do
3964 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003965 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003967 ;;
3968 [ab].out )
3969 # We found the default executable, but exeext='' is most
3970 # certainly right.
3971 break;;
3972 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 then :; else
3975 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3976 fi
3977 # We set ac_cv_exeext here because the later test for it is not
3978 # safe: cross compilers may not add the suffix if given an `-o'
3979 # argument, so we may need to know it at that point already.
3980 # Even if this section looks crufty: it has the advantage of
3981 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 break;;
3983 * )
3984 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 esac
3986done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987test "$ac_cv_exeext" = no && ac_cv_exeext=
3988
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003989else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 ac_file=''
3991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003992if test -z "$ac_file"; then :
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994$as_echo "no" >&6; }
3995$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003996sed 's/^/| /' conftest.$ac_ext >&5
3997
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004000as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004001See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004002else
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4004$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4007$as_echo_n "checking for C compiler default output file name... " >&6; }
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4009$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011
Matthias Kloseb9621712010-04-24 17:59:49 +00004012rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4015$as_echo_n "checking for suffix of executables... " >&6; }
4016if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4026 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4028# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4029# work properly (i.e., refer to `conftest.exe'), while it won't with
4030# `rm'.
4031for ac_file in conftest.exe conftest conftest.*; do
4032 test -f "$ac_file" || continue
4033 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4036 break;;
4037 * ) break;;
4038 esac
4039done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040else
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004043as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004044See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004046rm -f conftest conftest$ac_cv_exeext
4047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4048$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049
4050rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004051EXEEXT=$ac_cv_exeext
4052ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4054/* end confdefs.h. */
4055#include <stdio.h>
4056int
4057main ()
4058{
4059FILE *f = fopen ("conftest.out", "w");
4060 return ferror (f) || fclose (f) != 0;
4061
4062 ;
4063 return 0;
4064}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004066ac_clean_files="$ac_clean_files conftest.out"
4067# Check that the compiler produces executables we can run. If not, either
4068# the compiler is broken, or we cross compile.
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4070$as_echo_n "checking whether we are cross compiling... " >&6; }
4071if test "$cross_compiling" != yes; then
4072 { { ac_try="$ac_link"
4073case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
4079 (eval "$ac_link") 2>&5
4080 ac_status=$?
4081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }
4083 if { ac_try='./conftest$ac_cv_exeext'
4084 { { case "(($ac_try" in
4085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086 *) ac_try_echo=$ac_try;;
4087esac
4088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4089$as_echo "$ac_try_echo"; } >&5
4090 (eval "$ac_try") 2>&5
4091 ac_status=$?
4092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4093 test $ac_status = 0; }; }; then
4094 cross_compiling=no
4095 else
4096 if test "$cross_compiling" = maybe; then
4097 cross_compiling=yes
4098 else
4099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004101as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004102If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004103See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 fi
4105 fi
4106fi
4107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4108$as_echo "$cross_compiling" >&6; }
4109
4110rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4111ac_clean_files=$ac_clean_files_save
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4113$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004114if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo_n "(cached) " >&6
4116else
4117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118/* end confdefs.h. */
4119
4120int
4121main ()
4122{
4123
4124 ;
4125 return 0;
4126}
4127_ACEOF
4128rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004129if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130case "(($ac_try" in
4131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4132 *) ac_try_echo=$ac_try;;
4133esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4135$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4139 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140 for ac_file in conftest.o conftest.obj conftest.*; do
4141 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4145 break;;
4146 esac
4147done
4148else
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004150sed 's/^/| /' conftest.$ac_ext >&5
4151
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004154as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004155See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004156fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004157rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4160$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161OBJEXT=$ac_cv_objext
4162ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4164$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004165if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004167else
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004170
Martin v. Löwis11437992002-04-12 09:54:03 +00004171int
4172main ()
4173{
4174#ifndef __GNUC__
4175 choke me
4176#endif
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_compiler_gnu=yes
4184else
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004188ac_cv_c_compiler_gnu=$ac_compiler_gnu
4189
4190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4192$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4193if test $ac_compiler_gnu = yes; then
4194 GCC=yes
4195else
4196 GCC=
4197fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004198ac_test_CFLAGS=${CFLAGS+set}
4199ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4201$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004202if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004204else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205 ac_save_c_werror_flag=$ac_c_werror_flag
4206 ac_c_werror_flag=yes
4207 ac_cv_prog_cc_g=no
4208 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004211
Martin v. Löwis11437992002-04-12 09:54:03 +00004212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004221 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222else
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 CFLAGS=""
4224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236
Matthias Kloseb9621712010-04-24 17:59:49 +00004237else
4238 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241/* end confdefs.h. */
4242
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4259 ac_c_werror_flag=$ac_save_c_werror_flag
4260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4262$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004265elif test $ac_cv_prog_cc_g = yes; then
4266 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004267 CFLAGS="-g -O2"
4268 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270 fi
4271else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004272 if test "$GCC" = yes; then
4273 CFLAGS="-O2"
4274 else
4275 CFLAGS=
4276 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4279$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004280if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004282else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004284ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004286/* end confdefs.h. */
4287#include <stdarg.h>
4288#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004289struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4291struct buf { int x; };
4292FILE * (*rcsopen) (struct buf *, struct stat *, int);
4293static char *e (p, i)
4294 char **p;
4295 int i;
4296{
4297 return p[i];
4298}
4299static char *f (char * (*g) (char **, int), char **p, ...)
4300{
4301 char *s;
4302 va_list v;
4303 va_start (v,p);
4304 s = g (p, va_arg (v,int));
4305 va_end (v);
4306 return s;
4307}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004308
4309/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4310 function prototypes and stuff, but not '\xHH' hex character constants.
4311 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4314 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004316int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4319 inside strings and character constants. */
4320#define FOO(x) 'x'
4321int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4322
Skip Montanaro6dead952003-09-25 14:50:04 +00004323int test (int i, double x);
4324struct s1 {int (*f) (int a);};
4325struct s2 {int (*f) (double a);};
4326int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4327int argc;
4328char **argv;
4329int
4330main ()
4331{
4332return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4333 ;
4334 return 0;
4335}
4336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4338 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004339do
4340 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344rm -f core conftest.err conftest.$ac_objext
4345 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004346done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004348CC=$ac_save_CC
4349
4350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351# AC_CACHE_VAL
4352case "x$ac_cv_prog_cc_c89" in
4353 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4355$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4358$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004359 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4362$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004363esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004364if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004365
Matthias Kloseb9621712010-04-24 17:59:49 +00004366fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004367
Martin v. Löwis11437992002-04-12 09:54:03 +00004368ac_ext=c
4369ac_cpp='$CPP $CPPFLAGS'
4370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4372ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004374ac_ext=c
4375ac_cpp='$CPP $CPPFLAGS'
4376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4378ac_compiler_gnu=$ac_cv_c_compiler_gnu
4379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4380$as_echo_n "checking how to run the C preprocessor... " >&6; }
4381# On Suns, sometimes $CPP names a directory.
4382if test -n "$CPP" && test -d "$CPP"; then
4383 CPP=
4384fi
4385if test -z "$CPP"; then
4386 if ${ac_cv_prog_CPP+:} false; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 # Double quotes because CPP needs to be expanded
4390 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4391 do
4392 ac_preproc_ok=false
4393for ac_c_preproc_warn_flag in '' yes
4394do
4395 # Use a header file that comes with gcc, so configuring glibc
4396 # with a fresh cross-compiler works.
4397 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4398 # <limits.h> exists even on freestanding compilers.
4399 # On the NeXT, cc -E runs the code through the compiler's parser,
4400 # not just through cpp. "Syntax error" is here to catch this case.
4401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4402/* end confdefs.h. */
4403#ifdef __STDC__
4404# include <limits.h>
4405#else
4406# include <assert.h>
4407#endif
4408 Syntax error
4409_ACEOF
4410if ac_fn_c_try_cpp "$LINENO"; then :
4411
4412else
4413 # Broken: fails on valid input.
4414continue
4415fi
4416rm -f conftest.err conftest.i conftest.$ac_ext
4417
4418 # OK, works on sane cases. Now check whether nonexistent headers
4419 # can be detected and how.
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421/* end confdefs.h. */
4422#include <ac_nonexistent.h>
4423_ACEOF
4424if ac_fn_c_try_cpp "$LINENO"; then :
4425 # Broken: success on invalid input.
4426continue
4427else
4428 # Passes both tests.
4429ac_preproc_ok=:
4430break
4431fi
4432rm -f conftest.err conftest.i conftest.$ac_ext
4433
4434done
4435# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4436rm -f conftest.i conftest.err conftest.$ac_ext
4437if $ac_preproc_ok; then :
4438 break
4439fi
4440
4441 done
4442 ac_cv_prog_CPP=$CPP
4443
4444fi
4445 CPP=$ac_cv_prog_CPP
4446else
4447 ac_cv_prog_CPP=$CPP
4448fi
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4450$as_echo "$CPP" >&6; }
4451ac_preproc_ok=false
4452for ac_c_preproc_warn_flag in '' yes
4453do
4454 # Use a header file that comes with gcc, so configuring glibc
4455 # with a fresh cross-compiler works.
4456 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4457 # <limits.h> exists even on freestanding compilers.
4458 # On the NeXT, cc -E runs the code through the compiler's parser,
4459 # not just through cpp. "Syntax error" is here to catch this case.
4460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4461/* end confdefs.h. */
4462#ifdef __STDC__
4463# include <limits.h>
4464#else
4465# include <assert.h>
4466#endif
4467 Syntax error
4468_ACEOF
4469if ac_fn_c_try_cpp "$LINENO"; then :
4470
4471else
4472 # Broken: fails on valid input.
4473continue
4474fi
4475rm -f conftest.err conftest.i conftest.$ac_ext
4476
4477 # OK, works on sane cases. Now check whether nonexistent headers
4478 # can be detected and how.
4479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4480/* end confdefs.h. */
4481#include <ac_nonexistent.h>
4482_ACEOF
4483if ac_fn_c_try_cpp "$LINENO"; then :
4484 # Broken: success on invalid input.
4485continue
4486else
4487 # Passes both tests.
4488ac_preproc_ok=:
4489break
4490fi
4491rm -f conftest.err conftest.i conftest.$ac_ext
4492
4493done
4494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4495rm -f conftest.i conftest.err conftest.$ac_ext
4496if $ac_preproc_ok; then :
4497
4498else
4499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4501as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4502See \`config.log' for more details" "$LINENO" 5; }
4503fi
4504
4505ac_ext=c
4506ac_cpp='$CPP $CPPFLAGS'
4507ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4508ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4509ac_compiler_gnu=$ac_cv_c_compiler_gnu
4510
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4512$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4513if ${ac_cv_path_GREP+:} false; then :
4514 $as_echo_n "(cached) " >&6
4515else
4516 if test -z "$GREP"; then
4517 ac_path_GREP_found=false
4518 # Loop through the user's path and test for each of PROGNAME-LIST
4519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4521do
4522 IFS=$as_save_IFS
4523 test -z "$as_dir" && as_dir=.
4524 for ac_prog in grep ggrep; do
4525 for ac_exec_ext in '' $ac_executable_extensions; do
4526 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4527 as_fn_executable_p "$ac_path_GREP" || continue
4528# Check for GNU ac_path_GREP and select it if it is found.
4529 # Check for GNU $ac_path_GREP
4530case `"$ac_path_GREP" --version 2>&1` in
4531*GNU*)
4532 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4533*)
4534 ac_count=0
4535 $as_echo_n 0123456789 >"conftest.in"
4536 while :
4537 do
4538 cat "conftest.in" "conftest.in" >"conftest.tmp"
4539 mv "conftest.tmp" "conftest.in"
4540 cp "conftest.in" "conftest.nl"
4541 $as_echo 'GREP' >> "conftest.nl"
4542 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4543 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4544 as_fn_arith $ac_count + 1 && ac_count=$as_val
4545 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4546 # Best one so far, save it but keep looking for a better one
4547 ac_cv_path_GREP="$ac_path_GREP"
4548 ac_path_GREP_max=$ac_count
4549 fi
4550 # 10*(2^10) chars as input seems more than enough
4551 test $ac_count -gt 10 && break
4552 done
4553 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4554esac
4555
4556 $ac_path_GREP_found && break 3
4557 done
4558 done
4559 done
4560IFS=$as_save_IFS
4561 if test -z "$ac_cv_path_GREP"; then
4562 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4563 fi
4564else
4565 ac_cv_path_GREP=$GREP
4566fi
4567
4568fi
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4570$as_echo "$ac_cv_path_GREP" >&6; }
4571 GREP="$ac_cv_path_GREP"
4572
4573
Łukasz Langaa785c872016-09-09 17:37:37 -07004574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4575$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4576if ${ac_cv_path_SED+:} false; then :
4577 $as_echo_n "(cached) " >&6
4578else
4579 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4580 for ac_i in 1 2 3 4 5 6 7; do
4581 ac_script="$ac_script$as_nl$ac_script"
4582 done
4583 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4584 { ac_script=; unset ac_script;}
4585 if test -z "$SED"; then
4586 ac_path_SED_found=false
4587 # Loop through the user's path and test for each of PROGNAME-LIST
4588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4589for as_dir in $PATH
4590do
4591 IFS=$as_save_IFS
4592 test -z "$as_dir" && as_dir=.
4593 for ac_prog in sed gsed; do
4594 for ac_exec_ext in '' $ac_executable_extensions; do
4595 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4596 as_fn_executable_p "$ac_path_SED" || continue
4597# Check for GNU ac_path_SED and select it if it is found.
4598 # Check for GNU $ac_path_SED
4599case `"$ac_path_SED" --version 2>&1` in
4600*GNU*)
4601 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4602*)
4603 ac_count=0
4604 $as_echo_n 0123456789 >"conftest.in"
4605 while :
4606 do
4607 cat "conftest.in" "conftest.in" >"conftest.tmp"
4608 mv "conftest.tmp" "conftest.in"
4609 cp "conftest.in" "conftest.nl"
4610 $as_echo '' >> "conftest.nl"
4611 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4612 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4613 as_fn_arith $ac_count + 1 && ac_count=$as_val
4614 if test $ac_count -gt ${ac_path_SED_max-0}; then
4615 # Best one so far, save it but keep looking for a better one
4616 ac_cv_path_SED="$ac_path_SED"
4617 ac_path_SED_max=$ac_count
4618 fi
4619 # 10*(2^10) chars as input seems more than enough
4620 test $ac_count -gt 10 && break
4621 done
4622 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4623esac
4624
4625 $ac_path_SED_found && break 3
4626 done
4627 done
4628 done
4629IFS=$as_save_IFS
4630 if test -z "$ac_cv_path_SED"; then
4631 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4632 fi
4633else
4634 ac_cv_path_SED=$SED
4635fi
4636
4637fi
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4639$as_echo "$ac_cv_path_SED" >&6; }
4640 SED="$ac_cv_path_SED"
4641 rm -f conftest.sed
4642
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004643
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004644
4645
Matthias Kloseb9621712010-04-24 17:59:49 +00004646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4647$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004649# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004650if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004651 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004652
4653 case $withval in
4654 no) with_cxx_main=no
4655 MAINCC='$(CC)';;
4656 yes) with_cxx_main=yes
4657 MAINCC='$(CXX)';;
4658 *) with_cxx_main=yes
4659 MAINCC=$withval
4660 if test -z "$CXX"
4661 then
4662 CXX=$withval
4663 fi;;
4664 esac
4665else
4666
4667 with_cxx_main=no
4668 MAINCC='$(CC)'
4669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004670fi
4671
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4673$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004674
4675preset_cxx="$CXX"
4676if test -z "$CXX"
4677then
4678 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 gcc) if test -n "$ac_tool_prefix"; then
4680 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4681set dummy ${ac_tool_prefix}g++; ac_word=$2
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683$as_echo_n "checking for $ac_word... " >&6; }
4684if ${ac_cv_path_CXX+:} false; then :
4685 $as_echo_n "(cached) " >&6
4686else
4687 case $CXX in
4688 [\\/]* | ?:[\\/]*)
4689 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4690 ;;
4691 *)
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693for as_dir in notfound
4694do
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4702 fi
4703done
4704 done
4705IFS=$as_save_IFS
4706
4707 ;;
4708esac
4709fi
4710CXX=$ac_cv_path_CXX
4711if test -n "$CXX"; then
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4713$as_echo "$CXX" >&6; }
4714else
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716$as_echo "no" >&6; }
4717fi
4718
4719
4720fi
4721if test -z "$ac_cv_path_CXX"; then
4722 ac_pt_CXX=$CXX
4723 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4726$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727if ${ac_cv_path_ac_pt_CXX+:} false; then :
4728 $as_echo_n "(cached) " >&6
4729else
4730 case $ac_pt_CXX in
4731 [\\/]* | ?:[\\/]*)
4732 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4733 ;;
4734 *)
4735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4736for as_dir in notfound
4737do
4738 IFS=$as_save_IFS
4739 test -z "$as_dir" && as_dir=.
4740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4744 break 2
4745 fi
4746done
4747 done
4748IFS=$as_save_IFS
4749
4750 ;;
4751esac
4752fi
4753ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4754if test -n "$ac_pt_CXX"; then
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4756$as_echo "$ac_pt_CXX" >&6; }
4757else
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4759$as_echo "no" >&6; }
4760fi
4761
4762 if test "x$ac_pt_CXX" = x; then
4763 CXX="g++"
4764 else
4765 case $cross_compiling:$ac_tool_warned in
4766yes:)
4767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4769ac_tool_warned=yes ;;
4770esac
4771 CXX=$ac_pt_CXX
4772 fi
4773else
4774 CXX="$ac_cv_path_CXX"
4775fi
4776 ;;
4777 cc) if test -n "$ac_tool_prefix"; then
4778 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4779set dummy ${ac_tool_prefix}c++; ac_word=$2
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4781$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004782if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784else
4785 case $CXX in
4786 [\\/]* | ?:[\\/]*)
4787 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4788 ;;
4789 *)
4790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791for as_dir in notfound
4792do
4793 IFS=$as_save_IFS
4794 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799 break 2
4800 fi
4801done
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004803IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805 ;;
4806esac
4807fi
4808CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4811$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004812else
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004816
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817
4818fi
4819if test -z "$ac_cv_path_CXX"; then
4820 ac_pt_CXX=$CXX
4821 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4824$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830 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 +00004831 ;;
4832 *)
4833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834for as_dir in notfound
4835do
4836 IFS=$as_save_IFS
4837 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842 break 2
4843 fi
4844done
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004846IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848 ;;
4849esac
4850fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4852if test -n "$ac_pt_CXX"; then
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4854$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004855else
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4857$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004859
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004860 if test "x$ac_pt_CXX" = x; then
4861 CXX="c++"
4862 else
4863 case $cross_compiling:$ac_tool_warned in
4864yes:)
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4867ac_tool_warned=yes ;;
4868esac
4869 CXX=$ac_pt_CXX
4870 fi
4871else
4872 CXX="$ac_cv_path_CXX"
4873fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004874 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 clang|*/clang) if test -n "$ac_tool_prefix"; then
4876 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4877set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879$as_echo_n "checking for $ac_word... " >&6; }
4880if ${ac_cv_path_CXX+:} false; then :
4881 $as_echo_n "(cached) " >&6
4882else
4883 case $CXX in
4884 [\\/]* | ?:[\\/]*)
4885 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4886 ;;
4887 *)
4888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889for as_dir in notfound
4890do
4891 IFS=$as_save_IFS
4892 test -z "$as_dir" && as_dir=.
4893 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004895 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897 break 2
4898 fi
4899done
4900 done
4901IFS=$as_save_IFS
4902
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903 ;;
4904esac
4905fi
4906CXX=$ac_cv_path_CXX
4907if test -n "$CXX"; then
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4909$as_echo "$CXX" >&6; }
4910else
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912$as_echo "no" >&6; }
4913fi
4914
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004915
4916fi
4917if test -z "$ac_cv_path_CXX"; then
4918 ac_pt_CXX=$CXX
4919 # Extract the first word of "clang++", so it can be a program name with args.
4920set dummy clang++; ac_word=$2
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922$as_echo_n "checking for $ac_word... " >&6; }
4923if ${ac_cv_path_ac_pt_CXX+:} false; then :
4924 $as_echo_n "(cached) " >&6
4925else
4926 case $ac_pt_CXX in
4927 [\\/]* | ?:[\\/]*)
4928 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4929 ;;
4930 *)
4931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in notfound
4933do
4934 IFS=$as_save_IFS
4935 test -z "$as_dir" && as_dir=.
4936 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004938 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940 break 2
4941 fi
4942done
4943 done
4944IFS=$as_save_IFS
4945
4946 ;;
4947esac
4948fi
4949ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4950if test -n "$ac_pt_CXX"; then
4951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4952$as_echo "$ac_pt_CXX" >&6; }
4953else
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955$as_echo "no" >&6; }
4956fi
4957
4958 if test "x$ac_pt_CXX" = x; then
4959 CXX="clang++"
4960 else
4961 case $cross_compiling:$ac_tool_warned in
4962yes:)
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4965ac_tool_warned=yes ;;
4966esac
4967 CXX=$ac_pt_CXX
4968 fi
4969else
4970 CXX="$ac_cv_path_CXX"
4971fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004972 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004973 icc|*/icc) if test -n "$ac_tool_prefix"; then
4974 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4975set dummy ${ac_tool_prefix}icpc; ac_word=$2
4976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4977$as_echo_n "checking for $ac_word... " >&6; }
4978if ${ac_cv_path_CXX+:} false; then :
4979 $as_echo_n "(cached) " >&6
4980else
4981 case $CXX in
4982 [\\/]* | ?:[\\/]*)
4983 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4984 ;;
4985 *)
4986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987for as_dir in notfound
4988do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
4991 for ac_exec_ext in '' $ac_executable_extensions; do
4992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4993 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4995 break 2
4996 fi
4997done
4998 done
4999IFS=$as_save_IFS
5000
5001 ;;
5002esac
5003fi
5004CXX=$ac_cv_path_CXX
5005if test -n "$CXX"; then
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5007$as_echo "$CXX" >&6; }
5008else
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
5011fi
5012
5013
5014fi
5015if test -z "$ac_cv_path_CXX"; then
5016 ac_pt_CXX=$CXX
5017 # Extract the first word of "icpc", so it can be a program name with args.
5018set dummy icpc; ac_word=$2
5019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5020$as_echo_n "checking for $ac_word... " >&6; }
5021if ${ac_cv_path_ac_pt_CXX+:} false; then :
5022 $as_echo_n "(cached) " >&6
5023else
5024 case $ac_pt_CXX in
5025 [\\/]* | ?:[\\/]*)
5026 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5027 ;;
5028 *)
5029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in notfound
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5036 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5038 break 2
5039 fi
5040done
5041 done
5042IFS=$as_save_IFS
5043
5044 ;;
5045esac
5046fi
5047ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5048if test -n "$ac_pt_CXX"; then
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5050$as_echo "$ac_pt_CXX" >&6; }
5051else
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
5054fi
5055
5056 if test "x$ac_pt_CXX" = x; then
5057 CXX="icpc"
5058 else
5059 case $cross_compiling:$ac_tool_warned in
5060yes:)
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5063ac_tool_warned=yes ;;
5064esac
5065 CXX=$ac_pt_CXX
5066 fi
5067else
5068 CXX="$ac_cv_path_CXX"
5069fi
5070 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005071 esac
5072 if test "$CXX" = "notfound"
5073 then
5074 CXX=""
5075 fi
5076fi
5077if test -z "$CXX"
5078then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 if test -n "$ac_tool_prefix"; then
5080 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5081 do
5082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005086if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088else
5089 if test -n "$CXX"; then
5090 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5091else
5092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095 IFS=$as_save_IFS
5096 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005099 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101 break 2
5102 fi
5103done
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106
5107fi
5108fi
5109CXX=$ac_cv_prog_CXX
5110if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5112$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113else
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116fi
5117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005118
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005119 test -n "$CXX" && break
5120 done
5121fi
5122if test -z "$CXX"; then
5123 ac_ct_CXX=$CXX
5124 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5125do
5126 # Extract the first word of "$ac_prog", so it can be a program name with args.
5127set dummy $ac_prog; ac_word=$2
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5129$as_echo_n "checking for $ac_word... " >&6; }
5130if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5131 $as_echo_n "(cached) " >&6
5132else
5133 if test -n "$ac_ct_CXX"; then
5134 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5135else
5136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139 IFS=$as_save_IFS
5140 test -z "$as_dir" && as_dir=.
5141 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005143 ac_cv_prog_ac_ct_CXX="$ac_prog"
5144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145 break 2
5146 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005147done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005148 done
5149IFS=$as_save_IFS
5150
5151fi
5152fi
5153ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5154if test -n "$ac_ct_CXX"; then
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5156$as_echo "$ac_ct_CXX" >&6; }
5157else
5158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163 test -n "$ac_ct_CXX" && break
5164done
5165
5166 if test "x$ac_ct_CXX" = x; then
5167 CXX="notfound"
5168 else
5169 case $cross_compiling:$ac_tool_warned in
5170yes:)
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5172$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5173ac_tool_warned=yes ;;
5174esac
5175 CXX=$ac_ct_CXX
5176 fi
5177fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178
5179 if test "$CXX" = "notfound"
5180 then
5181 CXX=""
5182 fi
5183fi
5184if test "$preset_cxx" != "$CXX"
5185then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005186 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005187
5188 By default, distutils will build C++ extension modules with \"$CXX\".
5189 If this is not intended, then set CXX on the configure command line.
5190 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005191$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192
5193 By default, distutils will build C++ extension modules with \"$CXX\".
5194 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005195 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196fi
5197
5198
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5200
5201
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5203$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5204cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef bfin
5206#undef cris
5207#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef hppa
5210#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005211#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005213#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005216#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005217 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005218#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005219# if defined(__x86_64__) && defined(__LP64__)
5220 x86_64-linux-gnu
5221# elif defined(__x86_64__) && defined(__ILP32__)
5222 x86_64-linux-gnux32
5223# elif defined(__i386__)
5224 i386-linux-gnu
5225# elif defined(__aarch64__) && defined(__AARCH64EL__)
5226# if defined(__ILP32__)
5227 aarch64_ilp32-linux-gnu
5228# else
5229 aarch64-linux-gnu
5230# endif
5231# elif defined(__aarch64__) && defined(__AARCH64EB__)
5232# if defined(__ILP32__)
5233 aarch64_be_ilp32-linux-gnu
5234# else
5235 aarch64_be-linux-gnu
5236# endif
5237# elif defined(__alpha__)
5238 alpha-linux-gnu
5239# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5240# if defined(__ARMEL__)
5241 arm-linux-gnueabihf
5242# else
5243 armeb-linux-gnueabihf
5244# endif
5245# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5246# if defined(__ARMEL__)
5247 arm-linux-gnueabi
5248# else
5249 armeb-linux-gnueabi
5250# endif
5251# elif defined(__hppa__)
5252 hppa-linux-gnu
5253# elif defined(__ia64__)
5254 ia64-linux-gnu
5255# elif defined(__m68k__) && !defined(__mcoldfire__)
5256 m68k-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005257# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5258# if _MIPS_SIM == _ABIO32
5259 mipsisa32r6el-linux-gnu
5260# elif _MIPS_SIM == _ABIN32
5261 mipsisa64r6el-linux-gnuabin32
5262# elif _MIPS_SIM == _ABI64
5263 mipsisa64r6el-linux-gnuabi64
5264# else
5265# error unknown platform triplet
5266# endif
5267# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5268# if _MIPS_SIM == _ABIO32
5269 mipsisa32r6-linux-gnu
5270# elif _MIPS_SIM == _ABIN32
5271 mipsisa64r6-linux-gnuabin32
5272# elif _MIPS_SIM == _ABI64
5273 mipsisa64r6-linux-gnuabi64
5274# else
5275# error unknown platform triplet
5276# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277# elif defined(__mips_hard_float) && defined(_MIPSEL)
5278# if _MIPS_SIM == _ABIO32
5279 mipsel-linux-gnu
5280# elif _MIPS_SIM == _ABIN32
5281 mips64el-linux-gnuabin32
5282# elif _MIPS_SIM == _ABI64
5283 mips64el-linux-gnuabi64
5284# else
5285# error unknown platform triplet
5286# endif
5287# elif defined(__mips_hard_float)
5288# if _MIPS_SIM == _ABIO32
5289 mips-linux-gnu
5290# elif _MIPS_SIM == _ABIN32
5291 mips64-linux-gnuabin32
5292# elif _MIPS_SIM == _ABI64
5293 mips64-linux-gnuabi64
5294# else
5295# error unknown platform triplet
5296# endif
5297# elif defined(__or1k__)
5298 or1k-linux-gnu
5299# elif defined(__powerpc__) && defined(__SPE__)
5300 powerpc-linux-gnuspe
5301# elif defined(__powerpc64__)
5302# if defined(__LITTLE_ENDIAN__)
5303 powerpc64le-linux-gnu
5304# else
5305 powerpc64-linux-gnu
5306# endif
5307# elif defined(__powerpc__)
5308 powerpc-linux-gnu
5309# elif defined(__s390x__)
5310 s390x-linux-gnu
5311# elif defined(__s390__)
5312 s390-linux-gnu
5313# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5314 sh4-linux-gnu
5315# elif defined(__sparc__) && defined(__arch64__)
5316 sparc64-linux-gnu
5317# elif defined(__sparc__)
5318 sparc-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005319# elif defined(__riscv)
5320# if __riscv_xlen == 32
5321 riscv32-linux-gnu
5322# elif __riscv_xlen == 64
5323 riscv64-linux-gnu
5324# else
5325# error unknown platform triplet
5326# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327# else
5328# error unknown platform triplet
5329# endif
5330#elif defined(__FreeBSD_kernel__)
5331# if defined(__LP64__)
5332 x86_64-kfreebsd-gnu
5333# elif defined(__i386__)
5334 i386-kfreebsd-gnu
5335# else
5336# error unknown platform triplet
5337# endif
5338#elif defined(__gnu_hurd__)
5339 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005340#elif defined(__APPLE__)
5341 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342#else
5343# error unknown platform triplet
5344#endif
5345
5346EOF
5347
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005348if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005349 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5351$as_echo "$PLATFORM_TRIPLET" >&6; }
5352else
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5354$as_echo "none" >&6; }
5355fi
5356rm -f conftest.c conftest.out
5357
5358if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5359 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5360 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5361 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005362elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5363 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005364fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365
doko@ubuntu.com55532312016-06-14 08:55:19 +02005366if test x$MULTIARCH != x; then
5367 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5368fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005369
5370
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5372$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5373save_LDFLAGS="$LDFLAGS"
5374LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005375
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377/* end confdefs.h. */
5378
5379int
5380main ()
5381{
5382
5383 ;
5384 return 0;
5385}
5386_ACEOF
5387if ac_fn_c_try_link "$LINENO"; then :
5388 NO_AS_NEEDED="-Wl,--no-as-needed"
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5390$as_echo "yes" >&6; }
5391else
5392 NO_AS_NEEDED=""
5393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5394$as_echo "no" >&6; }
5395fi
5396rm -f core conftest.err conftest.$ac_objext \
5397 conftest$ac_exeext conftest.$ac_ext
5398LDFLAGS="$save_LDFLAGS"
5399
5400
5401
5402# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5405$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005406if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408else
5409 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5410 then ac_cv_path_EGREP="$GREP -E"
5411 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 # Loop through the user's path and test for each of PROGNAME-LIST
5415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5417do
5418 IFS=$as_save_IFS
5419 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 for ac_prog in egrep; do
5421 for ac_exec_ext in '' $ac_executable_extensions; do
5422 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005423 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005424# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 # Check for GNU $ac_path_EGREP
5426case `"$ac_path_EGREP" --version 2>&1` in
5427*GNU*)
5428 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5429*)
5430 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 while :
5433 do
5434 cat "conftest.in" "conftest.in" >"conftest.tmp"
5435 mv "conftest.tmp" "conftest.in"
5436 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5439 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5442 # Best one so far, save it but keep looking for a better one
5443 ac_cv_path_EGREP="$ac_path_EGREP"
5444 ac_path_EGREP_max=$ac_count
5445 fi
5446 # 10*(2^10) chars as input seems more than enough
5447 test $ac_count -gt 10 && break
5448 done
5449 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5450esac
5451
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 $ac_path_EGREP_found && break 3
5453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005458 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 +00005459 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005460else
5461 ac_cv_path_EGREP=$EGREP
5462fi
5463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 fi
5465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5467$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005468 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005469
5470
Matthias Kloseb9621712010-04-24 17:59:49 +00005471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5472$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005473if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 $as_echo_n "(cached) " >&6
5475else
5476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005477/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005478#include <stdlib.h>
5479#include <stdarg.h>
5480#include <string.h>
5481#include <float.h>
5482
5483int
5484main ()
5485{
5486
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491if ac_fn_c_try_compile "$LINENO"; then :
5492 ac_cv_header_stdc=yes
5493else
5494 ac_cv_header_stdc=no
5495fi
5496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5497
5498if test $ac_cv_header_stdc = yes; then
5499 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005503
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005504_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005508else
Matthias Kloseb9621712010-04-24 17:59:49 +00005509 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005510fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005511rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005512
Matthias Kloseb9621712010-04-24 17:59:49 +00005513fi
5514
5515if test $ac_cv_header_stdc = yes; then
5516 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <stdlib.h>
5520
5521_ACEOF
5522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5523 $EGREP "free" >/dev/null 2>&1; then :
5524
5525else
5526 ac_cv_header_stdc=no
5527fi
5528rm -f conftest*
5529
5530fi
5531
5532if test $ac_cv_header_stdc = yes; then
5533 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5534 if test "$cross_compiling" = yes; then :
5535 :
5536else
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h. */
5539#include <ctype.h>
5540#include <stdlib.h>
5541#if ((' ' & 0x0FF) == 0x020)
5542# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5543# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5544#else
5545# define ISLOWER(c) \
5546 (('a' <= (c) && (c) <= 'i') \
5547 || ('j' <= (c) && (c) <= 'r') \
5548 || ('s' <= (c) && (c) <= 'z'))
5549# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5550#endif
5551
5552#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5553int
5554main ()
5555{
5556 int i;
5557 for (i = 0; i < 256; i++)
5558 if (XOR (islower (i), ISLOWER (i))
5559 || toupper (i) != TOUPPER (i))
5560 return 2;
5561 return 0;
5562}
5563_ACEOF
5564if ac_fn_c_try_run "$LINENO"; then :
5565
5566else
5567 ac_cv_header_stdc=no
5568fi
5569rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5570 conftest.$ac_objext conftest.beam conftest.$ac_ext
5571fi
5572
5573fi
5574fi
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5576$as_echo "$ac_cv_header_stdc" >&6; }
5577if test $ac_cv_header_stdc = yes; then
5578
5579$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5580
5581fi
5582
5583# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5584for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5585 inttypes.h stdint.h unistd.h
5586do :
5587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5588ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5589"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005590if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 cat >>confdefs.h <<_ACEOF
5592#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5593_ACEOF
5594
5595fi
5596
5597done
5598
5599
5600
5601 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 +02005602if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005603 MINIX=yes
5604else
5605 MINIX=
5606fi
5607
5608
5609 if test "$MINIX" = yes; then
5610
5611$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5612
5613
5614$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5615
5616
5617$as_echo "#define _MINIX 1" >>confdefs.h
5618
5619 fi
5620
5621
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5623$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005624if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005625 $as_echo_n "(cached) " >&6
5626else
5627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628/* end confdefs.h. */
5629
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005630# define __EXTENSIONS__ 1
5631 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005632int
5633main ()
5634{
5635
5636 ;
5637 return 0;
5638}
5639_ACEOF
5640if ac_fn_c_try_compile "$LINENO"; then :
5641 ac_cv_safe_to_define___extensions__=yes
5642else
5643 ac_cv_safe_to_define___extensions__=no
5644fi
5645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5646fi
5647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5648$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5649 test $ac_cv_safe_to_define___extensions__ = yes &&
5650 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5651
5652 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5653
5654 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5655
5656 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5657
5658 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5659
5660
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
Xavier de Gaye95750b12016-07-09 11:05:42 +02005662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5663$as_echo_n "checking for the Android API level... " >&6; }
5664cat >> conftest.c <<EOF
5665#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005666android_api = __ANDROID_API__
5667arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005668#else
5669#error not Android
5670#endif
5671EOF
5672
5673if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005674 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5675 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5677$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005678 if test -z "$ANDROID_API_LEVEL"; then
5679 echo 'Fatal: you must define __ANDROID_API__'
5680 exit 1
5681 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005682
5683cat >>confdefs.h <<_ACEOF
5684#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5685_ACEOF
5686
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005687
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5689$as_echo_n "checking for the Android arm ABI... " >&6; }
5690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5691$as_echo "$_arm_arch" >&6; }
5692 if test "$_arm_arch" = 7; then
5693 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5694 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5695 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005696else
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5698$as_echo "not Android" >&6; }
5699fi
5700rm -f conftest.c conftest.out
5701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702# Check for unsupported systems
5703case $ac_sys_system/$ac_sys_release in
5704atheos*|Linux*/1*)
5705 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5706 echo See README for details.
5707 exit 1;;
5708esac
5709
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5712$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005715if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 withval=$with_suffix;
5717 case $withval in
5718 no) EXEEXT=;;
5719 yes) EXEEXT=.exe;;
5720 *) EXEEXT=$withval;;
5721 esac
5722fi
5723
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5725$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727# Test whether we're running on a non-case-sensitive system, in which
5728# case we give a warning if no ext is given
5729
Matthias Kloseb9621712010-04-24 17:59:49 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5731$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732if test ! -d CaseSensitiveTestDir; then
5733mkdir CaseSensitiveTestDir
5734fi
5735
5736if test -d casesensitivetestdir
5737then
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5739$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 BUILDEXEEXT=.exe
5741else
Matthias Kloseb9621712010-04-24 17:59:49 +00005742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744 BUILDEXEEXT=$EXEEXT
5745fi
5746rmdir CaseSensitiveTestDir
5747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748case $ac_sys_system in
5749hp*|HP*)
5750 case $CC in
5751 cc|*/cc) CC="$CC -Ae";;
5752 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753esac
5754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5757$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758if test -z "$LIBRARY"
5759then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005760 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5763$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
5765# LDLIBRARY is the name of the library to link against (as opposed to the
5766# name of the library into which to insert object files). BLDLIBRARY is also
5767# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5768# is blank as the main program is not linked directly against LDLIBRARY.
5769# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5770# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5771# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5772# DLLLIBRARY is the shared (i.e., DLL) library.
5773#
5774# RUNSHARED is used to run shared python without installed libraries
5775#
5776# INSTSONAME is the name of the shared library that will be use to install
5777# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005778#
5779# LDVERSION is the shared library version number, normally the Python version
5780# with the ABI build flags appended.
5781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783
5784
5785
5786
5787
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789LDLIBRARY="$LIBRARY"
5790BLDLIBRARY='$(LDLIBRARY)'
5791INSTSONAME='$(LDLIBRARY)'
5792DLLLIBRARY=''
5793LDLIBRARYDIR=''
5794RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005795LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796
5797# LINKCC is the command that links the python executable -- default is $(CC).
5798# If CXX is set, and if it is needed to link a main function that was
5799# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5800# python might then depend on the C++ runtime
5801# This is altered for AIX in order to build the export list before
5802# linking.
5803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5805$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806if test -z "$LINKCC"
5807then
5808 LINKCC='$(PURIFY) $(MAINCC)'
5809 case $ac_sys_system in
5810 AIX*)
5811 exp_extra="\"\""
5812 if test $ac_sys_release -ge 5 -o \
5813 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5814 exp_extra="."
5815 fi
5816 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817 QNX*)
5818 # qcc must be used because the other compilers do not
5819 # support -N.
5820 LINKCC=qcc;;
5821 esac
5822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5824$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825
5826# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5827# make sure we default having it set to "no": this is used by
5828# distutils.unixccompiler to know if it should add --enable-new-dtags
5829# to linker command lines, and failing to detect GNU ld simply results
5830# in the same bahaviour as before.
5831
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5833$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834ac_prog=ld
5835if test "$GCC" = yes; then
5836 ac_prog=`$CC -print-prog-name=ld`
5837fi
5838case `"$ac_prog" -V 2>&1 < /dev/null` in
5839 *GNU*)
5840 GNULD=yes;;
5841 *)
5842 GNULD=no;;
5843esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5845$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5848$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005850if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 enableval=$enable_shared;
5852fi
5853
5854
5855if test -z "$enable_shared"
5856then
5857 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005858 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859 enable_shared="yes";;
5860 *)
5861 enable_shared="no";;
5862 esac
5863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5865$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5868$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005870if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871 enableval=$enable_profiling;
5872fi
5873
5874if test "x$enable_profiling" = xyes; then
5875 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005876 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878/* end confdefs.h. */
5879int main() { return 0; }
5880_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881if ac_fn_c_try_link "$LINENO"; then :
5882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005884 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005886rm -f core conftest.err conftest.$ac_objext \
5887 conftest$ac_exeext conftest.$ac_ext
5888 CC="$ac_save_cc"
5889else
5890 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5893$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894
doko@ubuntu.comba015832012-06-30 16:52:05 +02005895if test "x$enable_profiling" = xyes; then
5896 BASECFLAGS="-pg $BASECFLAGS"
5897 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898fi
5899
Matthias Kloseb9621712010-04-24 17:59:49 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5901$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
5903# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5904# library that we build, but we do not want to link against it (we
5905# will find it with a -framework option). For this reason there is an
5906# extra variable BLDLIBRARY against which Python and the extension
5907# modules are linked, BLDLIBRARY. This is normally the same as
5908# LDLIBRARY, but empty for MacOSX framework builds.
5909if test "$enable_framework"
5910then
5911 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 BLDLIBRARY=''
5914else
5915 BLDLIBRARY='$(LDLIBRARY)'
5916fi
5917
5918# Other platforms follow
5919if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005920 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921
Matthias Kloseb9621712010-04-24 17:59:49 +00005922$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923
5924 case $ac_sys_system in
5925 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).dll.a'
5927 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
5931 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005934 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005935 then
5936 PY3LIBRARY=libpython3.so
5937 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005939 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
5941 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005942 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005944 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005945 then
5946 PY3LIBRARY=libpython3.so
5947 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 hp*|HP*)
5950 case `uname -m` in
5951 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
5954 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005955 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 ;;
5957 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).dylib'
5963 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005964 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005966 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005968 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005969 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970
5971 esac
5972else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005973 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 case $ac_sys_system in
5975 CYGWIN*)
5976 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978 ;;
5979 esac
5980fi
5981
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005982if test "$cross_compiling" = yes; then
5983 RUNSHARED=
5984fi
5985
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5987$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990if test -n "$ac_tool_prefix"; then
5991 for ac_prog in ar aal
5992 do
5993 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5994set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005997if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999else
6000 if test -n "$AR"; then
6001 ac_cv_prog_AR="$AR" # Let the user override the test.
6002else
6003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
6007 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 break 2
6013 fi
6014done
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016IFS=$as_save_IFS
6017
6018fi
6019fi
6020AR=$ac_cv_prog_AR
6021if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6023$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024else
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027fi
6028
6029
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006030 test -n "$AR" && break
6031 done
6032fi
6033if test -z "$AR"; then
6034 ac_ct_AR=$AR
6035 for ac_prog in ar aal
6036do
6037 # Extract the first word of "$ac_prog", so it can be a program name with args.
6038set dummy $ac_prog; ac_word=$2
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6040$as_echo_n "checking for $ac_word... " >&6; }
6041if ${ac_cv_prog_ac_ct_AR+:} false; then :
6042 $as_echo_n "(cached) " >&6
6043else
6044 if test -n "$ac_ct_AR"; then
6045 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6046else
6047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050 IFS=$as_save_IFS
6051 test -z "$as_dir" && as_dir=.
6052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006054 ac_cv_prog_ac_ct_AR="$ac_prog"
6055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056 break 2
6057 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006059 done
6060IFS=$as_save_IFS
6061
6062fi
6063fi
6064ac_ct_AR=$ac_cv_prog_ac_ct_AR
6065if test -n "$ac_ct_AR"; then
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6067$as_echo "$ac_ct_AR" >&6; }
6068else
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070$as_echo "no" >&6; }
6071fi
6072
6073
6074 test -n "$ac_ct_AR" && break
6075done
6076
6077 if test "x$ac_ct_AR" = x; then
6078 AR="ar"
6079 else
6080 case $cross_compiling:$ac_tool_warned in
6081yes:)
6082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6084ac_tool_warned=yes ;;
6085esac
6086 AR=$ac_ct_AR
6087 fi
6088fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089
6090
6091# tweak ARFLAGS only if the user didn't set it on the command line
6092
6093if test -z "$ARFLAGS"
6094then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006095 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096fi
6097
doko@ubuntu.com58844492012-06-30 18:25:32 +02006098if test -n "$ac_tool_prefix"; then
6099 for ac_prog in readelf
6100 do
6101 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if ${ac_cv_prog_READELF+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 if test -n "$READELF"; then
6109 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006118 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120 break 2
6121 fi
6122done
6123 done
6124IFS=$as_save_IFS
6125
6126fi
6127fi
6128READELF=$ac_cv_prog_READELF
6129if test -n "$READELF"; then
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6131$as_echo "$READELF" >&6; }
6132else
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138 test -n "$READELF" && break
6139 done
6140fi
6141if test -z "$READELF"; then
6142 ac_ct_READELF=$READELF
6143 for ac_prog in readelf
6144do
6145 # Extract the first word of "$ac_prog", so it can be a program name with args.
6146set dummy $ac_prog; ac_word=$2
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6148$as_echo_n "checking for $ac_word... " >&6; }
6149if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6150 $as_echo_n "(cached) " >&6
6151else
6152 if test -n "$ac_ct_READELF"; then
6153 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6154else
6155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156for as_dir in $PATH
6157do
6158 IFS=$as_save_IFS
6159 test -z "$as_dir" && as_dir=.
6160 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006162 ac_cv_prog_ac_ct_READELF="$ac_prog"
6163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6164 break 2
6165 fi
6166done
6167 done
6168IFS=$as_save_IFS
6169
6170fi
6171fi
6172ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6173if test -n "$ac_ct_READELF"; then
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6175$as_echo "$ac_ct_READELF" >&6; }
6176else
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6178$as_echo "no" >&6; }
6179fi
6180
6181
6182 test -n "$ac_ct_READELF" && break
6183done
6184
6185 if test "x$ac_ct_READELF" = x; then
6186 READELF=":"
6187 else
6188 case $cross_compiling:$ac_tool_warned in
6189yes:)
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6192ac_tool_warned=yes ;;
6193esac
6194 READELF=$ac_ct_READELF
6195 fi
6196fi
6197
6198if test "$cross_compiling" = yes; then
6199 case "$READELF" in
6200 readelf|:)
6201 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6202 ;;
6203 esac
6204fi
6205
6206
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006209hp*|HP*)
6210 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 if test -z "$INSTALL"
6212 then
6213 INSTALL="${srcdir}/install-sh -c"
6214 fi
6215esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216# Find a good install program. We prefer a C program (faster),
6217# so one script is as good as another. But avoid the broken or
6218# incompatible versions:
6219# SysV /etc/install, /usr/sbin/install
6220# SunOS /usr/etc/install
6221# IRIX /sbin/install
6222# AIX /bin/install
6223# AmigaOS /C/install, which installs bootblocks on floppy discs
6224# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6225# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6226# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6227# OS/2's system install, which has a completely different semantic
6228# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006229# Reject install programs that cannot install multiple files.
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6231$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006233if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006234 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235else
6236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237for as_dir in $PATH
6238do
6239 IFS=$as_save_IFS
6240 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006241 # Account for people who put trailing slashes in PATH elements.
6242case $as_dir/ in #((
6243 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246 /usr/ucb/* ) ;;
6247 *)
6248 # OSF1 and SCO ODT 3.0 have their own names for install.
6249 # Don't use installbsd from OSF since it installs stuff as root
6250 # by default.
6251 for ac_prog in ginstall scoinst install; do
6252 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006253 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254 if test $ac_prog = install &&
6255 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6256 # AIX install. It has an incompatible calling convention.
6257 :
6258 elif test $ac_prog = install &&
6259 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6260 # program-specific install script used by HP pwplus--don't use.
6261 :
6262 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006263 rm -rf conftest.one conftest.two conftest.dir
6264 echo one > conftest.one
6265 echo two > conftest.two
6266 mkdir conftest.dir
6267 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6268 test -s conftest.one && test -s conftest.two &&
6269 test -s conftest.dir/conftest.one &&
6270 test -s conftest.dir/conftest.two
6271 then
6272 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6273 break 3
6274 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275 fi
6276 fi
6277 done
6278 done
6279 ;;
6280esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006281
6282 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283IFS=$as_save_IFS
6284
Matthias Kloseb9621712010-04-24 17:59:49 +00006285rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286
6287fi
6288 if test "${ac_cv_path_install+set}" = set; then
6289 INSTALL=$ac_cv_path_install
6290 else
6291 # As a last resort, use the slow shell script. Don't cache a
6292 # value for INSTALL within a source directory, because that will
6293 # break other packages using the cache if that directory is
6294 # removed, or if the value is a relative name.
6295 INSTALL=$ac_install_sh
6296 fi
6297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6299$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
6301# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6302# It thinks the first close brace ends the variable substitution.
6303test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6304
6305test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6306
6307test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6308
Matthias Klose93a0ef12012-03-15 18:08:34 +01006309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6310$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6311if test -z "$MKDIR_P"; then
6312 if ${ac_cv_path_mkdir+:} false; then :
6313 $as_echo_n "(cached) " >&6
6314else
6315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6317do
6318 IFS=$as_save_IFS
6319 test -z "$as_dir" && as_dir=.
6320 for ac_prog in mkdir gmkdir; do
6321 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006322 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006323 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6324 'mkdir (GNU coreutils) '* | \
6325 'mkdir (coreutils) '* | \
6326 'mkdir (fileutils) '4.1*)
6327 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6328 break 3;;
6329 esac
6330 done
6331 done
6332 done
6333IFS=$as_save_IFS
6334
6335fi
6336
6337 test -d ./--version && rmdir ./--version
6338 if test "${ac_cv_path_mkdir+set}" = set; then
6339 MKDIR_P="$ac_cv_path_mkdir -p"
6340 else
6341 # As a last resort, use the slow shell script. Don't cache a
6342 # value for MKDIR_P within a source directory, because that will
6343 # break other packages using the cache if that directory is
6344 # removed, or if the value is a relative name.
6345 MKDIR_P="$ac_install_sh -d"
6346 fi
6347fi
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6349$as_echo "$MKDIR_P" >&6; }
6350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351
6352# Not every filesystem supports hard links
6353
6354if test -z "$LN" ; then
6355 case $ac_sys_system in
6356 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357 *) LN=ln;;
6358 esac
6359fi
6360
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006361# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006362
6363ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6367$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
6369# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006370if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 withval=$with_pydebug;
6372if test "$withval" != no
6373then
6374
Matthias Kloseb9621712010-04-24 17:59:49 +00006375$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
Matthias Kloseb9621712010-04-24 17:59:49 +00006377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6378$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006380 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006381else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383fi
6384else
Matthias Kloseb9621712010-04-24 17:59:49 +00006385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387fi
6388
6389
T. Woutersddbfa2c2017-05-23 01:30:49 +02006390# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6391# the ABI. This allows enabling assertions without changing the ABI.
6392assertions='false'
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6394$as_echo_n "checking for --with-assertions... " >&6; }
6395
6396# Check whether --with-assertions was given.
6397if test "${with_assertions+set}" = set; then :
6398 withval=$with_assertions;
6399if test "$withval" != no
6400then
6401 assertions='true'
6402fi
6403fi
6404
6405if test "$assertions" = 'true'; then
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6407$as_echo "yes" >&6; }
6408elif test "$Py_DEBUG" = 'true'; then
6409 assertions='true'
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6411$as_echo "implied by --with-pydebug" >&6; }
6412else
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
6415fi
6416
Brett Cannon63d98bc2016-09-06 17:12:40 -07006417# Enable optimization flags
6418
6419
6420Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6422$as_echo_n "checking for --enable-optimizations... " >&6; }
6423# Check whether --enable-optimizations was given.
6424if test "${enable_optimizations+set}" = set; then :
6425 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006426if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006427then
6428 Py_OPT='true'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6430$as_echo "yes" >&6; };
6431else
6432 Py_OPT='false'
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; };
6435fi
6436else
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006442 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6443 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006444 # 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 +00006445 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006446 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006447 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006448 DEF_MAKE_RULE="build_all"
6449else
6450 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006451 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006452 DEF_MAKE_RULE="all"
6453fi
6454
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006455# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6456# normal names in the default $PATH (ie: Ubuntu). They exist under the
6457# non-suffixed name in their versioned llvm directory.
6458
6459llvm_bin_dir=''
6460llvm_path="${PATH}"
6461if test "${CC}" = "clang"
6462then
6463 clang_bin=`which clang`
6464 # Some systems install clang elsewhere as a symlink to the real path
6465 # which is where the related llvm tools are located.
6466 if test -L "${clang_bin}"
6467 then
6468 clang_dir=`dirname "${clang_bin}"`
6469 clang_bin=`readlink "${clang_bin}"`
6470 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6471 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6472 fi
6473fi
6474
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006475# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6477$as_echo_n "checking for --with-lto... " >&6; }
6478
6479# Check whether --with-lto was given.
6480if test "${with_lto+set}" = set; then :
6481 withval=$with_lto;
6482if test "$withval" != no
6483then
6484 Py_LTO='true'
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6486$as_echo "yes" >&6; };
6487else
6488 Py_LTO='false'
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; };
6491fi
6492else
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494$as_echo "no" >&6; }
6495fi
6496
6497if test "$Py_LTO" = 'true' ; then
6498 case $CC in
6499 *clang*)
Miss Islington (bot)1bb9dd32018-06-22 00:10:20 -07006500
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006502$as_echo_n "checking target system type... " >&6; }
6503if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006504 $as_echo_n "(cached) " >&6
6505else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006506 if test "x$target_alias" = x; then
6507 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006508else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006509 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6510 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6511fi
6512
6513fi
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6515$as_echo "$ac_cv_target" >&6; }
6516case $ac_cv_target in
6517*-*-*) ;;
6518*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6519esac
6520target=$ac_cv_target
6521ac_save_IFS=$IFS; IFS='-'
6522set x $ac_cv_target
6523shift
6524target_cpu=$1
6525target_vendor=$2
6526shift; shift
6527# Remember, the first character of IFS is used to create $*,
6528# except with old shells:
6529target_os=$*
6530IFS=$ac_save_IFS
6531case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6532
6533
6534# The aliases save the names the user supplied, while $host etc.
6535# will get canonicalized.
6536test -n "$target_alias" &&
6537 test "$program_prefix$program_suffix$program_transform_name" = \
6538 NONENONEs,x,x, &&
6539 program_prefix=${target_alias}-
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006540# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6541set dummy $target_alias-llvm-ar; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6550 ;;
6551 *)
6552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in ${llvm_path}
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561 break 2
6562 fi
6563done
6564 done
6565IFS=$as_save_IFS
6566
6567 ;;
6568esac
6569fi
6570LLVM_AR=$ac_cv_path_LLVM_AR
6571if test -n "$LLVM_AR"; then
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6573$as_echo "$LLVM_AR" >&6; }
6574else
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
6579
6580if test -z "$ac_cv_path_LLVM_AR"; then
6581 if test "$build" = "$target"; then
6582 ac_pt_LLVM_AR=$LLVM_AR
6583 # Extract the first word of "llvm-ar", so it can be a program name with args.
6584set dummy llvm-ar; ac_word=$2
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586$as_echo_n "checking for $ac_word... " >&6; }
6587if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589else
6590 case $ac_pt_LLVM_AR in
6591 [\\/]* | ?:[\\/]*)
6592 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6593 ;;
6594 *)
6595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596for as_dir in ${llvm_path}
6597do
6598 IFS=$as_save_IFS
6599 test -z "$as_dir" && as_dir=.
6600 for ac_exec_ext in '' $ac_executable_extensions; do
6601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604 break 2
6605 fi
6606done
6607 done
6608IFS=$as_save_IFS
6609
6610 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6611 ;;
6612esac
6613fi
6614ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6615if test -n "$ac_pt_LLVM_AR"; then
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6617$as_echo "$ac_pt_LLVM_AR" >&6; }
6618else
6619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6620$as_echo "no" >&6; }
6621fi
6622
6623 LLVM_AR=$ac_pt_LLVM_AR
6624 else
6625 LLVM_AR="''"
6626 fi
6627else
6628 LLVM_AR="$ac_cv_path_LLVM_AR"
6629fi
6630
6631
6632 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6633 then
6634 LLVM_AR_FOUND="found"
6635 else
6636 LLVM_AR_FOUND="not-found"
6637 fi
6638 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6639 then
6640 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6641 if test -n "${found_llvm_ar}"
6642 then
6643 LLVM_AR='/usr/bin/xcrun llvm-ar'
6644 LLVM_AR_FOUND=found
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6646$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6647 fi
6648 fi
6649 if test $LLVM_AR_FOUND = not-found
6650 then
6651 LLVM_PROFR_ERR=yes
6652 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6653 else
6654 LLVM_AR_ERR=no
6655 fi
6656 AR="${LLVM_AR}"
6657 case $ac_sys_system in
6658 Darwin*)
6659 # Any changes made here should be reflected in the GCC+Darwin case below
6660 LTOFLAGS="-flto -Wl,-export_dynamic"
6661 ;;
6662 *)
6663 LTOFLAGS="-flto"
6664 ;;
6665 esac
6666 ;;
6667 *gcc*)
6668 case $ac_sys_system in
6669 Darwin*)
6670 LTOFLAGS="-flto -Wl,-export_dynamic"
6671 ;;
6672 *)
6673 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6674 ;;
6675 esac
6676 ;;
6677 esac
6678
6679 if test "$ac_cv_prog_cc_g" = "yes"
6680 then
6681 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6682 # to get debug symbols.
6683 LTOFLAGS="$LTOFLAGS -g"
6684 fi
6685
Miss Islington (bot)17514232018-12-04 07:06:16 -08006686 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
Victor Stinner0198f522018-12-20 16:03:01 +01006687 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006688fi
6689
6690# Enable PGO flags.
6691
6692
6693
6694
6695
6696
Gregory P. Smith799520c2016-09-07 16:10:00 -07006697# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6698set dummy $target_alias-llvm-profdata; ac_word=$2
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6700$as_echo_n "checking for $ac_word... " >&6; }
6701if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6702 $as_echo_n "(cached) " >&6
6703else
6704 case $LLVM_PROFDATA in
6705 [\\/]* | ?:[\\/]*)
6706 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6707 ;;
6708 *)
6709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006711do
6712 IFS=$as_save_IFS
6713 test -z "$as_dir" && as_dir=.
6714 for ac_exec_ext in '' $ac_executable_extensions; do
6715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006716 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718 break 2
6719 fi
6720done
6721 done
6722IFS=$as_save_IFS
6723
Gregory P. Smith799520c2016-09-07 16:10:00 -07006724 ;;
6725esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006726fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006727LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6728if test -n "$LLVM_PROFDATA"; then
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6730$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006731else
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6733$as_echo "no" >&6; }
6734fi
6735
6736
Gregory P. Smith799520c2016-09-07 16:10:00 -07006737if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6738 if test "$build" = "$target"; then
6739 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6740 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6741set dummy llvm-profdata; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6745 $as_echo_n "(cached) " >&6
6746else
6747 case $ac_pt_LLVM_PROFDATA in
6748 [\\/]* | ?:[\\/]*)
6749 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6750 ;;
6751 *)
6752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in ${llvm_path}
6754do
6755 IFS=$as_save_IFS
6756 test -z "$as_dir" && as_dir=.
6757 for ac_exec_ext in '' $ac_executable_extensions; do
6758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761 break 2
6762 fi
6763done
6764 done
6765IFS=$as_save_IFS
6766
6767 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6768 ;;
6769esac
6770fi
6771ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6772if test -n "$ac_pt_LLVM_PROFDATA"; then
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6774$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6775else
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777$as_echo "no" >&6; }
6778fi
6779
6780 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6781 else
6782 LLVM_PROFDATA="''"
6783 fi
6784else
6785 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6786fi
6787
6788
6789if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6790then
6791 LLVM_PROF_FOUND="found"
6792else
6793 LLVM_PROF_FOUND="not-found"
6794fi
6795if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6796then
6797 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6798 if test -n "${found_llvm_profdata}"
6799 then
6800 # llvm-profdata isn't directly in $PATH in some cases.
6801 # https://apple.stackexchange.com/questions/197053/
6802 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6803 LLVM_PROF_FOUND=found
6804 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6805$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6806 fi
6807fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006808LLVM_PROF_ERR=no
6809case $CC in
6810 *clang*)
6811 # Any changes made here should be reflected in the GCC+Darwin case below
6812 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006814 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006815 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6816 if test $LLVM_PROF_FOUND = not-found
6817 then
6818 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006819 if test "${REQUIRE_PGO}" = "yes"
6820 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006821 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 -07006822 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006823 fi
6824 ;;
6825 *gcc*)
6826 case $ac_sys_system in
6827 Darwin*)
6828 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6829 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006830 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006831 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006832 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006833 then
6834 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006835 if test "${REQUIRE_PGO}" = "yes"
6836 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006837 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 -07006838 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006839 fi
6840 ;;
6841 *)
6842 PGO_PROF_GEN_FLAG="-fprofile-generate"
6843 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6844 LLVM_PROF_MERGER="true"
6845 LLVM_PROF_FILE=""
6846 ;;
6847 esac
6848 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006849 *icc*)
6850 PGO_PROF_GEN_FLAG="-prof-gen"
6851 PGO_PROF_USE_FLAG="-prof-use"
6852 LLVM_PROF_MERGER="true"
6853 LLVM_PROF_FILE=""
6854 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006855esac
6856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6858# merged with this chunk of code?
6859
6860# Optimizer/debugger flags
6861# ------------------------
6862# (The following bit of code is complicated enough - please keep things
6863# indented properly. Just pretend you're editing Python code. ;-)
6864
6865# There are two parallel sets of case statements below, one that checks to
6866# see if OPT was set and one that does BASECFLAGS setting based upon
6867# compiler and platform. BASECFLAGS tweaks need to be made even if the
6868# user set OPT.
6869
6870# tweak OPT based on compiler and platform, only if the user didn't set
6871# it on the command line
6872
Victor Stinner9ed34a82017-05-02 22:35:58 +02006873
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006874if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875then
6876 case $GCC in
6877 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6879 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6880 WRAP="-fwrapv"
6881 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006882
Stefan Krahaf04ff22011-12-08 22:20:31 +01006883 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006884 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006885 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006886 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006887 *)
6888 if $CC --version 2>&1 | grep -q clang
6889 then
6890 cc_is_clang=1
6891 else
6892 cc_is_clang=
6893 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006894 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006895
Victor Stinner35f3d242017-04-21 12:35:24 +02006896 if test -n "${cc_is_clang}"
6897 then
6898 # Clang also needs -fwrapv
6899 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006900 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6901 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006902 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006903 fi
6904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905 case $ac_cv_prog_cc_g in
6906 yes)
6907 if test "$Py_DEBUG" = 'true' ; then
6908 # Optimization messes up debuggers, so turn it off for
6909 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006910 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006911 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006912 else
Victor Stinner28205b22017-04-21 11:24:34 +02006913 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006914 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 else
Victor Stinner28205b22017-04-21 11:24:34 +02006916 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917 fi
6918 ;;
6919 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006920 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921 ;;
6922 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924 case $ac_sys_system in
6925 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6926 ;;
6927 esac
6928 ;;
6929
6930 *)
6931 OPT="-O"
6932 ;;
6933 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006934fi
6935
6936
6937
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006938
Victor Stinner0198f522018-12-20 16:03:01 +01006939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940# The -arch flags for universal builds on OSX
6941UNIVERSAL_ARCH_FLAGS=
6942
6943
6944# tweak BASECFLAGS based on compiler and platform
6945case $GCC in
6946yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006947 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006948
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6950$as_echo_n "checking for -Wextra... " >&6; }
6951 ac_save_cc="$CC"
6952 CC="$CC -Wextra -Werror"
6953 if ${ac_cv_extra_warnings+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955else
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6957/* end confdefs.h. */
6958
6959
6960int
6961main ()
6962{
6963
6964 ;
6965 return 0;
6966}
6967
6968_ACEOF
6969if ac_fn_c_try_compile "$LINENO"; then :
6970
6971 ac_cv_extra_warnings=yes
6972
6973else
6974
6975 ac_cv_extra_warnings=no
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6979fi
6980
6981 CC="$ac_save_cc"
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6983$as_echo "$ac_cv_extra_warnings" >&6; }
6984
6985 if test $ac_cv_extra_warnings = yes
6986 then
6987 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6988 fi
6989
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 # Python doesn't violate C99 aliasing rules, but older versions of
6991 # GCC produce warnings for legal Python code. Enable
6992 # -fno-strict-aliasing on versions of GCC that support but produce
6993 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6995$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996 ac_save_cc="$CC"
6997 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006998 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006999 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007003/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007004
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007006int
7007main ()
7008{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007009
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007010 ;
7011 return 0;
7012}
Matthias Kloseb159a552010-04-25 21:00:44 +00007013
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007015if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007016
7017 CC="$ac_save_cc -fstrict-aliasing"
7018 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007020/* end confdefs.h. */
7021
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007022 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023int
7024main ()
7025{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007026double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027 ;
7028 return 0;
7029}
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007032if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007033
7034 ac_cv_no_strict_aliasing=no
7035
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007036else
Matthias Kloseb159a552010-04-25 21:00:44 +00007037
7038 ac_cv_no_strict_aliasing=yes
7039
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007040fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007042
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043else
Matthias Kloseb159a552010-04-25 21:00:44 +00007044
7045 ac_cv_no_strict_aliasing=no
7046
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007047fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007049fi
7050
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007051 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7054$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007055 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056 then
7057 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7058 fi
7059
Zachary Ware5af85642015-12-21 12:09:17 -06007060 # ICC doesn't recognize the option, but only emits a warning
7061 ## XXX does it emit an unused result warning and can it be disabled?
7062 case "$CC" in
7063 *icc*)
7064 ac_cv_disable_unused_result_warning=no
7065 ;;
7066 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7068$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7069 ac_save_cc="$CC"
7070 CC="$CC -Wunused-result -Werror"
7071 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007072 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007073 $as_echo_n "(cached) " >&6
7074else
7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076/* end confdefs.h. */
7077
7078
7079int
7080main ()
7081{
7082
7083 ;
7084 return 0;
7085}
7086
7087_ACEOF
7088if ac_fn_c_try_compile "$LINENO"; then :
7089
7090 ac_cv_disable_unused_result_warning=yes
7091
7092else
7093
7094 ac_cv_disable_unused_result_warning=no
7095
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098fi
7099
7100 CFLAGS="$save_CFLAGS"
7101 CC="$ac_save_cc"
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7103$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007104 ;;
7105 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007106
7107 if test $ac_cv_disable_unused_result_warning = yes
7108 then
7109 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007110 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7111 fi
7112
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7114$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7115 ac_save_cc="$CC"
7116 CC="$CC -Wunused-parameter -Werror"
7117 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7118 $as_echo_n "(cached) " >&6
7119else
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121/* end confdefs.h. */
7122
7123
7124int
7125main ()
7126{
7127
7128 ;
7129 return 0;
7130}
7131
7132_ACEOF
7133if ac_fn_c_try_compile "$LINENO"; then :
7134
7135 ac_cv_disable_unused_parameter_warning=yes
7136
7137else
7138
7139 ac_cv_disable_unused_parameter_warning=no
7140
7141fi
7142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7143fi
7144
7145 CC="$ac_save_cc"
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7147$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7148
7149 if test $ac_cv_disable_unused_parameter_warning = yes
7150 then
7151 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7152 fi
7153
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7155$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7156 ac_save_cc="$CC"
7157 CC="$CC -Wmissing-field-initializers -Werror"
7158 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7159 $as_echo_n "(cached) " >&6
7160else
7161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162/* end confdefs.h. */
7163
7164
7165int
7166main ()
7167{
7168
7169 ;
7170 return 0;
7171}
7172
7173_ACEOF
7174if ac_fn_c_try_compile "$LINENO"; then :
7175
7176 ac_cv_disable_missing_field_initializers=yes
7177
7178else
7179
7180 ac_cv_disable_missing_field_initializers=no
7181
7182fi
7183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7184fi
7185
7186 CC="$ac_save_cc"
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7188$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7189
7190 if test $ac_cv_disable_missing_field_initializers = yes
7191 then
7192 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007193 fi
7194
Serhiy Storchakaef91dde2018-05-25 13:16:51 +03007195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
7196$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
7197 ac_save_cc="$CC"
7198 CC="$CC -Wcast-function-type -Werror"
7199 if ${ac_cv_disable_cast_function_type+:} false; then :
7200 $as_echo_n "(cached) " >&6
7201else
7202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7203/* end confdefs.h. */
7204
7205
7206int
7207main ()
7208{
7209
7210 ;
7211 return 0;
7212}
7213
7214_ACEOF
7215if ac_fn_c_try_compile "$LINENO"; then :
7216
7217 ac_cv_disable_cast_function_type=yes
7218
7219else
7220
7221 ac_cv_disable_cast_function_type=no
7222
7223fi
7224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225fi
7226
7227 CC="$ac_save_cc"
7228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
7229$as_echo "$ac_cv_disable_cast_function_type" >&6; }
7230
7231 if test $ac_cv_disable_cast_function_type = yes
7232 then
7233 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
7234 fi
7235
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7237$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7238 ac_save_cc="$CC"
7239 CC="$CC -Wsign-compare"
7240 save_CFLAGS="$CFLAGS"
7241 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243else
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247
7248int
7249main ()
7250{
7251
7252 ;
7253 return 0;
7254}
7255
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258
7259 ac_cv_enable_sign_compare_warning=yes
7260
7261else
7262
7263 ac_cv_enable_sign_compare_warning=no
7264
7265fi
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267fi
7268
7269 CFLAGS="$save_CFLAGS"
7270 CC="$ac_save_cc"
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7272$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7273
7274 if test $ac_cv_enable_sign_compare_warning = yes
7275 then
7276 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7277 fi
7278
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7280$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7281 ac_save_cc="$CC"
7282 CC="$CC -Wunreachable-code"
7283 save_CFLAGS="$CFLAGS"
7284 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7285 $as_echo_n "(cached) " >&6
7286else
7287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7288/* end confdefs.h. */
7289
7290
7291int
7292main ()
7293{
7294
7295 ;
7296 return 0;
7297}
7298
7299_ACEOF
7300if ac_fn_c_try_compile "$LINENO"; then :
7301
7302 ac_cv_enable_unreachable_code_warning=yes
7303
7304else
7305
7306 ac_cv_enable_unreachable_code_warning=no
7307
7308fi
7309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310fi
7311
7312 CFLAGS="$save_CFLAGS"
7313 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007314
7315 # Don't enable unreachable code warning in debug mode, since it usually
7316 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007317 # Issue #24324: Unfortunately, the unreachable code warning does not work
7318 # correctly on gcc and has been silently removed from the compiler.
7319 # It is supported on clang but on OS X systems gcc may be an alias
7320 # for clang. Try to determine if the compiler is not really gcc and,
7321 # if so, only then enable the warning.
7322 if test $ac_cv_enable_unreachable_code_warning = yes && \
7323 test "$Py_DEBUG" != "true" && \
7324 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007325 then
7326 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007327 else
7328 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007329 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7331$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007332
Miss Islington (bot)d6e789c2018-06-05 17:12:06 -07007333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7334$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7335 ac_save_cc="$CC"
7336 CC="$CC -Werror -Wstrict-prototypes"
7337 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7338 $as_echo_n "(cached) " >&6
7339else
7340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7341/* end confdefs.h. */
7342
7343
7344int
7345main ()
7346{
7347
7348 ;
7349 return 0;
7350}
7351
7352_ACEOF
7353if ac_fn_c_try_compile "$LINENO"; then :
7354
7355 ac_cv_enable_strict_prototypes_warning=yes
7356
7357else
7358
7359 ac_cv_enable_strict_prototypes_warning=no
7360
7361fi
7362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7363fi
7364
7365 CC="$ac_save_cc"
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7367$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7368
7369 if test $ac_cv_enable_strict_prototypes_warning = yes
7370 then
7371 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7372 fi
7373
Victor Stinner193ee0a2017-02-06 14:24:00 +01007374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7375$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7376 ac_save_cc="$CC"
7377 CC="$CC -Werror=implicit-function-declaration"
7378 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7379 $as_echo_n "(cached) " >&6
7380else
7381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7382/* end confdefs.h. */
7383
7384
7385int
7386main ()
7387{
7388
7389 ;
7390 return 0;
7391}
7392
7393_ACEOF
7394if ac_fn_c_try_compile "$LINENO"; then :
7395
7396 ac_cv_enable_implicit_function_declaration_error=yes
7397
7398else
7399
7400 ac_cv_enable_implicit_function_declaration_error=no
7401
7402fi
7403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7404fi
7405
7406 CC="$ac_save_cc"
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7408$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7409
7410 if test $ac_cv_enable_implicit_function_declaration_error = yes
7411 then
7412 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7413 fi
7414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7416 # support. Without this, treatment of subnormals doesn't follow
7417 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007418 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 alpha*)
7420 BASECFLAGS="$BASECFLAGS -mieee"
7421 ;;
7422 esac
7423
7424 case $ac_sys_system in
7425 SCO_SV*)
7426 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7427 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007428
7429 # is there any other compiler on Darwin besides gcc?
7430 Darwin*)
7431 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7432 # used to be here, but non-Apple gcc doesn't accept them.
7433 if test "${CC}" = gcc
7434 then
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007436$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007437 case "${UNIVERSALSDK}" in
7438 */MacOSX10.4u.sdk)
7439 # Build using 10.4 SDK, force usage of gcc when the
7440 # compiler is gcc, otherwise the user will get very
7441 # confusing error messages when building on OSX 10.6
7442 CC=gcc-4.0
7443 CPP=cpp-4.0
7444 ;;
7445 esac
7446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007447$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007448 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 if test "${enable_universalsdk}"
7451 then
7452 case "$UNIVERSAL_ARCHS" in
7453 32-bit)
7454 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7455 LIPO_32BIT_FLAGS=""
7456 ARCH_RUN_32BIT=""
7457 ;;
7458 64-bit)
7459 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7460 LIPO_32BIT_FLAGS=""
7461 ARCH_RUN_32BIT="true"
7462 ;;
7463 all)
7464 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7465 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7466 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7467 ;;
7468 intel)
7469 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7470 LIPO_32BIT_FLAGS="-extract i386"
7471 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7472 ;;
7473 intel-32)
7474 UNIVERSAL_ARCH_FLAGS="-arch i386"
7475 LIPO_32BIT_FLAGS=""
7476 ARCH_RUN_32BIT=""
7477 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007478 intel-64)
7479 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7480 LIPO_32BIT_FLAGS=""
7481 ARCH_RUN_32BIT="true"
7482 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007483 3-way)
7484 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7485 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7486 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7487 ;;
7488 *)
7489 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7490 ;;
7491 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492
Ned Deily87adb6e2013-10-18 21:09:56 -07007493 if test "${UNIVERSALSDK}" != "/"
7494 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007495 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7496 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007497 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007498 else
7499 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7500 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007501 fi
7502 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 # Calculate an appropriate deployment target for this build:
7505 # The deployment target value is used explicitly to enable certain
7506 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007507 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 # component of the string returned by distutils.get_platform().
7509 #
7510 # Use the value from:
7511 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7512 # 2. the operating system version of the build machine if >= 10.6
7513 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7514 # below to pick either 10.3, 10.4, or 10.5 as the target.
7515 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516
Ned Deily87adb6e2013-10-18 21:09:56 -07007517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7518$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007519 cur_target_major=`sw_vers -productVersion | \
7520 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7521 cur_target_minor=`sw_vers -productVersion | \
7522 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7523 cur_target="${cur_target_major}.${cur_target_minor}"
7524 if test ${cur_target_major} -eq 10 && \
7525 test ${cur_target_minor} -ge 3 && \
7526 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007527 then
Ned Deily36820b62014-06-25 13:44:22 -07007528 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007529 cur_target=10.3
7530 if test ${enable_universalsdk}
7531 then
7532 case "$UNIVERSAL_ARCHS" in
7533 all|3-way|intel|64-bit)
7534 # These configurations were first supported in 10.5
7535 cur_target='10.5'
7536 ;;
7537 esac
7538 else
7539 if test `/usr/bin/arch` = "i386"
7540 then
7541 # 10.4 was the first release to support Intel archs
7542 cur_target="10.4"
7543 fi
7544 fi
7545 fi
7546 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007547
Ned Deily87adb6e2013-10-18 21:09:56 -07007548 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7549 # environment with a value that is the same as what we'll use
7550 # in the Makefile to ensure that we'll get the same compiler
7551 # environment during configure and build time.
7552 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7553 export MACOSX_DEPLOYMENT_TARGET
7554 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7556$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007557
Ned Deily87adb6e2013-10-18 21:09:56 -07007558 # end of Darwin* tests
7559 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560 esac
7561 ;;
7562
7563*)
7564 case $ac_sys_system in
7565 OpenUNIX*|UnixWare*)
7566 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7567 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568 SCO_SV*)
7569 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7570 ;;
7571 esac
7572 ;;
7573esac
7574
Zachary Ware5af85642015-12-21 12:09:17 -06007575# ICC needs -fp-model strict or floats behave badly
7576case "$CC" in
7577*icc*)
7578 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7579 ;;
7580esac
7581
T. Woutersddbfa2c2017-05-23 01:30:49 +02007582if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583 :
7584else
7585 OPT="-DNDEBUG $OPT"
7586fi
7587
7588if test "$ac_arch_flags"
7589then
7590 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7591fi
7592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593# On some compilers, pthreads are available without further options
7594# (e.g. MacOS X). On some of these systems, the compiler will not
7595# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7596# So we have to see first whether pthreads are available without
7597# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7599$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007600if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602else
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604 ac_cv_pthread_is_default=no
7605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607/* end confdefs.h. */
7608
Stefan Krah7dba5942012-11-22 22:49:11 +01007609#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610#include <pthread.h>
7611
7612void* routine(void* p){return NULL;}
7613
7614int main(){
7615 pthread_t p;
7616 if(pthread_create(&p,NULL,routine,NULL)!=0)
7617 return 1;
7618 (void)pthread_detach(p);
7619 return 0;
7620}
7621
7622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007623if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624
7625 ac_cv_pthread_is_default=yes
7626 ac_cv_kthread=no
7627 ac_cv_pthread=no
7628
7629else
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634fi
7635
7636
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637fi
7638
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7640$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641
7642
7643if test $ac_cv_pthread_is_default = yes
7644then
7645 ac_cv_kpthread=no
7646else
7647# -Kpthread, if available, provides the right #defines
7648# and linker options to make pthread_create available
7649# Some compilers won't report that they do not support -Kpthread,
7650# so we need to run a program to see whether it really made the
7651# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7653$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656else
7657 ac_save_cc="$CC"
7658CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 ac_cv_kpthread=no
7661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663/* end confdefs.h. */
7664
Stefan Krah7dba5942012-11-22 22:49:11 +01007665#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666#include <pthread.h>
7667
7668void* routine(void* p){return NULL;}
7669
7670int main(){
7671 pthread_t p;
7672 if(pthread_create(&p,NULL,routine,NULL)!=0)
7673 return 1;
7674 (void)pthread_detach(p);
7675 return 0;
7676}
7677
7678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007679if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680 ac_cv_kpthread=yes
7681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688CC="$ac_save_cc"
7689fi
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7692$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694
7695if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7696then
7697# -Kthread, if available, provides the right #defines
7698# and linker options to make pthread_create available
7699# Some compilers won't report that they do not support -Kthread,
7700# so we need to run a program to see whether it really made the
7701# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7703$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007704if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706else
7707 ac_save_cc="$CC"
7708CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007709if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710 ac_cv_kthread=no
7711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713/* end confdefs.h. */
7714
Stefan Krah7dba5942012-11-22 22:49:11 +01007715#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716#include <pthread.h>
7717
7718void* routine(void* p){return NULL;}
7719
7720int main(){
7721 pthread_t p;
7722 if(pthread_create(&p,NULL,routine,NULL)!=0)
7723 return 1;
7724 (void)pthread_detach(p);
7725 return 0;
7726}
7727
7728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007729if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730 ac_cv_kthread=yes
7731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
7737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738CC="$ac_save_cc"
7739fi
7740
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7742$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743fi
7744
7745if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7746then
7747# -pthread, if available, provides the right #defines
7748# and linker options to make pthread_create available
7749# Some compilers won't report that they do not support -pthread,
7750# so we need to run a program to see whether it really made the
7751# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7753$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007754if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756else
7757 ac_save_cc="$CC"
7758CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007759if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760 ac_cv_pthread=no
7761else
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
Stefan Krah7dba5942012-11-22 22:49:11 +01007765#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766#include <pthread.h>
7767
7768void* routine(void* p){return NULL;}
7769
7770int main(){
7771 pthread_t p;
7772 if(pthread_create(&p,NULL,routine,NULL)!=0)
7773 return 1;
7774 (void)pthread_detach(p);
7775 return 0;
7776}
7777
7778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007779if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780 ac_cv_pthread=yes
7781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786fi
7787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788CC="$ac_save_cc"
7789fi
7790
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7792$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793fi
7794
7795# If we have set a CC compiler flag for thread support then
7796# check if it works for CXX, too.
7797ac_cv_cxx_thread=no
7798if test ! -z "$CXX"
7799then
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7801$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802ac_save_cxx="$CXX"
7803
7804if test "$ac_cv_kpthread" = "yes"
7805then
7806 CXX="$CXX -Kpthread"
7807 ac_cv_cxx_thread=yes
7808elif test "$ac_cv_kthread" = "yes"
7809then
7810 CXX="$CXX -Kthread"
7811 ac_cv_cxx_thread=yes
7812elif test "$ac_cv_pthread" = "yes"
7813then
7814 CXX="$CXX -pthread"
7815 ac_cv_cxx_thread=yes
7816fi
7817
7818if test $ac_cv_cxx_thread = yes
7819then
7820 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7821 $CXX -c conftest.$ac_ext 2>&5
7822 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7823 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7824 then
7825 ac_cv_cxx_thread=yes
7826 else
7827 ac_cv_cxx_thread=no
7828 fi
7829 rm -fr conftest*
7830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7832$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833fi
7834CXX="$ac_save_cxx"
7835
7836
7837# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7839$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007840if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842else
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844/* end confdefs.h. */
7845#include <stdlib.h>
7846#include <stdarg.h>
7847#include <string.h>
7848#include <float.h>
7849
7850int
7851main ()
7852{
7853
7854 ;
7855 return 0;
7856}
7857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859 ac_cv_header_stdc=yes
7860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007862fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7864
7865if test $ac_cv_header_stdc = yes; then
7866 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868/* end confdefs.h. */
7869#include <string.h>
7870
7871_ACEOF
7872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 $EGREP "memchr" >/dev/null 2>&1; then :
7874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875else
7876 ac_cv_header_stdc=no
7877fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007878rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879
7880fi
7881
7882if test $ac_cv_header_stdc = yes; then
7883 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885/* end confdefs.h. */
7886#include <stdlib.h>
7887
7888_ACEOF
7889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 $EGREP "free" >/dev/null 2>&1; then :
7891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007892else
7893 ac_cv_header_stdc=no
7894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007895rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896
7897fi
7898
7899if test $ac_cv_header_stdc = yes; then
7900 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902 :
7903else
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007905/* end confdefs.h. */
7906#include <ctype.h>
7907#include <stdlib.h>
7908#if ((' ' & 0x0FF) == 0x020)
7909# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7910# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7911#else
7912# define ISLOWER(c) \
7913 (('a' <= (c) && (c) <= 'i') \
7914 || ('j' <= (c) && (c) <= 'r') \
7915 || ('s' <= (c) && (c) <= 'z'))
7916# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7917#endif
7918
7919#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7920int
7921main ()
7922{
7923 int i;
7924 for (i = 0; i < 256; i++)
7925 if (XOR (islower (i), ISLOWER (i))
7926 || toupper (i) != TOUPPER (i))
7927 return 2;
7928 return 0;
7929}
7930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007931if ac_fn_c_try_run "$LINENO"; then :
7932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7937 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007938fi
7939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007940fi
7941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7943$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007944if test $ac_cv_header_stdc = yes; then
7945
Matthias Kloseb9621712010-04-24 17:59:49 +00007946$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007947
7948fi
7949
stratakise768c862018-01-23 16:11:24 +01007950for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007951fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007952ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007953sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007954unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007955poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007956sys/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 +01007957sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007958sys/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 +01007959sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007960sys/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 -07007961libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007962linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007963sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007964do :
7965 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7966ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007967if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007969#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007970_ACEOF
7971
7972fi
7973
Guido van Rossum627b2d71993-12-24 10:39:16 +00007974done
7975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007976ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007977for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7980$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007981if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007983else
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007986#include <sys/types.h>
7987#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
7992if ((DIR *) 0)
7993return 0;
7994 ;
7995 return 0;
7996}
7997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005eval ac_res=\$$as_ac_Header
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8007$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008008if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008010#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008011_ACEOF
8012
8013ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008014fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016done
8017# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8018if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8020$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008021if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023else
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028/* Override any GCC internal prototype to avoid an error.
8029 Use char because int might match the return type of a GCC
8030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008031#ifdef __cplusplus
8032extern "C"
8033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008034char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008035int
8036main ()
8037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 ;
8040 return 0;
8041}
8042_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043for ac_lib in '' dir; do
8044 if test -z "$ac_lib"; then
8045 ac_res="none required"
8046 else
8047 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008048 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053rm -f core conftest.err conftest.$ac_objext \
8054 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008055 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058done
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061else
8062 ac_cv_search_opendir=no
8063fi
8064rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008065LIBS=$ac_func_search_save_LIBS
8066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8068$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008070if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008073fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075else
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8077$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008080else
8081 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085/* Override any GCC internal prototype to avoid an error.
8086 Use char because int might match the return type of a GCC
8087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008088#ifdef __cplusplus
8089extern "C"
8090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008091char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008092int
8093main ()
8094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008095return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008096 ;
8097 return 0;
8098}
8099_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100for ac_lib in '' x; do
8101 if test -z "$ac_lib"; then
8102 ac_res="none required"
8103 else
8104 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008105 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008110rm -f core conftest.err conftest.$ac_objext \
8111 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008112 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115done
Victor Stinnere0be4232011-10-25 13:06:09 +02008116if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118else
8119 ac_cv_search_opendir=no
8120fi
8121rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008122LIBS=$ac_func_search_save_LIBS
8123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8125$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008127if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008128 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130fi
8131
8132fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8135$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008136if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008140/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008141#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008142int
8143main ()
8144{
8145return makedev(0, 0);
8146 ;
8147 return 0;
8148}
8149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008150if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008151 ac_cv_header_sys_types_h_makedev=yes
8152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008155rm -f core conftest.err conftest.$ac_objext \
8156 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008157
8158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8160$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008161
8162if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008163ac_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 +02008164if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008165
Matthias Kloseb9621712010-04-24 17:59:49 +00008166$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008167
8168fi
8169
8170
8171
8172 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 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 +02008174if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008177
8178fi
8179
8180
8181 fi
8182fi
8183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008185# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8186# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8187SAVE_CFLAGS=$CFLAGS
8188CFLAGS="-std=c99 $CFLAGS"
8189for ac_header in bluetooth/bluetooth.h
8190do :
8191 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8192if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8193 cat >>confdefs.h <<_ACEOF
8194#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8195_ACEOF
8196
8197fi
8198
8199done
8200
8201CFLAGS=$SAVE_CFLAGS
8202
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008203# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8204for ac_header in net/if.h
8205do :
8206 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8207#ifdef STDC_HEADERS
8208# include <stdlib.h>
8209# include <stddef.h>
8210#else
8211# ifdef HAVE_STDLIB_H
8212# include <stdlib.h>
8213# endif
8214#endif
8215#ifdef HAVE_SYS_SOCKET_H
8216# include <sys/socket.h>
8217#endif
8218
8219"
Victor Stinnere0be4232011-10-25 13:06:09 +02008220if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008221 cat >>confdefs.h <<_ACEOF
8222#define HAVE_NET_IF_H 1
8223_ACEOF
8224
8225fi
8226
8227done
8228
8229
Martin v. Löwis11017b12006-01-14 18:12:57 +00008230# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008231for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008232do :
8233 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 +00008234#ifdef HAVE_ASM_TYPES_H
8235#include <asm/types.h>
8236#endif
8237#ifdef HAVE_SYS_SOCKET_H
8238#include <sys/socket.h>
8239#endif
8240
Matthias Kloseb9621712010-04-24 17:59:49 +00008241"
Victor Stinnere0be4232011-10-25 13:06:09 +02008242if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008243 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008244#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008245_ACEOF
8246
8247fi
8248
8249done
8250
8251
caaveryeffc12f2017-09-06 18:18:10 -04008252for ac_header in linux/vm_sockets.h
8253do :
8254 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8255#ifdef HAVE_SYS_SOCKET_H
8256#include <sys/socket.h>
8257#endif
8258
8259"
8260if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8261 cat >>confdefs.h <<_ACEOF
8262#define HAVE_LINUX_VM_SOCKETS_H 1
8263_ACEOF
8264
8265fi
8266
8267done
8268
8269
Charles-François Natali47413c12011-10-06 19:47:44 +02008270# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008271for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008272do :
8273 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8274ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8275#ifdef HAVE_SYS_SOCKET_H
8276#include <sys/socket.h>
8277#endif
8278
8279"
8280if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8281 cat >>confdefs.h <<_ACEOF
8282#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8283_ACEOF
8284
8285fi
8286
8287done
8288
8289
Guido van Rossum627b2d71993-12-24 10:39:16 +00008290# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008291was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8293$as_echo_n "checking for clock_t in time.h... " >&6; }
8294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008295/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008296#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008297
8298_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008301 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008302else
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304
Matthias Kloseb9621712010-04-24 17:59:49 +00008305$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008306
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008307
Guido van Rossum627b2d71993-12-24 10:39:16 +00008308fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008309rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008310
Matthias Kloseb9621712010-04-24 17:59:49 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8312$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8315$as_echo_n "checking for makedev... " >&6; }
8316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008317/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008318
Jesus Cea740f53a2010-04-28 11:35:30 +00008319#if defined(MAJOR_IN_MKDEV)
8320#include <sys/mkdev.h>
8321#elif defined(MAJOR_IN_SYSMACROS)
8322#include <sys/sysmacros.h>
8323#else
8324#include <sys/types.h>
8325#endif
8326
Neal Norwitz11690112002-07-30 01:08:28 +00008327int
8328main ()
8329{
Jesus Cea740f53a2010-04-28 11:35:30 +00008330
8331 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008332 ;
8333 return 0;
8334}
Matthias Kloseb159a552010-04-25 21:00:44 +00008335
Neal Norwitz11690112002-07-30 01:08:28 +00008336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008337if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008338 ac_cv_has_makedev=yes
8339else
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342rm -f core conftest.err conftest.$ac_objext \
8343 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8345$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008346if test "$ac_cv_has_makedev" = "yes"; then
8347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008349
8350fi
8351
Christian Heimes985ecdc2013-11-20 11:46:18 +01008352# byte swapping
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8354$as_echo_n "checking for le64toh... " >&6; }
8355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8356/* end confdefs.h. */
8357
8358#ifdef HAVE_ENDIAN_H
8359#include <endian.h>
8360#elif defined(HAVE_SYS_ENDIAN_H)
8361#include <sys/endian.h>
8362#endif
8363
8364int
8365main ()
8366{
8367
8368 le64toh(1)
8369 ;
8370 return 0;
8371}
8372
8373_ACEOF
8374if ac_fn_c_try_link "$LINENO"; then :
8375 ac_cv_has_le64toh=yes
8376else
8377 ac_cv_has_le64toh=no
8378fi
8379rm -f core conftest.err conftest.$ac_objext \
8380 conftest$ac_exeext conftest.$ac_ext
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8382$as_echo "$ac_cv_has_le64toh" >&6; }
8383if test "$ac_cv_has_le64toh" = "yes"; then
8384
8385$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8386
8387fi
8388
Martin v. Löwis399a6892002-10-04 10:22:02 +00008389use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008390# Don't use largefile support for GNU/Hurd
8391case $ac_sys_system in GNU*)
8392 use_lfs=no
8393esac
8394
Martin v. Löwis399a6892002-10-04 10:22:02 +00008395if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008396# Two defines needed to enable largefile support on various platforms
8397# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008398case $ac_sys_system/$ac_sys_release in
8399AIX*)
8400
8401$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8402
8403 ;;
8404esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008405
Matthias Kloseb9621712010-04-24 17:59:49 +00008406$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008407
8408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008410
Martin v. Löwis399a6892002-10-04 10:22:02 +00008411fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008412
Guido van Rossum84e7b241996-08-19 21:59:00 +00008413# Add some code to confdefs.h so that the test for off_t works on SCO
8414cat >> confdefs.h <<\EOF
8415#if defined(SCO_DS)
8416#undef _OFF_T
8417#endif
8418EOF
8419
Guido van Rossumef2255b2000-03-10 22:30:29 +00008420# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008421ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008422if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008424else
Martin v. Löwis11437992002-04-12 09:54:03 +00008425
8426cat >>confdefs.h <<_ACEOF
8427#define mode_t int
8428_ACEOF
8429
8430fi
8431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008433if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008435else
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
8437cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008439_ACEOF
8440
8441fi
8442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008446else
Martin v. Löwis11437992002-04-12 09:54:03 +00008447
8448cat >>confdefs.h <<_ACEOF
8449#define pid_t int
8450_ACEOF
8451
8452fi
8453
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008454
Martin v. Löwis11437992002-04-12 09:54:03 +00008455cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008456#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008457_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008460if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008462else
Martin v. Löwis11437992002-04-12 09:54:03 +00008463
8464cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008466_ACEOF
8467
8468fi
8469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8471$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008472if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008474else
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008477#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
8479_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008482 ac_cv_type_uid_t=yes
8483else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008484 ac_cv_type_uid_t=no
8485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008486rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8490$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008491if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008494
8495
Matthias Kloseb9621712010-04-24 17:59:49 +00008496$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008497
8498fi
8499
Mark Dickinson983bc162012-12-02 12:11:38 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008502if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008505
8506fi
8507
Stefan Krah1919b7e2012-03-21 18:25:23 +01008508ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8509if test "x$ac_cv_type___uint128_t" = xyes; then :
8510
8511$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8512
8513fi
8514
Jack Jansendd19cf82001-12-06 22:36:17 +00008515
Michael W. Hudson54241132001-12-07 15:38:26 +00008516# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008517# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518# The cast to long int works around a bug in the HP C Compiler
8519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8521# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8523$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008524if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008526else
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 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 +00008528
Martin v. Löwis11437992002-04-12 09:54:03 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 if test "$ac_cv_type_int" = yes; then
8531 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8532$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008533as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008534See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535 else
8536 ac_cv_sizeof_int=0
8537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008539
Martin v. Löwis11437992002-04-12 09:54:03 +00008540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8542$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543
8544
8545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008547#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008548_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008549
8550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551# The cast to long int works around a bug in the HP C Compiler
8552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8554# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8556$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008557if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 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 +00008561
Martin v. Löwis11437992002-04-12 09:54:03 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 if test "$ac_cv_type_long" = yes; then
8564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008566as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008567See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568 else
8569 ac_cv_sizeof_long=0
8570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572
Martin v. Löwis11437992002-04-12 09:54:03 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8575$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576
8577
8578
Martin v. Löwis11437992002-04-12 09:54:03 +00008579cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008580#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008581_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008582
8583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584# The cast to long int works around a bug in the HP C Compiler
8585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8587# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8589$as_echo_n "checking size of long long... " >&6; }
8590if ${ac_cv_sizeof_long_long+:} false; then :
8591 $as_echo_n "(cached) " >&6
8592else
8593 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8594
8595else
8596 if test "$ac_cv_type_long_long" = yes; then
8597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8599as_fn_error 77 "cannot compute sizeof (long long)
8600See \`config.log' for more details" "$LINENO" 5; }
8601 else
8602 ac_cv_sizeof_long_long=0
8603 fi
8604fi
8605
8606fi
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8608$as_echo "$ac_cv_sizeof_long_long" >&6; }
8609
8610
8611
8612cat >>confdefs.h <<_ACEOF
8613#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8614_ACEOF
8615
8616
8617# The cast to long int works around a bug in the HP C Compiler
8618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8620# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8622$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008623if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008625else
Matthias Kloseb9621712010-04-24 17:59:49 +00008626 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 +00008627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628else
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 if test "$ac_cv_type_void_p" = yes; then
8630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008632as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008633See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634 else
8635 ac_cv_sizeof_void_p=0
8636 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008638
Martin v. Löwis11437992002-04-12 09:54:03 +00008639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8641$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642
8643
8644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008646#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008647_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008648
8649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650# The cast to long int works around a bug in the HP C Compiler
8651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8655$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008656if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008658else
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 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 +00008660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 if test "$ac_cv_type_short" = yes; then
8663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008665as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008666See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667 else
8668 ac_cv_sizeof_short=0
8669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8674$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675
8676
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008679#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008680_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008681
8682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683# The cast to long int works around a bug in the HP C Compiler
8684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8688$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008689if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008691else
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 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 +00008693
Martin v. Löwis11437992002-04-12 09:54:03 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 if test "$ac_cv_type_float" = yes; then
8696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008698as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008699See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700 else
8701 ac_cv_sizeof_float=0
8702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008704
Martin v. Löwis11437992002-04-12 09:54:03 +00008705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8707$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708
8709
8710
Martin v. Löwis11437992002-04-12 09:54:03 +00008711cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008712#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008713_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008714
8715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716# The cast to long int works around a bug in the HP C Compiler
8717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8721$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008722if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008724else
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 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 +00008726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 if test "$ac_cv_type_double" = yes; then
8729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008731as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008732See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733 else
8734 ac_cv_sizeof_double=0
8735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008737
Martin v. Löwis11437992002-04-12 09:54:03 +00008738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8740$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741
8742
8743
Martin v. Löwis11437992002-04-12 09:54:03 +00008744cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008745#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008746_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008747
8748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749# The cast to long int works around a bug in the HP C Compiler
8750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8752# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8754$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008755if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 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 +00008759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 if test "$ac_cv_type_fpos_t" = yes; then
8762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008764as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008765See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766 else
8767 ac_cv_sizeof_fpos_t=0
8768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770
Martin v. Löwis11437992002-04-12 09:54:03 +00008771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8773$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008774
8775
8776
Martin v. Löwis11437992002-04-12 09:54:03 +00008777cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008778#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008779_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008780
Michael W. Hudson54241132001-12-07 15:38:26 +00008781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782# The cast to long int works around a bug in the HP C Compiler
8783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8787$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008788if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 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 +00008792
Martin v. Löwis18e16552006-02-15 17:27:45 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 if test "$ac_cv_type_size_t" = yes; then
8795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008797as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008798See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799 else
8800 ac_cv_sizeof_size_t=0
8801 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803
Martin v. Löwis18e16552006-02-15 17:27:45 +00008804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8806$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807
8808
8809
Martin v. Löwis18e16552006-02-15 17:27:45 +00008810cat >>confdefs.h <<_ACEOF
8811#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8812_ACEOF
8813
8814
Christian Heimes400adb02008-02-01 08:12:03 +00008815# The cast to long int works around a bug in the HP C Compiler
8816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8818# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8820$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008821if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008823else
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 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 +00008825
Christian Heimes400adb02008-02-01 08:12:03 +00008826else
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 if test "$ac_cv_type_pid_t" = yes; then
8828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008830as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008831See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008832 else
8833 ac_cv_sizeof_pid_t=0
8834 fi
8835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836
Christian Heimes400adb02008-02-01 08:12:03 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8839$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008840
8841
8842
8843cat >>confdefs.h <<_ACEOF
8844#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8845_ACEOF
8846
8847
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008848# The cast to long int works around a bug in the HP C Compiler
8849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8851# This bug is HP SR number 8606223364.
8852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8853$as_echo_n "checking size of uintptr_t... " >&6; }
8854if ${ac_cv_sizeof_uintptr_t+:} false; then :
8855 $as_echo_n "(cached) " >&6
8856else
8857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8858
8859else
8860 if test "$ac_cv_type_uintptr_t" = yes; then
8861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8863as_fn_error 77 "cannot compute sizeof (uintptr_t)
8864See \`config.log' for more details" "$LINENO" 5; }
8865 else
8866 ac_cv_sizeof_uintptr_t=0
8867 fi
8868fi
8869
8870fi
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8872$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8873
8874
8875
8876cat >>confdefs.h <<_ACEOF
8877#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8878_ACEOF
8879
8880
Michael W. Hudson54241132001-12-07 15:38:26 +00008881
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8883$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008884have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008886/* end confdefs.h. */
8887
8888int
8889main ()
8890{
8891long double x; x = (long double)0;
8892 ;
8893 return 0;
8894}
8895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008896if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008897
8898
Matthias Kloseb9621712010-04-24 17:59:49 +00008899$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008900
8901 have_long_double=yes
8902
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8906$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008908# The cast to long int works around a bug in the HP C Compiler
8909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8911# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8913$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008914if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008916else
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 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 +00008918
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 if test "$ac_cv_type_long_double" = yes; then
8921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008923as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008924See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008925 else
8926 ac_cv_sizeof_long_double=0
8927 fi
8928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8932$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008933
8934
8935
8936cat >>confdefs.h <<_ACEOF
8937#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8938_ACEOF
8939
8940
8941fi
8942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943# The cast to long int works around a bug in the HP C Compiler
8944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8948$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008949if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008951else
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 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 +00008953
Thomas Woutersb2137042007-02-01 18:02:27 +00008954else
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 if test "$ac_cv_type__Bool" = yes; then
8956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008958as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008959See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008960 else
8961 ac_cv_sizeof__Bool=0
8962 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964
Thomas Woutersb2137042007-02-01 18:02:27 +00008965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8967$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968
8969
8970
Thomas Woutersb2137042007-02-01 18:02:27 +00008971cat >>confdefs.h <<_ACEOF
8972#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8973_ACEOF
8974
8975
Thomas Woutersb2137042007-02-01 18:02:27 +00008976
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977# The cast to long int works around a bug in the HP C Compiler
8978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8980# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8982$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985else
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987#ifdef HAVE_SYS_TYPES_H
8988#include <sys/types.h>
8989#endif
8990
Matthias Kloseb9621712010-04-24 17:59:49 +00008991"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008992
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993else
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 if test "$ac_cv_type_off_t" = yes; then
8995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008997as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008998See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999 else
9000 ac_cv_sizeof_off_t=0
9001 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9006$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009007
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009008
9009
Martin v. Löwis11437992002-04-12 09:54:03 +00009010cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009011#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009012_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009013
Michael W. Hudson54241132001-12-07 15:38:26 +00009014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015
Matthias Kloseb9621712010-04-24 17:59:49 +00009016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9017$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009018if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009019 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009022
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9024$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009025else
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9027$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009028fi
9029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030# The cast to long int works around a bug in the HP C Compiler
9031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9035$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009036if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009040#ifdef HAVE_SYS_TYPES_H
9041#include <sys/types.h>
9042#endif
9043#ifdef HAVE_TIME_H
9044#include <time.h>
9045#endif
9046
Matthias Kloseb9621712010-04-24 17:59:49 +00009047"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009049else
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 if test "$ac_cv_type_time_t" = yes; then
9051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009053as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009054See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009055 else
9056 ac_cv_sizeof_time_t=0
9057 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009059
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9062$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064
9065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009067#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009069
Michael W. Hudson54241132001-12-07 15:38:26 +00009070
9071
Trent Mick635f6fb2000-08-23 21:33:05 +00009072# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009073ac_save_cc="$CC"
9074if test "$ac_cv_kpthread" = "yes"
9075then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009076elif test "$ac_cv_kthread" = "yes"
9077then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009078elif test "$ac_cv_pthread" = "yes"
9079then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009080fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009081
Matthias Kloseb9621712010-04-24 17:59:49 +00009082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9083$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009084have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009086/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009087
9088 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009089int
9090main ()
9091{
Guido van Rossum12580492000-09-24 16:47:19 +00009092pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ;
9094 return 0;
9095}
Matthias Kloseb159a552010-04-25 21:00:44 +00009096
Martin v. Löwis11437992002-04-12 09:54:03 +00009097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009098if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009099 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9103$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009104if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9110$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009111if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009112 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009113else
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115#ifdef HAVE_PTHREAD_H
9116#include <pthread.h>
9117#endif
9118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009121else
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 if test "$ac_cv_type_pthread_t" = yes; then
9123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009125as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009126See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009127 else
9128 ac_cv_sizeof_pthread_t=0
9129 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009131
Trent Mick635f6fb2000-08-23 21:33:05 +00009132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9134$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009136
9137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009139#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009140_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009142
Trent Mick635f6fb2000-08-23 21:33:05 +00009143fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009144
9145# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9146# This checking will be unnecessary after removing deprecated TLS API.
9147# The cast to long int works around a bug in the HP C Compiler
9148# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9149# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9150# This bug is HP SR number 8606223364.
9151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9152$as_echo_n "checking size of pthread_key_t... " >&6; }
9153if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9154 $as_echo_n "(cached) " >&6
9155else
9156 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9157"; then :
9158
9159else
9160 if test "$ac_cv_type_pthread_key_t" = yes; then
9161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9163as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9164See \`config.log' for more details" "$LINENO" 5; }
9165 else
9166 ac_cv_sizeof_pthread_key_t=0
9167 fi
9168fi
9169
9170fi
9171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9172$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9173
9174
9175
9176cat >>confdefs.h <<_ACEOF
9177#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9178_ACEOF
9179
9180
9181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9182$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9183if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9185/* end confdefs.h. */
9186#include <pthread.h>
9187int
9188main ()
9189{
9190pthread_key_t k; k * 1;
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195if ac_fn_c_try_compile "$LINENO"; then :
9196 ac_pthread_key_t_is_arithmetic_type=yes
9197else
9198 ac_pthread_key_t_is_arithmetic_type=no
9199
9200fi
9201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9203$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9204 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9205
9206$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9207
9208 fi
9209else
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009213CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009214
Michael W. Hudson54241132001-12-07 15:38:26 +00009215
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009216case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009217 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009218 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9219 ;;
9220 Darwin/*)
9221 OTHER_LIBTOOL_OPT=""
9222 ;;
9223esac
9224
9225
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009227case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009228 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009229 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9230 if test "${enable_universalsdk}"; then
9231 :
9232 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009233 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009234 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009235 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009236 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009237 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009238 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009239 if test ${gcc_version} '<' 4.0
9240 then
9241 LIBTOOL_CRUFT="-lcc_dynamic"
9242 else
9243 LIBTOOL_CRUFT=""
9244 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009246 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247else
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009250
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009251 #include <unistd.h>
9252 int main(int argc, char*argv[])
9253 {
9254 if (sizeof(long) == 4) {
9255 return 0;
9256 } else {
9257 return 1;
9258 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009259 }
9260
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009262if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009263 ac_osx_32bit=yes
9264else
Matthias Kloseb9621712010-04-24 17:59:49 +00009265 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9268 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269fi
9270
9271
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009272 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009273 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009274 i386)
9275 MACOSX_DEFAULT_ARCH="i386"
9276 ;;
9277 ppc)
9278 MACOSX_DEFAULT_ARCH="ppc"
9279 ;;
9280 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009281 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009282 ;;
9283 esac
9284 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009285 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009286 i386)
9287 MACOSX_DEFAULT_ARCH="x86_64"
9288 ;;
9289 ppc)
9290 MACOSX_DEFAULT_ARCH="ppc64"
9291 ;;
9292 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009293 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009294 ;;
9295 esac
9296
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009297 fi
9298
9299 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009301 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9304$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009305if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009307 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009309 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9314$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009315 if test $enable_shared = "yes"
9316 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009317 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 +00009318 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009319else
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322fi
9323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9325$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009326case $ac_sys_system/$ac_sys_release in
9327 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009328
Matthias Kloseb9621712010-04-24 17:59:49 +00009329$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009330
Matthias Kloseb9621712010-04-24 17:59:49 +00009331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9332$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009333 ;;
9334 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009337 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009338esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009339
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341
Michael W. Hudson54241132001-12-07 15:38:26 +00009342
9343
9344
9345
Benjamin Peterson99f03762010-04-11 22:15:28 +00009346
Thomas Wouters477c8d52006-05-27 19:21:47 +00009347
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009348# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9349# -- usually .so, .sl on HP-UX, .dll on Cygwin
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9351$as_echo_n "checking the extension of shared libraries... " >&6; }
9352if test -z "$SHLIB_SUFFIX"; then
9353 case $ac_sys_system in
9354 hp*|HP*)
9355 case `uname -m` in
9356 ia64) SHLIB_SUFFIX=.so;;
9357 *) SHLIB_SUFFIX=.sl;;
9358 esac
9359 ;;
9360 CYGWIN*) SHLIB_SUFFIX=.dll;;
9361 *) SHLIB_SUFFIX=.so;;
9362 esac
9363fi
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9365$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009366
Guido van Rossum0a516c91994-09-12 10:58:40 +00009367# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009368# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369# (Shared libraries in this instance are shared modules to be loaded into
9370# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9372$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373if test -z "$LDSHARED"
9374then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009376 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009377 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009378 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009379 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009381 if test "$GCC" = "yes" ; then
9382 LDSHARED='$(CC) -shared'
9383 LDCXXSHARED='$(CXX) -shared'
9384 else
9385 LDSHARED='$(CC) -G'
9386 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009387 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009388 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009389 if test "$GCC" = "yes" ; then
9390 LDSHARED='$(CC) -shared'
9391 LDCXXSHARED='$(CXX) -shared'
9392 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009393 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009394 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009395 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009396 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009397 LDSHARED='$(CC) -bundle'
9398 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009399 if test "$enable_framework" ; then
9400 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009401 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9402 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009403 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009404 else
9405 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009406 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009407 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009408 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009409 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009410 LDSHARED='$(CC) -bundle'
9411 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009412 if test "$enable_framework" ; then
9413 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009414 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9415 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009416 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009417 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009418 # No framework, use the Python app as bundle-loader
9419 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009420 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009422 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009423 Darwin/*)
9424 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9425 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009426
Ned Deily36820b62014-06-25 13:44:22 -07009427 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9428 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9429 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9430 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9431 if test ${dep_target_major} -eq 10 && \
9432 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009433 then
Ned Deily36820b62014-06-25 13:44:22 -07009434 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009435 LDSHARED='$(CC) -bundle'
9436 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009437 if test "$enable_framework" ; then
9438 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009439 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9440 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009442 else
9443 # No framework, use the Python app as bundle-loader
9444 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9445 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009446 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009447 fi
Ned Deily36820b62014-06-25 13:44:22 -07009448 else
9449 # building for OS X 10.3 and later
9450 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9451 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9452 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 fi
9454 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009455 Linux*|GNU*|QNX*)
9456 LDSHARED='$(CC) -shared'
9457 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009458 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009459 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009460 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009461 LDSHARED='$(CC) -shared'
9462 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009463 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009464 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009465 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009466 OpenBSD*)
9467 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9468 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009469 LDSHARED='$(CC) -shared $(CCSHARED)'
9470 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009471 else
9472 case `uname -r` in
9473 [01].* | 2.[0-7] | 2.[0-7].*)
9474 LDSHARED="ld -Bshareable ${LDFLAGS}"
9475 ;;
9476 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009477 LDSHARED='$(CC) -shared $(CCSHARED)'
9478 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009479 ;;
9480 esac
9481 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009482 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009483 LDSHARED='$(CC) -shared'
9484 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009485 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009486 if test "$GCC" = "yes" ; then
9487 LDSHARED='$(CC) -shared'
9488 LDCXXSHARED='$(CXX) -shared'
9489 else
9490 LDSHARED='$(CC) -G'
9491 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009492 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009493 SCO_SV*)
9494 LDSHARED='$(CC) -Wl,-G,-Bexport'
9495 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9496 CYGWIN*)
9497 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9498 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009499 *) LDSHARED="ld";;
9500 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9503$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009504LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009505BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009506# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009507# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9509$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009510if test -z "$CCSHARED"
9511then
Guido van Rossum07397971997-04-29 21:49:50 +00009512 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009513 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009514 then CCSHARED="-fPIC";
9515 elif test `uname -p` = sparc;
9516 then CCSHARED="-xcode=pic32";
9517 else CCSHARED="-Kpic";
9518 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009519 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009520 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009521 else CCSHARED="+z";
9522 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009523 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009524 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009525 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009526 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009527 if test "$GCC" = "yes"
9528 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009529 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009530 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009531 SCO_SV*)
9532 if test "$GCC" = "yes"
9533 then CCSHARED="-fPIC"
9534 else CCSHARED="-Kpic -belf"
9535 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009536 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9539$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009540# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009541# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9543$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009544if test -z "$LINKFORSHARED"
9545then
Guido van Rossum07397971997-04-29 21:49:50 +00009546 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009547 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009548 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009549 LINKFORSHARED="-Wl,-E -Wl,+s";;
9550# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009551 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009552 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009553 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009555 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009556
9557 # Issue #18075: the default maximum stack size (8MBytes) is too
9558 # small for the default recursion limit. Increase the stack size
9559 # to ensure that tests don't crash
9560 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9561
Jack Jansene578a632001-08-15 01:27:14 +00009562 if test "$enable_framework"
9563 then
Jack Jansenda49e192005-01-07 13:08:22 +00009564 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009565 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009566 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009567 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009568 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009569 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009570 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009571 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9572 then
9573 LINKFORSHARED="-Wl,--export-dynamic"
9574 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009575 SunOS/5*) case $CC in
9576 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009577 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009578 then
9579 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009580 fi;;
9581 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009582 CYGWIN*)
9583 if test $enable_shared = "no"
9584 then
9585 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9586 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009587 QNX*)
9588 # -Wl,-E causes the symbols to be added to the dynamic
9589 # symbol table so that they can be found when a module
9590 # is loaded. -N 2048K causes the stack size to be set
9591 # to 2048 kilobytes so that the stack doesn't overflow
9592 # when running test_compile.py.
9593 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009594 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9597$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009598
Michael W. Hudson54241132001-12-07 15:38:26 +00009599
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009600
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9602$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009603if test ! "$LIBRARY" = "$LDLIBRARY"
9604then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009605 case $ac_sys_system in
9606 CYGWIN*)
9607 # Cygwin needs CCSHARED when building extension DLLs
9608 # but not when building the interpreter DLL.
9609 CFLAGSFORSHARED='';;
9610 *)
9611 CFLAGSFORSHARED='$(CCSHARED)'
9612 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9615$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009616
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009617# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9618# library (with --enable-shared).
9619# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009620# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9621# if it is not required, since it creates a dependency of the shared library
9622# to LIBS. This, in turn, means that applications linking the shared libpython
9623# don't need to link LIBS explicitly. The default should be only changed
9624# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9627$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009628case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009629 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009630 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009631esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9633$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009634
9635
Guido van Rossum627b2d71993-12-24 10:39:16 +00009636# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9638$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009639if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009640 $as_echo_n "(cached) " >&6
9641else
9642 ac_check_lib_save_LIBS=$LIBS
9643LIBS="-lsendfile $LIBS"
9644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9645/* end confdefs.h. */
9646
9647/* Override any GCC internal prototype to avoid an error.
9648 Use char because int might match the return type of a GCC
9649 builtin and then its argument prototype would still apply. */
9650#ifdef __cplusplus
9651extern "C"
9652#endif
9653char sendfile ();
9654int
9655main ()
9656{
9657return sendfile ();
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662if ac_fn_c_try_link "$LINENO"; then :
9663 ac_cv_lib_sendfile_sendfile=yes
9664else
9665 ac_cv_lib_sendfile_sendfile=no
9666fi
9667rm -f core conftest.err conftest.$ac_objext \
9668 conftest$ac_exeext conftest.$ac_ext
9669LIBS=$ac_check_lib_save_LIBS
9670fi
9671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9672$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009674 cat >>confdefs.h <<_ACEOF
9675#define HAVE_LIBSENDFILE 1
9676_ACEOF
9677
9678 LIBS="-lsendfile $LIBS"
9679
9680fi
9681
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9683$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009684if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009686else
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009688LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692/* Override any GCC internal prototype to avoid an error.
9693 Use char because int might match the return type of a GCC
9694 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695#ifdef __cplusplus
9696extern "C"
9697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009698char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009699int
9700main ()
9701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ;
9704 return 0;
9705}
9706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009709else
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712rm -f core conftest.err conftest.$ac_objext \
9713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009714LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9717$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 cat >>confdefs.h <<_ACEOF
9720#define HAVE_LIBDL 1
9721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009723 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009724
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009725fi
9726 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9728$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009729if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009733LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737/* Override any GCC internal prototype to avoid an error.
9738 Use char because int might match the return type of a GCC
9739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740#ifdef __cplusplus
9741extern "C"
9742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009743char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ;
9749 return 0;
9750}
9751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009757rm -f core conftest.err conftest.$ac_objext \
9758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9762$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 cat >>confdefs.h <<_ACEOF
9765#define HAVE_LIBDLD 1
9766_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009767
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009768 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009769
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009770fi
9771 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009772
Michael Felt0d3ccb42017-12-30 22:39:20 +01009773# checks for uuid.h location
9774for ac_header in uuid/uuid.h uuid.h
9775do :
9776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9777ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9778if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9779 cat >>confdefs.h <<_ACEOF
9780#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9781_ACEOF
9782
9783fi
9784
9785done
9786
9787
Berker Peksag9a10ff42017-11-08 23:09:16 +03009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9789$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9791/* end confdefs.h. */
9792#include <uuid/uuid.h>
9793int
9794main ()
9795{
9796
9797#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009798void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009799#endif
9800
9801 ;
9802 return 0;
9803}
9804_ACEOF
9805if ac_fn_c_try_compile "$LINENO"; then :
9806
9807$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9808
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9810$as_echo "yes" >&6; }
9811else
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
9814
9815fi
9816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9817
Michael Felt0d3ccb42017-12-30 22:39:20 +01009818# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009819# FreeBSD and OpenBSD provides support as well
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9821$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9823/* end confdefs.h. */
9824#include <uuid.h>
9825int
9826main ()
9827{
9828
9829#ifndef uuid_create
9830void *x = uuid_create
9831#endif
9832
9833 ;
9834 return 0;
9835}
9836_ACEOF
9837if ac_fn_c_try_compile "$LINENO"; then :
9838
9839$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9840
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9842$as_echo "yes" >&6; }
9843else
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845$as_echo "no" >&6; }
9846
9847fi
9848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9849
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009850# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9851# stream in big-endian byte-order
9852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9853$as_echo_n "checking for uuid_enc_be... " >&6; }
9854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855/* end confdefs.h. */
9856#include <uuid.h>
9857int
9858main ()
9859{
9860
9861#ifndef uuid_enc_be
Michael Felt20cd5c62018-06-09 15:59:02 -06009862void *x = uuid_enc_be
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009863#endif
9864
9865 ;
9866 return 0;
9867}
9868_ACEOF
9869if ac_fn_c_try_compile "$LINENO"; then :
9870
9871$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9872
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9874$as_echo "yes" >&6; }
9875else
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9877$as_echo "no" >&6; }
9878
9879fi
9880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9881
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009882# 'Real Time' functions on Solaris
9883# posix4 on Solaris 2.6
9884# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009886$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009887if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009889else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009890 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894/* Override any GCC internal prototype to avoid an error.
9895 Use char because int might match the return type of a GCC
9896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009897#ifdef __cplusplus
9898extern "C"
9899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009900char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009901int
9902main ()
9903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 ;
9906 return 0;
9907}
9908_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909for ac_lib in '' pthread rt posix4; do
9910 if test -z "$ac_lib"; then
9911 ac_res="none required"
9912 else
9913 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009919rm -f core conftest.err conftest.$ac_objext \
9920 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009921 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924done
Victor Stinnere0be4232011-10-25 13:06:09 +02009925if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927else
9928 ac_cv_search_sem_init=no
9929fi
9930rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009931LIBS=$ac_func_search_save_LIBS
9932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9934$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009938
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009939fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009940
Martin v. Löwis519adae2003-09-20 10:47:47 +00009941
Martin v. Löwis19d17342003-06-14 21:03:05 +00009942# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9944$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009945if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947else
9948 ac_check_lib_save_LIBS=$LIBS
9949LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953/* Override any GCC internal prototype to avoid an error.
9954 Use char because int might match the return type of a GCC
9955 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009956#ifdef __cplusplus
9957extern "C"
9958#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009960int
9961main ()
9962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009963return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964 ;
9965 return 0;
9966}
9967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969 ac_cv_lib_intl_textdomain=yes
9970else
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009973rm -f core conftest.err conftest.$ac_objext \
9974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009975LIBS=$ac_check_lib_save_LIBS
9976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9978$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009979if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009980
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009982
Brett Cannonc6d936e2009-06-07 20:09:53 +00009983 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009984fi
9985
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009986
9987# checks for system dependent C++ extensions support
9988case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9990$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009993
Georg Brandl59e87bd2011-02-15 19:48:59 +00009994 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009995int
9996main ()
9997{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009998loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 ;
10000 return 0;
10001}
Matthias Kloseb159a552010-04-25 21:00:44 +000010002
Martin v. Löwis11437992002-04-12 09:54:03 +000010003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010005
Matthias Kloseb159a552010-04-25 21:00:44 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010008
Matthias Kloseb159a552010-04-25 21:00:44 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010011
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010012else
Matthias Kloseb159a552010-04-25 21:00:44 +000010013
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010015$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010016
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010018rm -f core conftest.err conftest.$ac_objext \
10019 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010020 *) ;;
10021esac
10022
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023# check for systems that require aligned memory access
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10025$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010026if ${ac_cv_aligned_required+:} false; then :
10027 $as_echo_n "(cached) " >&6
10028else
10029 if test "$cross_compiling" = yes; then :
10030 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010031else
10032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10033/* end confdefs.h. */
10034
10035int main()
10036{
10037 char s[16];
10038 int i, *p1, *p2;
10039 for (i=0; i < 16; i++)
10040 s[i] = i;
10041 p1 = (int*)(s+1);
10042 p2 = (int*)(s+2);
10043 if (*p1 == *p2)
10044 return 1;
10045 return 0;
10046}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010047_ACEOF
10048if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010049 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010050else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010051 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010052fi
10053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10054 conftest.$ac_objext conftest.beam conftest.$ac_ext
10055fi
10056
10057
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010058fi
10059
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10061$as_echo "$ac_cv_aligned_required" >&6; }
10062if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010063
10064$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10065
10066fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010067
10068# str, bytes and memoryview hash algorithm
10069
10070
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10072$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10073
10074# Check whether --with-hash_algorithm was given.
10075if test "${with_hash_algorithm+set}" = set; then :
10076 withval=$with_hash_algorithm;
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10078$as_echo "$withval" >&6; }
10079case "$withval" in
10080 siphash24)
10081 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10082
10083 ;;
10084 fnv)
10085 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10086
10087 ;;
10088 *)
10089 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10090 ;;
10091esac
10092
10093else
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10095$as_echo "default" >&6; }
10096fi
10097
10098
Charles-François Natalid30b0222014-05-08 23:08:51 +010010099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10100$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10101
10102# Check whether --with-address_sanitizer was given.
10103if test "${with_address_sanitizer+set}" = set; then :
10104 withval=$with_address_sanitizer;
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10106$as_echo "$withval" >&6; }
10107BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10108LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith5f4d05d2018-11-12 13:48:24 -080010109# ASan works by controlling memory allocation, our own malloc interferes.
10110with_pymalloc="no"
10111
10112else
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10114$as_echo "no" >&6; }
10115fi
10116
10117
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10119$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10120
10121# Check whether --with-memory_sanitizer was given.
10122if test "${with_memory_sanitizer+set}" = set; then :
10123 withval=$with_memory_sanitizer;
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10125$as_echo "$withval" >&6; }
10126BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10127LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10128# MSan works by controlling memory allocation, our own malloc interferes.
10129with_pymalloc="no"
10130
10131else
10132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10138$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10139
10140# Check whether --with-undefined_behavior_sanitizer was given.
10141if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10142 withval=$with_undefined_behavior_sanitizer;
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10144$as_echo "$withval" >&6; }
10145BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10146LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010147
10148else
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150$as_echo "no" >&6; }
10151fi
10152
10153
Guido van Rossum70c7f481998-03-26 18:44:10 +000010154# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10156$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010157if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010159else
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010161LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165/* Override any GCC internal prototype to avoid an error.
10166 Use char because int might match the return type of a GCC
10167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168#ifdef __cplusplus
10169extern "C"
10170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010171char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010172int
10173main ()
10174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185rm -f core conftest.err conftest.$ac_objext \
10186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010187LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10190$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010191if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010192 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010193fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010194 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10196$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010201LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205/* Override any GCC internal prototype to avoid an error.
10206 Use char because int might match the return type of a GCC
10207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#ifdef __cplusplus
10209extern "C"
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010222else
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225rm -f core conftest.err conftest.$ac_objext \
10226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010227LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10230$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010231if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010232 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010233fi
10234 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010235
Matthias Kloseb9621712010-04-24 17:59:49 +000010236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10237$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010240if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010241 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10243$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010244LIBS="$withval $LIBS"
10245
10246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249fi
10250
Guido van Rossum7f43da71994-08-01 12:15:30 +000010251
Victor Stinner8291b5e2015-03-20 16:03:14 +010010252
10253
10254
10255
10256
10257
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010258
Victor Stinner8291b5e2015-03-20 16:03:14 +010010259if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10260 if test -n "$ac_tool_prefix"; then
10261 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10262set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10264$as_echo_n "checking for $ac_word... " >&6; }
10265if ${ac_cv_path_PKG_CONFIG+:} false; then :
10266 $as_echo_n "(cached) " >&6
10267else
10268 case $PKG_CONFIG in
10269 [\\/]* | ?:[\\/]*)
10270 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10271 ;;
10272 *)
10273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10274for as_dir in $PATH
10275do
10276 IFS=$as_save_IFS
10277 test -z "$as_dir" && as_dir=.
10278 for ac_exec_ext in '' $ac_executable_extensions; do
10279 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10280 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10281 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10282 break 2
10283 fi
10284done
10285 done
10286IFS=$as_save_IFS
10287
10288 ;;
10289esac
10290fi
10291PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10292if test -n "$PKG_CONFIG"; then
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10294$as_echo "$PKG_CONFIG" >&6; }
10295else
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10297$as_echo "no" >&6; }
10298fi
10299
10300
10301fi
10302if test -z "$ac_cv_path_PKG_CONFIG"; then
10303 ac_pt_PKG_CONFIG=$PKG_CONFIG
10304 # Extract the first word of "pkg-config", so it can be a program name with args.
10305set dummy pkg-config; ac_word=$2
10306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10307$as_echo_n "checking for $ac_word... " >&6; }
10308if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10309 $as_echo_n "(cached) " >&6
10310else
10311 case $ac_pt_PKG_CONFIG in
10312 [\\/]* | ?:[\\/]*)
10313 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10314 ;;
10315 *)
10316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10317for as_dir in $PATH
10318do
10319 IFS=$as_save_IFS
10320 test -z "$as_dir" && as_dir=.
10321 for ac_exec_ext in '' $ac_executable_extensions; do
10322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10323 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10325 break 2
10326 fi
10327done
10328 done
10329IFS=$as_save_IFS
10330
10331 ;;
10332esac
10333fi
10334ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10335if test -n "$ac_pt_PKG_CONFIG"; then
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10337$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10338else
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340$as_echo "no" >&6; }
10341fi
10342
10343 if test "x$ac_pt_PKG_CONFIG" = x; then
10344 PKG_CONFIG=""
10345 else
10346 case $cross_compiling:$ac_tool_warned in
10347yes:)
10348{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10349$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10350ac_tool_warned=yes ;;
10351esac
10352 PKG_CONFIG=$ac_pt_PKG_CONFIG
10353 fi
10354else
10355 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10356fi
10357
10358fi
10359if test -n "$PKG_CONFIG"; then
10360 _pkg_min_version=0.9.0
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10362$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10363 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10365$as_echo "yes" >&6; }
10366 else
10367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369 PKG_CONFIG=""
10370 fi
10371fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010372
10373# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10375$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010376
10377# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010378if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010379 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010380else
10381 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010382fi
10383
10384
Matthias Kloseb9621712010-04-24 17:59:49 +000010385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10386$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010387
10388# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10390$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010391
10392# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010394 withval=$with_system_ffi;
10395fi
10396
10397
Zachary Waref40d4dd2016-09-17 01:25:24 -050010398if test "$ac_sys_system" = "Darwin"
10399then
10400 case "$with_system_ffi" in
10401 "")
10402 with_system_ffi="no"
10403 ;;
10404 yes|no)
10405 ;;
10406 *)
10407 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10408 ;;
10409 esac
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10411$as_echo "$with_system_ffi" >&6; }
10412else
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10414$as_echo "yes" >&6; }
10415 if test "$with_system_ffi" != ""
10416 then
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10418$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10419 fi
10420 with_system_ffi="yes"
10421fi
Zachary Ware935043d2016-09-09 17:01:21 -070010422
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010423if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010424 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10425else
10426 LIBFFI_INCLUDEDIR=""
10427fi
10428
10429
Stefan Krah60187b52012-03-23 19:06:27 +010010430# Check for use of the system libmpdec library
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10432$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10433
10434# Check whether --with-system_libmpdec was given.
10435if test "${with_system_libmpdec+set}" = set; then :
10436 withval=$with_system_libmpdec;
10437else
10438 with_system_libmpdec="no"
10439fi
10440
10441
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10443$as_echo "$with_system_libmpdec" >&6; }
10444
Benjamin Peterson076ed002010-10-31 17:11:02 +000010445# Check for support for loadable sqlite extensions
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10447$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10448# Check whether --enable-loadable-sqlite-extensions was given.
10449if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10450 enableval=$enable_loadable_sqlite_extensions;
10451else
10452 enable_loadable_sqlite_extensions="no"
10453fi
10454
10455
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10457$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10458
Ned Deilyd819b932013-09-06 01:07:05 -070010459# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10460
10461
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10463$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10464
10465# Check whether --with-tcltk-includes was given.
10466if test "${with_tcltk_includes+set}" = set; then :
10467 withval=$with_tcltk_includes;
10468else
10469 with_tcltk_includes="default"
10470fi
10471
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10473$as_echo "$with_tcltk_includes" >&6; }
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10475$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10476
10477# Check whether --with-tcltk-libs was given.
10478if test "${with_tcltk_libs+set}" = set; then :
10479 withval=$with_tcltk_libs;
10480else
10481 with_tcltk_libs="default"
10482fi
10483
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10485$as_echo "$with_tcltk_libs" >&6; }
10486if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10487then
10488 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10489 then
10490 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10491 fi
10492 TCLTK_INCLUDES=""
10493 TCLTK_LIBS=""
10494else
10495 TCLTK_INCLUDES="$with_tcltk_includes"
10496 TCLTK_LIBS="$with_tcltk_libs"
10497fi
10498
Matthias Klose55708cc2009-04-30 08:06:49 +000010499# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10501$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010502
10503# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010504if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010505 withval=$with_dbmliborder;
10506if test x$with_dbmliborder = xyes
10507then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010508as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010509else
10510 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10511 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10512 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010513 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010514 fi
10515 done
10516fi
10517fi
10518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10520$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522
Martin v. Löwis11437992002-04-12 09:54:03 +000010523
10524# Templates for things AC_DEFINEd more than once.
10525# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010526
10527
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010528if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010529then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010530 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010532
10533 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010534elif test "$ac_cv_kpthread" = "yes"
10535then
10536 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010537 if test "$ac_cv_cxx_thread" = "yes"; then
10538 CXX="$CXX -Kpthread"
10539 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010541elif test "$ac_cv_kthread" = "yes"
10542then
10543 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010544 if test "$ac_cv_cxx_thread" = "yes"; then
10545 CXX="$CXX -Kthread"
10546 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010547 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548elif test "$ac_cv_pthread" = "yes"
10549then
10550 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010551 if test "$ac_cv_cxx_thread" = "yes"; then
10552 CXX="$CXX -pthread"
10553 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010555else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010556 if test ! -z "$withval" -a -d "$withval"
10557 then LDFLAGS="$LDFLAGS -L$withval"
10558 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559
10560 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010561 # define _POSIX_THREADS in unistd.h. Some apparently don't
10562 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10564$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010566/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010567
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010569#ifdef _POSIX_THREADS
10570yes
10571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
10573_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010576 unistd_defines_pthreads=yes
10577else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010578 unistd_defines_pthreads=no
10579fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010580rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010581
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10583$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010584
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010586
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010587 # Just looking for pthread_create in libpthread is not enough:
10588 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10589 # So we really have to include pthread.h, and then link.
10590 _libs=$LIBS
10591 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10593$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010595/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010596
10597#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010598#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010599
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010600void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010601int
10602main ()
10603{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010604
10605pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 ;
10607 return 0;
10608}
10609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010610if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10613$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010614 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010615
Guido van Rossum02a1c402000-02-25 19:26:31 +000010616else
Martin v. Löwis11437992002-04-12 09:54:03 +000010617
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010618 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010620if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010621
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010622 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010623
Guido van Rossumad678af1998-10-02 14:42:15 +000010624else
Guido van Rossumad678af1998-10-02 14:42:15 +000010625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10627$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010628if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630else
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010632LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636/* Override any GCC internal prototype to avoid an error.
10637 Use char because int might match the return type of a GCC
10638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010639#ifdef __cplusplus
10640extern "C"
10641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010642char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010643int
10644main ()
10645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 ;
10648 return 0;
10649}
10650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010656rm -f core conftest.err conftest.$ac_objext \
10657 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010658LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10661$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010662if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010663
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010664 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010665 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010666
Greg Steinadf63d62000-07-05 10:38:09 +000010667else
Greg Steinadf63d62000-07-05 10:38:09 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10670$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010671if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010673else
Martin v. Löwis11437992002-04-12 09:54:03 +000010674 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010675LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679/* Override any GCC internal prototype to avoid an error.
10680 Use char because int might match the return type of a GCC
10681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010682#ifdef __cplusplus
10683extern "C"
10684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010685char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
10688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 ;
10691 return 0;
10692}
10693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010696else
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010699rm -f core conftest.err conftest.$ac_objext \
10700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010701LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10704$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010705if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010706
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010707 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010708 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010709
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010710else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10713$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010714if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010716else
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010718LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722/* Override any GCC internal prototype to avoid an error.
10723 Use char because int might match the return type of a GCC
10724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010725#ifdef __cplusplus
10726extern "C"
10727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010728char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010729int
10730main ()
10731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ;
10734 return 0;
10735}
10736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010739else
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010742rm -f core conftest.err conftest.$ac_objext \
10743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10747$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010748if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010749
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010750 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010751 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010752
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010753else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10756$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010757if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010759else
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010761LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010765/* Override any GCC internal prototype to avoid an error.
10766 Use char because int might match the return type of a GCC
10767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010768#ifdef __cplusplus
10769extern "C"
10770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010771char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010772int
10773main ()
10774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ;
10777 return 0;
10778}
10779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010782else
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010785rm -f core conftest.err conftest.$ac_objext \
10786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010787LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10790$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010791if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010792
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010793 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010794 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010795
Guido van Rossumb93a8621998-05-07 13:27:32 +000010796else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010797
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010798 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10799
Guido van Rossum2d38f911996-06-26 19:47:01 +000010800fi
10801
Guido van Rossum627b2d71993-12-24 10:39:16 +000010802
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010803fi
10804
Guido van Rossum0be3e491997-05-22 20:33:33 +000010805fi
10806
Guido van Rossum49545951997-12-02 19:28:29 +000010807fi
10808
Guido van Rossumb93a8621998-05-07 13:27:32 +000010809fi
10810
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812rm -f core conftest.err conftest.$ac_objext \
10813 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10816$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010817if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010819else
Martin v. Löwis11437992002-04-12 09:54:03 +000010820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010821LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010825/* Override any GCC internal prototype to avoid an error.
10826 Use char because int might match the return type of a GCC
10827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010828#ifdef __cplusplus
10829extern "C"
10830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010831char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010832int
10833main ()
10834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 ;
10837 return 0;
10838}
10839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010842else
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010845rm -f core conftest.err conftest.$ac_objext \
10846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010847LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10850$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010851if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010852
Martin v. Löwis130fb172001-07-19 11:00:41 +000010853 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010854
Guido van Rossum627b2d71993-12-24 10:39:16 +000010855fi
10856
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010857
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010858fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010859
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010860if test "$posix_threads" = "yes"; then
10861 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864
10865 fi
10866
10867 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10868 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010869 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010870$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010871
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872 ;;
10873 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875
10876 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010877 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010879
10880 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010881 esac
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10884$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010885 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010887else
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010889 ac_cv_pthread_system_supported=no
10890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010892/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010893
10894 #include <stdio.h>
10895 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896 void *foo(void *parm) {
10897 return NULL;
10898 }
10899 main() {
10900 pthread_attr_t attr;
10901 pthread_t id;
10902 if (pthread_attr_init(&attr)) exit(-1);
10903 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10904 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10905 exit(0);
10906 }
10907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010909 ac_cv_pthread_system_supported=yes
10910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010915fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917
Guido van Rossum627b2d71993-12-24 10:39:16 +000010918fi
10919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10921$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010922 if test "$ac_cv_pthread_system_supported" = "yes"; then
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010925
10926 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 for ac_func in pthread_sigmask
10928do :
10929 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010930if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010931 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010932#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010933_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010934 case $ac_sys_system in
10935 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010938
10939 ;;
10940 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010941fi
10942done
10943
pdoxe14679c2017-10-05 00:01:56 -070010944 for ac_func in pthread_getcpuclockid
10945do :
10946 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10947if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10948 cat >>confdefs.h <<_ACEOF
10949#define HAVE_PTHREAD_GETCPUCLOCKID 1
10950_ACEOF
10951
10952fi
10953done
10954
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010955fi
10956
10957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10961$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010964 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 ipv6=no
10969 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10971$as_echo "yes" >&6; }
10972 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973
10974 ipv6=yes
10975 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977else
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981 /* AF_INET6 available check */
10982#include <sys/types.h>
10983#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010984int
10985main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010987int domain = AF_INET6;
10988 ;
10989 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990}
Martin v. Löwis11437992002-04-12 09:54:03 +000010991_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010992if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10995$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010996 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998else
Matthias Kloseb159a552010-04-25 21:00:44 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011002 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011003
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011004fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011007if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11009$as_echo_n "checking if RFC2553 API is available... " >&6; }
11010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011011/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011012
11013 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011014#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011015int
11016main ()
11017{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011018struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011019 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 ;
11021 return 0;
11022}
Matthias Kloseb159a552010-04-25 21:00:44 +000011023
Martin v. Löwis11437992002-04-12 09:54:03 +000011024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011026
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011028$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011029 ipv6=yes
11030
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011031else
Matthias Kloseb159a552010-04-25 21:00:44 +000011032
11033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011034$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011035 ipv6=no
11036
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011039fi
11040
11041if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011043
11044fi
11045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011046fi
11047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048
11049ipv6type=unknown
11050ipv6lib=none
11051ipv6trylibc=no
11052
11053if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11055$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011056 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11057 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058 case $i in
11059 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063#include <netinet/in.h>
11064#ifdef IPV6_INRIA_VERSION
11065yes
11066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011067_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011070 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011072rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073
11074 ;;
11075 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011077/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079#include <netinet/in.h>
11080#ifdef __KAME__
11081yes
11082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011083_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086 ipv6type=$i;
11087 ipv6lib=inet6
11088 ipv6libdir=/usr/local/v6/lib
11089 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011091rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092
11093 ;;
11094 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011096/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011097
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011098#include <features.h>
11099#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11100yes
11101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011102_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011104 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105 ipv6type=$i;
11106 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011108rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109
11110 ;;
11111 linux-inet6)
11112 if test -d /usr/inet6; then
11113 ipv6type=$i
11114 ipv6lib=inet6
11115 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011116 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117 fi
11118 ;;
11119 solaris)
11120 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011121 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011122 ipv6type=$i
11123 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124 fi
11125 fi
11126 ;;
11127 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131#include <sys/param.h>
11132#ifdef _TOSHIBA_INET6
11133yes
11134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138 ipv6type=$i;
11139 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011140 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143
11144 ;;
11145 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011148
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149#include </usr/local/v6/include/sys/v6config.h>
11150#ifdef __V6D__
11151yes
11152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011153_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156 ipv6type=$i;
11157 ipv6lib=v6;
11158 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011159 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011161rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162
11163 ;;
11164 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011168#include <sys/param.h>
11169#ifdef _ZETA_MINAMI_INET6
11170yes
11171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011175 ipv6type=$i;
11176 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011177 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011178fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011179rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180
11181 ;;
11182 esac
11183 if test "$ipv6type" != "unknown"; then
11184 break
11185 fi
11186 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11188$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011189fi
11190
11191if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11192 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11193 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11194 echo "using lib$ipv6lib"
11195 else
11196 if test $ipv6trylibc = "yes"; then
11197 echo "using libc"
11198 else
11199 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11200 echo "You need to fetch lib$ipv6lib.a from appropriate"
11201 echo 'ipv6 kit and compile beforehand.'
11202 exit 1
11203 fi
11204 fi
11205fi
11206
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11208$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11210/* end confdefs.h. */
11211 /* CAN_RAW_FD_FRAMES available check */
11212#include <linux/can/raw.h>
11213int
11214main ()
11215{
11216int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11217 ;
11218 return 0;
11219}
11220_ACEOF
11221if ac_fn_c_try_compile "$LINENO"; then :
11222
11223
11224$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11225
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11227$as_echo "yes" >&6; }
11228
11229else
11230
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
11233
11234fi
11235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11236
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011237# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11239$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011242if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243 withval=$with_doc_strings;
11244fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011245
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011246
11247if test -z "$with_doc_strings"
11248then with_doc_strings="yes"
11249fi
11250if test "$with_doc_strings" != "no"
11251then
11252
Matthias Kloseb9621712010-04-24 17:59:49 +000011253$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011254
11255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11257$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011258
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011259# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11261$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011264if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265 withval=$with_pymalloc;
11266fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011267
Neil Schemenauera35c6882001-02-27 04:45:05 +000011268
Neil Schemenauer16c22972002-03-22 15:34:49 +000011269if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011270then
11271 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011272fi
11273if test "$with_pymalloc" != "no"
11274then
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011277
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011278 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11281$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011282
Nick Coghlan6ea41862017-06-11 13:16:15 +100011283# Check for --with-c-locale-coercion
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11285$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11286
11287# Check whether --with-c-locale-coercion was given.
11288if test "${with_c_locale_coercion+set}" = set; then :
11289 withval=$with_c_locale_coercion;
11290fi
11291
11292
11293if test -z "$with_c_locale_coercion"
11294then
11295 with_c_locale_coercion="yes"
11296fi
11297if test "$with_c_locale_coercion" != "no"
11298then
11299
11300$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11301
11302fi
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11304$as_echo "$with_c_locale_coercion" >&6; }
11305
Benjamin Peterson05159c42009-12-03 03:01:27 +000011306# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11308$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011309
11310# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011311if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011312 withval=$with_valgrind;
11313else
11314 with_valgrind=no
11315fi
11316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11318$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011319if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011320 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 +020011321if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011324
11325else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011326 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011327
11328fi
11329
11330
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011331 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011332fi
11333
Łukasz Langaa785c872016-09-09 17:37:37 -070011334# Check for DTrace support
11335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11336$as_echo_n "checking for --with-dtrace... " >&6; }
11337
11338# Check whether --with-dtrace was given.
11339if test "${with_dtrace+set}" = set; then :
11340 withval=$with_dtrace;
11341else
11342 with_dtrace=no
11343fi
11344
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11346$as_echo "$with_dtrace" >&6; }
11347
11348
11349
11350
11351
11352DTRACE=
11353DFLAGS=
11354DTRACE_HEADERS=
11355DTRACE_OBJS=
11356
11357if test "$with_dtrace" = "yes"
11358then
11359 # Extract the first word of "dtrace", so it can be a program name with args.
11360set dummy dtrace; ac_word=$2
11361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11362$as_echo_n "checking for $ac_word... " >&6; }
11363if ${ac_cv_path_DTRACE+:} false; then :
11364 $as_echo_n "(cached) " >&6
11365else
11366 case $DTRACE in
11367 [\\/]* | ?:[\\/]*)
11368 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11369 ;;
11370 *)
11371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11372for as_dir in $PATH
11373do
11374 IFS=$as_save_IFS
11375 test -z "$as_dir" && as_dir=.
11376 for ac_exec_ext in '' $ac_executable_extensions; do
11377 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11378 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11379 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11380 break 2
11381 fi
11382done
11383 done
11384IFS=$as_save_IFS
11385
11386 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11387 ;;
11388esac
11389fi
11390DTRACE=$ac_cv_path_DTRACE
11391if test -n "$DTRACE"; then
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11393$as_echo "$DTRACE" >&6; }
11394else
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
11397fi
11398
11399
11400 if test "$DTRACE" = "not found"; then
11401 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11402 fi
11403
11404$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11405
11406 DTRACE_HEADERS="Include/pydtrace_probes.h"
11407
11408 # On OS X, DTrace providers do not need to be explicitly compiled and
11409 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11410 # generation flag '-G'. We check for presence of this flag, rather than
11411 # hardcoding support by OS, in the interest of robustness.
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11413$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11414if ${ac_cv_dtrace_link+:} false; then :
11415 $as_echo_n "(cached) " >&6
11416else
11417 ac_cv_dtrace_link=no
11418 echo 'BEGIN' > conftest.d
11419 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11420 ac_cv_dtrace_link=yes
11421
11422fi
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11424$as_echo "$ac_cv_dtrace_link" >&6; }
11425 if test "$ac_cv_dtrace_link" = "yes"; then
11426 DTRACE_OBJS="Python/pydtrace.o"
11427 fi
11428fi
11429
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011430# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011431
Guido van Rossum98935bf2001-09-05 19:13:16 +000011432DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011433
Guido van Rossume97ee181999-12-20 21:27:22 +000011434# the dlopen() function means we might want to use dynload_shlib.o. some
11435# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011436for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011437do :
11438 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011439if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011441#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011442_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011443
Guido van Rossume97ee181999-12-20 21:27:22 +000011444fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011445done
Guido van Rossume97ee181999-12-20 21:27:22 +000011446
Michael W. Hudson54241132001-12-07 15:38:26 +000011447
Guido van Rossume97ee181999-12-20 21:27:22 +000011448# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11449# loading of modules.
11450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11452$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011453if test -z "$DYNLOADFILE"
11454then
11455 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011456 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11457 if test "$ac_cv_func_dlopen" = yes
11458 then DYNLOADFILE="dynload_shlib.o"
11459 else DYNLOADFILE="dynload_aix.o"
11460 fi
11461 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011462 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011463 *)
11464 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11465 # out any dynamic loading
11466 if test "$ac_cv_func_dlopen" = yes
11467 then DYNLOADFILE="dynload_shlib.o"
11468 else DYNLOADFILE="dynload_stub.o"
11469 fi
11470 ;;
11471 esac
11472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11474$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011475if test "$DYNLOADFILE" != "dynload_stub.o"
11476then
Martin v. Löwis11437992002-04-12 09:54:03 +000011477
Matthias Kloseb9621712010-04-24 17:59:49 +000011478$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011479
11480fi
11481
Neil Schemenauer4e425612001-06-19 15:44:15 +000011482# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11483
Michael W. Hudson54241132001-12-07 15:38:26 +000011484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11486$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011487if test -z "$MACHDEP_OBJS"
11488then
Jack Jansene578a632001-08-15 01:27:14 +000011489 MACHDEP_OBJS=$extra_machdep_objs
11490else
11491 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011492fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011493if test -z "$MACHDEP_OBJS"; then
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11495$as_echo "none" >&6; }
11496else
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11498$as_echo "$MACHDEP_OBJS" >&6; }
11499fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011500
Guido van Rossum627b2d71993-12-24 10:39:16 +000011501# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011502for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011503 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011504 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011505 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011506 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011507 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011508 if_nameindex \
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011509 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011510 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011511 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011512 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011513 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011514 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011515 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011516 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011517 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11518 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011519 sigaction sigaltstack siginterrupt sigpending sigrelse \
11520 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011521 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011522 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011523 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011524do :
11525 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11526ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011527if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011529#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011530_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011532fi
11533done
11534
Michael W. Hudson54241132001-12-07 15:38:26 +000011535
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011536# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11537# links. Some libc implementations have a stub lchmod implementation that always
11538# returns an error.
11539if test "$MACHDEP" != linux; then
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011540 for ac_func in lchmod
11541do :
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011542 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11543if test "x$ac_cv_func_lchmod" = xyes; then :
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011544 cat >>confdefs.h <<_ACEOF
11545#define HAVE_LCHMOD 1
11546_ACEOF
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011547
11548fi
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011549done
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011550
11551fi
11552
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011553ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11554 #include <dirent.h>
11555"
11556if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11557
11558$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11559
11560fi
11561
11562
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011563# For some functions, having a definition is not sufficient, since
11564# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11566$as_echo_n "checking for chroot... " >&6; }
11567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570int
11571main ()
11572{
11573void *x=chroot
11574 ;
11575 return 0;
11576}
11577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011579
Matthias Kloseb9621712010-04-24 17:59:49 +000011580$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011581
Matthias Kloseb159a552010-04-25 21:00:44 +000011582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11586$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011587
11588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11591$as_echo_n "checking for link... " >&6; }
11592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011593/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011595int
11596main ()
11597{
11598void *x=link
11599 ;
11600 return 0;
11601}
11602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011606
Matthias Kloseb159a552010-04-25 21:00:44 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011608$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011612
11613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11616$as_echo_n "checking for symlink... " >&6; }
11617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011618/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011620int
11621main ()
11622{
11623void *x=symlink
11624 ;
11625 return 0;
11626}
11627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011631
Matthias Kloseb159a552010-04-25 21:00:44 +000011632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011634else
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011637
11638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11641$as_echo_n "checking for fchdir... " >&6; }
11642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011643/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644#include <unistd.h>
11645int
11646main ()
11647{
11648void *x=fchdir
11649 ;
11650 return 0;
11651}
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011656
Matthias Kloseb159a552010-04-25 21:00:44 +000011657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11661$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011662
11663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11666$as_echo_n "checking for fsync... " >&6; }
11667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669#include <unistd.h>
11670int
11671main ()
11672{
11673void *x=fsync
11674 ;
11675 return 0;
11676}
11677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011681
Matthias Kloseb159a552010-04-25 21:00:44 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11686$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011687
11688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11691$as_echo_n "checking for fdatasync... " >&6; }
11692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011693/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011694#include <unistd.h>
11695int
11696main ()
11697{
11698void *x=fdatasync
11699 ;
11700 return 0;
11701}
11702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011706
Matthias Kloseb159a552010-04-25 21:00:44 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011712
11713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11716$as_echo_n "checking for epoll... " >&6; }
11717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011718/* end confdefs.h. */
11719#include <sys/epoll.h>
11720int
11721main ()
11722{
11723void *x=epoll_create
11724 ;
11725 return 0;
11726}
11727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011731
Matthias Kloseb159a552010-04-25 21:00:44 +000011732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011737
11738fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11741$as_echo_n "checking for epoll_create1... " >&6; }
11742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11743/* end confdefs.h. */
11744#include <sys/epoll.h>
11745int
11746main ()
11747{
11748void *x=epoll_create1
11749 ;
11750 return 0;
11751}
11752_ACEOF
11753if ac_fn_c_try_compile "$LINENO"; then :
11754
11755$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11756
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11758$as_echo "yes" >&6; }
11759else
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
11762
11763fi
11764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11766$as_echo_n "checking for kqueue... " >&6; }
11767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011768/* end confdefs.h. */
11769
11770#include <sys/types.h>
11771#include <sys/event.h>
11772
11773int
11774main ()
11775{
11776int x=kqueue()
11777 ;
11778 return 0;
11779}
11780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011784
Matthias Kloseb159a552010-04-25 21:00:44 +000011785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011787else
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11789$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011790
11791fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11794$as_echo_n "checking for prlimit... " >&6; }
11795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11796/* end confdefs.h. */
11797
11798#include <sys/time.h>
11799#include <sys/resource.h>
11800
11801int
11802main ()
11803{
11804void *x=prlimit
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809if ac_fn_c_try_compile "$LINENO"; then :
11810
11811$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11812
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11814$as_echo "yes" >&6; }
11815else
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11817$as_echo "no" >&6; }
11818
11819fi
11820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11821
Martin v. Löwisd5843682002-11-21 20:41:28 +000011822# On some systems (eg. FreeBSD 5), we would find a definition of the
11823# functions ctermid_r, setgroups in the library, but no prototype
11824# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11825# address to avoid compiler warnings and potential miscompilations
11826# because of the missing prototypes.
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11829$as_echo_n "checking for ctermid_r... " >&6; }
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011832
Martin v. Löwisd5843682002-11-21 20:41:28 +000011833#include <stdio.h>
11834
Martin v. Löwisd5843682002-11-21 20:41:28 +000011835int
11836main ()
11837{
11838void* p = ctermid_r
11839 ;
11840 return 0;
11841}
11842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011846
Matthias Kloseb159a552010-04-25 21:00:44 +000011847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011848$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011852
11853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11857$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011858if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011859 $as_echo_n "(cached) " >&6
11860else
11861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011862/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011863#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011864int
11865main ()
11866{
11867void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011868
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011874 ac_cv_flock_decl=yes
11875else
11876 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011877
11878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011880
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011881fi
11882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11883$as_echo "$ac_cv_flock_decl" >&6; }
11884if test "x${ac_cv_flock_decl}" = xyes; then
11885 for ac_func in flock
11886do :
11887 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011888if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011889 cat >>confdefs.h <<_ACEOF
11890#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011891_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011892
Antoine Pitroua3000072010-09-07 14:52:42 +000011893else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011895$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011896if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011897 $as_echo_n "(cached) " >&6
11898else
11899 ac_check_lib_save_LIBS=$LIBS
11900LIBS="-lbsd $LIBS"
11901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
11903
11904/* Override any GCC internal prototype to avoid an error.
11905 Use char because int might match the return type of a GCC
11906 builtin and then its argument prototype would still apply. */
11907#ifdef __cplusplus
11908extern "C"
11909#endif
11910char flock ();
11911int
11912main ()
11913{
11914return flock ();
11915 ;
11916 return 0;
11917}
11918_ACEOF
11919if ac_fn_c_try_link "$LINENO"; then :
11920 ac_cv_lib_bsd_flock=yes
11921else
11922 ac_cv_lib_bsd_flock=no
11923fi
11924rm -f core conftest.err conftest.$ac_objext \
11925 conftest$ac_exeext conftest.$ac_ext
11926LIBS=$ac_check_lib_save_LIBS
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11929$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011931 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011932
11933
11934$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11935
11936
11937fi
11938
11939
11940fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011941done
11942
Antoine Pitroua3000072010-09-07 14:52:42 +000011943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11946$as_echo_n "checking for getpagesize... " >&6; }
11947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011949
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011950#include <unistd.h>
11951
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011952int
11953main ()
11954{
11955void* p = getpagesize
11956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011963
Matthias Kloseb159a552010-04-25 21:00:44 +000011964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011965$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011969
11970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011972
Victor Stinner984890f2011-11-24 13:53:38 +010011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11974$as_echo_n "checking for broken unsetenv... " >&6; }
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976/* end confdefs.h. */
11977
11978#include <stdlib.h>
11979
11980int
11981main ()
11982{
11983int res = unsetenv("DUMMY")
11984 ;
11985 return 0;
11986}
11987_ACEOF
11988if ac_fn_c_try_compile "$LINENO"; then :
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991else
11992
11993$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11994
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11996$as_echo "yes" >&6; }
11997
11998fi
11999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12000
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012001for ac_prog in true
12002do
12003 # Extract the first word of "$ac_prog", so it can be a program name with args.
12004set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12006$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012009else
12010 if test -n "$TRUE"; then
12011 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12012else
12013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12014for as_dir in $PATH
12015do
12016 IFS=$as_save_IFS
12017 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012020 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 $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 +000012022 break 2
12023 fi
12024done
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012026IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012027
12028fi
12029fi
12030TRUE=$ac_cv_prog_TRUE
12031if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12033$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012037fi
12038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012040 test -n "$TRUE" && break
12041done
12042test -n "$TRUE" || TRUE="/bin/true"
12043
12044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12046$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012047if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049else
12050 ac_check_lib_save_LIBS=$LIBS
12051LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012053/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055/* Override any GCC internal prototype to avoid an error.
12056 Use char because int might match the return type of a GCC
12057 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012058#ifdef __cplusplus
12059extern "C"
12060#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062int
12063main ()
12064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012071 ac_cv_lib_c_inet_aton=yes
12072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012075rm -f core conftest.err conftest.$ac_objext \
12076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077LIBS=$ac_check_lib_save_LIBS
12078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12080$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012081if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012082 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12085$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088else
12089 ac_check_lib_save_LIBS=$LIBS
12090LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012092/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094/* Override any GCC internal prototype to avoid an error.
12095 Use char because int might match the return type of a GCC
12096 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097#ifdef __cplusplus
12098extern "C"
12099#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012101int
12102main ()
12103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105 ;
12106 return 0;
12107}
12108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110 ac_cv_lib_resolv_inet_aton=yes
12111else
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116LIBS=$ac_check_lib_save_LIBS
12117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12119$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012121 cat >>confdefs.h <<_ACEOF
12122#define HAVE_LIBRESOLV 1
12123_ACEOF
12124
12125 LIBS="-lresolv $LIBS"
12126
12127fi
12128
12129
12130fi
12131
12132
Christian Heimesd0764e22007-12-04 15:00:33 +000012133# On Tru64, chflags seems to be present, but calling it will
12134# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12136$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012137if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012139else
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012141 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012144/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012145
Christian Heimesd0764e22007-12-04 15:00:33 +000012146#include <sys/stat.h>
12147#include <unistd.h>
12148int main(int argc, char*argv[])
12149{
12150 if(chflags(argv[0], 0) != 0)
12151 return 1;
12152 return 0;
12153}
Ned Deily3eb67d52011-06-28 00:00:28 -070012154
Christian Heimesd0764e22007-12-04 15:00:33 +000012155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012156if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012157 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012158else
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012163fi
12164
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12168$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012169if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012172 ac_cv_have_chflags="yes"
12173else
12174 ac_cv_have_chflags="no"
12175fi
12176
12177fi
12178if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012181
12182fi
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12185$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012186if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012190 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012193/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012194
Christian Heimesd0764e22007-12-04 15:00:33 +000012195#include <sys/stat.h>
12196#include <unistd.h>
12197int main(int argc, char*argv[])
12198{
12199 if(lchflags(argv[0], 0) != 0)
12200 return 1;
12201 return 0;
12202}
Ned Deily3eb67d52011-06-28 00:00:28 -070012203
Christian Heimesd0764e22007-12-04 15:00:33 +000012204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012205if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012206 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012207else
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12211 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012212fi
12213
12214
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12217$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012218if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012221 ac_cv_have_lchflags="yes"
12222else
12223 ac_cv_have_lchflags="no"
12224fi
12225
12226fi
12227if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012228
Matthias Kloseb9621712010-04-24 17:59:49 +000012229$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012230
12231fi
12232
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012233case $ac_sys_system/$ac_sys_release in
12234Darwin/*)
12235 _CUR_CFLAGS="${CFLAGS}"
12236 _CUR_LDFLAGS="${LDFLAGS}"
12237 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12238 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12239 ;;
12240esac
12241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12243$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012246else
12247 ac_check_lib_save_LIBS=$LIBS
12248LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012250/* end confdefs.h. */
12251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252/* Override any GCC internal prototype to avoid an error.
12253 Use char because int might match the return type of a GCC
12254 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012255#ifdef __cplusplus
12256extern "C"
12257#endif
12258char inflateCopy ();
12259int
12260main ()
12261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012268 ac_cv_lib_z_inflateCopy=yes
12269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272rm -f core conftest.err conftest.$ac_objext \
12273 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012274LIBS=$ac_check_lib_save_LIBS
12275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12277$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012281
12282fi
12283
12284
12285case $ac_sys_system/$ac_sys_release in
12286Darwin/*)
12287 CFLAGS="${_CUR_CFLAGS}"
12288 LDFLAGS="${_CUR_LDFLAGS}"
12289 ;;
12290esac
12291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12293$as_echo_n "checking for hstrerror... " >&6; }
12294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012296
Martin v. Löwise9416172003-05-03 10:12:45 +000012297#include <netdb.h>
12298
Martin v. Löwise9416172003-05-03 10:12:45 +000012299int
12300main ()
12301{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012302void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012310
Matthias Kloseb159a552010-04-25 21:00:44 +000012311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012316
12317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012318rm -f core conftest.err conftest.$ac_objext \
12319 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12322$as_echo_n "checking for inet_aton... " >&6; }
12323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012325
Martin v. Löwis86d66262006-02-17 08:40:11 +000012326#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012327#include <sys/socket.h>
12328#include <netinet/in.h>
12329#include <arpa/inet.h>
12330
Martin v. Löwise9416172003-05-03 10:12:45 +000012331int
12332main ()
12333{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012334void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012342
Matthias Kloseb159a552010-04-25 21:00:44 +000012343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012348
12349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012350rm -f core conftest.err conftest.$ac_objext \
12351 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12354$as_echo_n "checking for inet_pton... " >&6; }
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012356/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012357
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012358#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012359#include <sys/socket.h>
12360#include <netinet/in.h>
12361#include <arpa/inet.h>
12362
Martin v. Löwise9416172003-05-03 10:12:45 +000012363int
12364main ()
12365{
12366void* p = inet_pton
12367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012374
Matthias Kloseb159a552010-04-25 21:00:44 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012377else
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12379$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012380
12381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012383
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012384# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12386$as_echo_n "checking for setgroups... " >&6; }
12387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012389
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012390#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012391#ifdef HAVE_GRP_H
12392#include <grp.h>
12393#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012394
Martin v. Löwisd5843682002-11-21 20:41:28 +000012395int
12396main ()
12397{
12398void* p = setgroups
12399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012406
Matthias Kloseb159a552010-04-25 21:00:44 +000012407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012408$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012412
12413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012416# check for openpty and forkpty
12417
12418for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012419do :
12420 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012421if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12428$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012429if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012431else
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012433LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437/* Override any GCC internal prototype to avoid an error.
12438 Use char because int might match the return type of a GCC
12439 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012440#ifdef __cplusplus
12441extern "C"
12442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012443char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012444int
12445main ()
12446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457rm -f core conftest.err conftest.$ac_objext \
12458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012459LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12462$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012465 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12468$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012471else
12472 ac_check_lib_save_LIBS=$LIBS
12473LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012475/* end confdefs.h. */
12476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477/* Override any GCC internal prototype to avoid an error.
12478 Use char because int might match the return type of a GCC
12479 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012480#ifdef __cplusplus
12481extern "C"
12482#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012483char openpty ();
12484int
12485main ()
12486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012488 ;
12489 return 0;
12490}
12491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012493 ac_cv_lib_bsd_openpty=yes
12494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497rm -f core conftest.err conftest.$ac_objext \
12498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012499LIBS=$ac_check_lib_save_LIBS
12500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12502$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012503if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012505 LIBS="$LIBS -lbsd"
12506fi
12507
12508
12509fi
12510
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511
12512fi
12513done
12514
12515for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012516do :
12517 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012518if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012521_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012522
Fred Drake8cef4cf2000-06-28 16:40:38 +000012523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12525$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012528else
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534/* Override any GCC internal prototype to avoid an error.
12535 Use char because int might match the return type of a GCC
12536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012537#ifdef __cplusplus
12538extern "C"
12539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012540char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012541int
12542main ()
12543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554rm -f core conftest.err conftest.$ac_objext \
12555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012556LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12559$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012560if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012562 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12565$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012568else
12569 ac_check_lib_save_LIBS=$LIBS
12570LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012572/* end confdefs.h. */
12573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574/* Override any GCC internal prototype to avoid an error.
12575 Use char because int might match the return type of a GCC
12576 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012577#ifdef __cplusplus
12578extern "C"
12579#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012580char forkpty ();
12581int
12582main ()
12583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012585 ;
12586 return 0;
12587}
12588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590 ac_cv_lib_bsd_forkpty=yes
12591else
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012594rm -f core conftest.err conftest.$ac_objext \
12595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012596LIBS=$ac_check_lib_save_LIBS
12597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12599$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012600if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012602 LIBS="$LIBS -lbsd"
12603fi
12604
12605
12606fi
12607
Fred Drake8cef4cf2000-06-28 16:40:38 +000012608
12609fi
12610done
12611
Jack Jansendd19cf82001-12-06 22:36:17 +000012612
Michael W. Hudson54241132001-12-07 15:38:26 +000012613# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012614for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012615do :
12616 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12617ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012618if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012620#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012621_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012622
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624done
12625
Michael W. Hudson54241132001-12-07 15:38:26 +000012626
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012627ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012628if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012629 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012630
Martin v. Löwis1142de32002-03-29 16:28:31 +000012631else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012633 *" dup2.$ac_objext "* ) ;;
12634 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012636esac
12637
Martin v. Löwis1142de32002-03-29 16:28:31 +000012638fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012639
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012640ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012642 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12643
12644else
12645 case " $LIBOBJS " in
12646 *" strdup.$ac_objext "* ) ;;
12647 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12648 ;;
12649esac
12650
12651fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012652
12653
12654for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012655do :
12656 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012657if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012662/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012664int
12665main ()
12666{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 ;
12669 return 0;
12670}
12671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012675
Guido van Rossum627b2d71993-12-24 10:39:16 +000012676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012678
Guido van Rossum627b2d71993-12-24 10:39:16 +000012679fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012680done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012681
Jack Jansen150753c2003-03-29 22:07:47 +000012682for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012683do :
12684 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012685if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012691#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012692int
12693main ()
12694{
12695setpgrp(0,0);
12696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012703
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012706
12707fi
12708done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012709
Thomas Wouters3a584202000-08-05 23:28:51 +000012710for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012711do :
12712 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_compile "$LINENO"; then :
12729
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730else
Skip Montanaro6dead952003-09-25 14:50:04 +000012731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Guido van Rossum627b2d71993-12-24 10:39:16 +000012735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012739done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740
Michael W. Hudson54241132001-12-07 15:38:26 +000012741
Miss Islington (bot)a144fee2018-12-30 17:59:52 -080012742# We search for both crypt and crypt_r as one or the other may be defined
12743# This gets us our -lcrypt in LIBS when required on the target platform.
12744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12745$as_echo_n "checking for library containing crypt... " >&6; }
12746if ${ac_cv_search_crypt+:} false; then :
12747 $as_echo_n "(cached) " >&6
12748else
12749 ac_func_search_save_LIBS=$LIBS
12750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752
12753/* Override any GCC internal prototype to avoid an error.
12754 Use char because int might match the return type of a GCC
12755 builtin and then its argument prototype would still apply. */
12756#ifdef __cplusplus
12757extern "C"
12758#endif
12759char crypt ();
12760int
12761main ()
12762{
12763return crypt ();
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768for ac_lib in '' crypt; do
12769 if test -z "$ac_lib"; then
12770 ac_res="none required"
12771 else
12772 ac_res=-l$ac_lib
12773 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12774 fi
12775 if ac_fn_c_try_link "$LINENO"; then :
12776 ac_cv_search_crypt=$ac_res
12777fi
12778rm -f core conftest.err conftest.$ac_objext \
12779 conftest$ac_exeext
12780 if ${ac_cv_search_crypt+:} false; then :
12781 break
12782fi
12783done
12784if ${ac_cv_search_crypt+:} false; then :
12785
12786else
12787 ac_cv_search_crypt=no
12788fi
12789rm conftest.$ac_ext
12790LIBS=$ac_func_search_save_LIBS
12791fi
12792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12793$as_echo "$ac_cv_search_crypt" >&6; }
12794ac_res=$ac_cv_search_crypt
12795if test "$ac_res" != no; then :
12796 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12797
12798fi
12799
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12801$as_echo_n "checking for library containing crypt_r... " >&6; }
12802if ${ac_cv_search_crypt_r+:} false; then :
12803 $as_echo_n "(cached) " >&6
12804else
12805 ac_func_search_save_LIBS=$LIBS
12806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807/* end confdefs.h. */
12808
12809/* Override any GCC internal prototype to avoid an error.
12810 Use char because int might match the return type of a GCC
12811 builtin and then its argument prototype would still apply. */
12812#ifdef __cplusplus
12813extern "C"
12814#endif
12815char crypt_r ();
12816int
12817main ()
12818{
12819return crypt_r ();
12820 ;
12821 return 0;
12822}
12823_ACEOF
12824for ac_lib in '' crypt; do
12825 if test -z "$ac_lib"; then
12826 ac_res="none required"
12827 else
12828 ac_res=-l$ac_lib
12829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12830 fi
12831 if ac_fn_c_try_link "$LINENO"; then :
12832 ac_cv_search_crypt_r=$ac_res
12833fi
12834rm -f core conftest.err conftest.$ac_objext \
12835 conftest$ac_exeext
12836 if ${ac_cv_search_crypt_r+:} false; then :
12837 break
12838fi
12839done
12840if ${ac_cv_search_crypt_r+:} false; then :
12841
12842else
12843 ac_cv_search_crypt_r=no
12844fi
12845rm conftest.$ac_ext
12846LIBS=$ac_func_search_save_LIBS
12847fi
12848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12849$as_echo "$ac_cv_search_crypt_r" >&6; }
12850ac_res=$ac_cv_search_crypt_r
12851if test "$ac_res" != no; then :
12852 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12853
12854fi
12855
12856
12857ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12858if test "x$ac_cv_func_crypt_r" = xyes; then :
12859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12860/* end confdefs.h. */
12861
12862#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12863#include <crypt.h>
12864
12865int
12866main ()
12867{
12868
12869struct crypt_data d;
12870char *r = crypt_r("", "", &d);
12871
12872 ;
12873 return 0;
12874}
12875_ACEOF
12876if ac_fn_c_try_compile "$LINENO"; then :
12877
12878$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12879
12880fi
12881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12882
12883fi
12884
12885
Victor Stinnere0be4232011-10-25 13:06:09 +020012886for ac_func in clock_gettime
12887do :
12888 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12889if test "x$ac_cv_func_clock_gettime" = xyes; then :
12890 cat >>confdefs.h <<_ACEOF
12891#define HAVE_CLOCK_GETTIME 1
12892_ACEOF
12893
12894else
12895
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12897$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12898if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12899 $as_echo_n "(cached) " >&6
12900else
12901 ac_check_lib_save_LIBS=$LIBS
12902LIBS="-lrt $LIBS"
12903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12904/* end confdefs.h. */
12905
12906/* Override any GCC internal prototype to avoid an error.
12907 Use char because int might match the return type of a GCC
12908 builtin and then its argument prototype would still apply. */
12909#ifdef __cplusplus
12910extern "C"
12911#endif
12912char clock_gettime ();
12913int
12914main ()
12915{
12916return clock_gettime ();
12917 ;
12918 return 0;
12919}
12920_ACEOF
12921if ac_fn_c_try_link "$LINENO"; then :
12922 ac_cv_lib_rt_clock_gettime=yes
12923else
12924 ac_cv_lib_rt_clock_gettime=no
12925fi
12926rm -f core conftest.err conftest.$ac_objext \
12927 conftest$ac_exeext conftest.$ac_ext
12928LIBS=$ac_check_lib_save_LIBS
12929fi
12930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12931$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12932if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12933
Victor Stinner7efb8332014-08-29 15:41:08 +020012934 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12936
12937
12938$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12939
12940
12941fi
12942
12943
12944fi
12945done
12946
12947
12948for ac_func in clock_getres
12949do :
12950 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12951if test "x$ac_cv_func_clock_getres" = xyes; then :
12952 cat >>confdefs.h <<_ACEOF
12953#define HAVE_CLOCK_GETRES 1
12954_ACEOF
12955
12956else
12957
12958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12959$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12960if ${ac_cv_lib_rt_clock_getres+:} false; then :
12961 $as_echo_n "(cached) " >&6
12962else
12963 ac_check_lib_save_LIBS=$LIBS
12964LIBS="-lrt $LIBS"
12965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967
12968/* Override any GCC internal prototype to avoid an error.
12969 Use char because int might match the return type of a GCC
12970 builtin and then its argument prototype would still apply. */
12971#ifdef __cplusplus
12972extern "C"
12973#endif
12974char clock_getres ();
12975int
12976main ()
12977{
12978return clock_getres ();
12979 ;
12980 return 0;
12981}
12982_ACEOF
12983if ac_fn_c_try_link "$LINENO"; then :
12984 ac_cv_lib_rt_clock_getres=yes
12985else
12986 ac_cv_lib_rt_clock_getres=no
12987fi
12988rm -f core conftest.err conftest.$ac_objext \
12989 conftest$ac_exeext conftest.$ac_ext
12990LIBS=$ac_check_lib_save_LIBS
12991fi
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12993$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12994if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12995
12996 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12997
12998
12999fi
13000
13001
13002fi
13003done
13004
13005
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013006for ac_func in clock_settime
13007do :
13008 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13009if test "x$ac_cv_func_clock_settime" = xyes; then :
13010 cat >>confdefs.h <<_ACEOF
13011#define HAVE_CLOCK_SETTIME 1
13012_ACEOF
13013
13014else
13015
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13017$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13018if ${ac_cv_lib_rt_clock_settime+:} false; then :
13019 $as_echo_n "(cached) " >&6
13020else
13021 ac_check_lib_save_LIBS=$LIBS
13022LIBS="-lrt $LIBS"
13023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024/* end confdefs.h. */
13025
13026/* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
13029#ifdef __cplusplus
13030extern "C"
13031#endif
13032char clock_settime ();
13033int
13034main ()
13035{
13036return clock_settime ();
13037 ;
13038 return 0;
13039}
13040_ACEOF
13041if ac_fn_c_try_link "$LINENO"; then :
13042 ac_cv_lib_rt_clock_settime=yes
13043else
13044 ac_cv_lib_rt_clock_settime=no
13045fi
13046rm -f core conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
13048LIBS=$ac_check_lib_save_LIBS
13049fi
13050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13051$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13052if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13053
13054 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13055
13056
13057fi
13058
13059
13060fi
13061done
13062
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13065$as_echo_n "checking for major... " >&6; }
13066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013067/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013068
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013069#if defined(MAJOR_IN_MKDEV)
13070#include <sys/mkdev.h>
13071#elif defined(MAJOR_IN_SYSMACROS)
13072#include <sys/sysmacros.h>
13073#else
13074#include <sys/types.h>
13075#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013076
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013077int
13078main ()
13079{
13080
13081 makedev(major(0),minor(0));
13082
13083 ;
13084 return 0;
13085}
13086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013088
13089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13093$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013094
13095else
Skip Montanaro6dead952003-09-25 14:50:04 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13098$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013099
13100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101rm -f core conftest.err conftest.$ac_objext \
13102 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013103
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013104# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013105# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13107$as_echo_n "checking for getaddrinfo... " >&6; }
13108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013110
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013111#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013112#include <sys/socket.h>
13113#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013114#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116int
13117main ()
13118{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013119getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125 have_getaddrinfo=yes
13126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013129rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext conftest.$ac_ext
13131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13132$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133if test $have_getaddrinfo = yes
13134then
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13136$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013137 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139else
Matthias Kloseb9621712010-04-24 17:59:49 +000013140 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013141
13142if test "${enable_ipv6+set}" = set; then
13143 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13144else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013146fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147else
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150
Stefan Krah19c21392012-11-22 23:47:32 +010013151#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152#include <sys/types.h>
13153#include <netdb.h>
13154#include <string.h>
13155#include <sys/socket.h>
13156#include <netinet/in.h>
13157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159{
13160 int passive, gaierr, inet4 = 0, inet6 = 0;
13161 struct addrinfo hints, *ai, *aitop;
13162 char straddr[INET6_ADDRSTRLEN], strport[16];
13163
13164 for (passive = 0; passive <= 1; passive++) {
13165 memset(&hints, 0, sizeof(hints));
13166 hints.ai_family = AF_UNSPEC;
13167 hints.ai_flags = passive ? AI_PASSIVE : 0;
13168 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013169 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13171 (void)gai_strerror(gaierr);
13172 goto bad;
13173 }
13174 for (ai = aitop; ai; ai = ai->ai_next) {
13175 if (ai->ai_addr == NULL ||
13176 ai->ai_addrlen == 0 ||
13177 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13178 straddr, sizeof(straddr), strport, sizeof(strport),
13179 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13180 goto bad;
13181 }
13182 switch (ai->ai_family) {
13183 case AF_INET:
13184 if (strcmp(strport, "54321") != 0) {
13185 goto bad;
13186 }
13187 if (passive) {
13188 if (strcmp(straddr, "0.0.0.0") != 0) {
13189 goto bad;
13190 }
13191 } else {
13192 if (strcmp(straddr, "127.0.0.1") != 0) {
13193 goto bad;
13194 }
13195 }
13196 inet4++;
13197 break;
13198 case AF_INET6:
13199 if (strcmp(strport, "54321") != 0) {
13200 goto bad;
13201 }
13202 if (passive) {
13203 if (strcmp(straddr, "::") != 0) {
13204 goto bad;
13205 }
13206 } else {
13207 if (strcmp(straddr, "::1") != 0) {
13208 goto bad;
13209 }
13210 }
13211 inet6++;
13212 break;
13213 case AF_UNSPEC:
13214 goto bad;
13215 break;
13216 default:
13217 /* another family support? */
13218 break;
13219 }
13220 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013221 freeaddrinfo(aitop);
13222 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223 }
13224
13225 if (!(inet4 == 0 || inet4 == 2))
13226 goto bad;
13227 if (!(inet6 == 0 || inet6 == 2))
13228 goto bad;
13229
13230 if (aitop)
13231 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013232 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233
13234 bad:
13235 if (aitop)
13236 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013237 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238}
13239
Martin v. Löwis11437992002-04-12 09:54:03 +000013240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013246rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13247 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13255$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13256
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013257if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013258then
13259 if test $ipv6 = yes
13260 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013261 echo 'Fatal: You must get working getaddrinfo() function.'
13262 echo ' or you can specify "--disable-ipv6"'.
13263 exit 1
13264 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013265else
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013268
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013270
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013271for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013272do :
13273 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013274if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013276#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013277_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279fi
13280done
13281
Michael W. Hudson54241132001-12-07 15:38:26 +000013282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13285$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013286if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013287 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291#include <sys/types.h>
13292#include <sys/time.h>
13293#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295int
13296main ()
13297{
13298if ((struct tm *) 0)
13299return 0;
13300 ;
13301 return 0;
13302}
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13312$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013313if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316
13317fi
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13320$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013321if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013325/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326#include <sys/types.h>
13327#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
Martin v. Löwis11437992002-04-12 09:54:03 +000013329int
13330main ()
13331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332struct tm tm;
13333 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340 ac_cv_struct_tm=time.h
13341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13347$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013348if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351
13352fi
13353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354ac_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 +000013355#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357"
Victor Stinnere0be4232011-10-25 13:06:09 +020013358if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
13360cat >>confdefs.h <<_ACEOF
13361#define HAVE_STRUCT_TM_TM_ZONE 1
13362_ACEOF
13363
13364
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013370
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13373"
Victor Stinnere0be4232011-10-25 13:06:09 +020013374if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378fi
13379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013381#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382_ACEOF
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13385$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013386if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013391#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392#if !HAVE_DECL_TZNAME
13393extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396int
13397main ()
13398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ;
13401 return 0;
13402}
13403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405 ac_cv_var_tzname=yes
13406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013409rm -f core conftest.err conftest.$ac_objext \
13410 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13413$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013414 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418 fi
13419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421ac_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 +020013422if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
13424cat >>confdefs.h <<_ACEOF
13425#define HAVE_STRUCT_STAT_ST_RDEV 1
13426_ACEOF
13427
13428
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013429fi
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431ac_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 +020013432if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013433
Martin v. Löwis11437992002-04-12 09:54:03 +000013434cat >>confdefs.h <<_ACEOF
13435#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13436_ACEOF
13437
13438
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013439fi
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441ac_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 +020013442if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013443
13444cat >>confdefs.h <<_ACEOF
13445#define HAVE_STRUCT_STAT_ST_FLAGS 1
13446_ACEOF
13447
13448
13449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451ac_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 +020013452if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013453
13454cat >>confdefs.h <<_ACEOF
13455#define HAVE_STRUCT_STAT_ST_GEN 1
13456_ACEOF
13457
13458
13459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461ac_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 +020013462if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013463
13464cat >>confdefs.h <<_ACEOF
13465#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13466_ACEOF
13467
13468
13469fi
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471ac_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 +020013472if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474cat >>confdefs.h <<_ACEOF
13475#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13476_ACEOF
13477
13478
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013479fi
13480
Stefan Krah267b6392016-04-26 01:09:18 +020013481ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13482 #include <sys/types.h>
13483 #include <pwd.h>
13484
13485"
13486if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13487
13488cat >>confdefs.h <<_ACEOF
13489#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13490_ACEOF
13491
13492
13493fi
13494ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13495 #include <sys/types.h>
13496 #include <pwd.h>
13497
13498"
13499if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13500
13501cat >>confdefs.h <<_ACEOF
13502#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13503_ACEOF
13504
13505
13506fi
13507
Zachary Ware6a6967e2016-10-01 00:47:27 -050013508# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13509ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13510"
13511if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13512
13513cat >>confdefs.h <<_ACEOF
13514#define HAVE_SIGINFO_T_SI_BAND 1
13515_ACEOF
13516
13517
13518fi
13519
Michael W. Hudson54241132001-12-07 15:38:26 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13522$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013523if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525else
Matthias Kloseb159a552010-04-25 21:00:44 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013529#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013530int
13531main ()
13532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ;
13535 return 0;
13536}
13537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539 ac_cv_header_time_altzone=yes
13540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545fi
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13548$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013549if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552
13553fi
13554
Guido van Rossumda88dad1995-01-26 00:46:29 +000013555was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13557$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013559/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013560
13561#include <sys/types.h>
13562#include <sys/select.h>
13563#include <sys/time.h>
13564
Martin v. Löwis11437992002-04-12 09:54:03 +000013565int
13566main ()
13567{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568;
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013573if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
13575
Matthias Kloseb9621712010-04-24 17:59:49 +000013576$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013578 was_it_defined=yes
13579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13583$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13586$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013587if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013589else
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013591/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013592#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013593int
13594main ()
13595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 ;
13598 return 0;
13599}
13600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602 ac_cv_struct_addrinfo=yes
13603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607fi
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13610$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614
13615fi
13616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13618$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621else
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013623/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624
13625# include <sys/types.h>
13626# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013627int
13628main ()
13629{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636 ac_cv_struct_sockaddr_storage=yes
13637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641fi
13642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13644$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013645if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013648
13649fi
13650
Christian Heimesdffa3942016-09-05 23:54:41 +020013651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13652$as_echo_n "checking for sockaddr_alg... " >&6; }
13653if ${ac_cv_struct_sockaddr_alg+:} false; then :
13654 $as_echo_n "(cached) " >&6
13655else
13656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13657/* end confdefs.h. */
13658
13659# include <sys/types.h>
13660# include <sys/socket.h>
13661# include <linux/if_alg.h>
13662int
13663main ()
13664{
13665struct sockaddr_alg s
13666 ;
13667 return 0;
13668}
13669_ACEOF
13670if ac_fn_c_try_compile "$LINENO"; then :
13671 ac_cv_struct_sockaddr_alg=yes
13672else
13673 ac_cv_struct_sockaddr_alg=no
13674fi
13675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676fi
13677
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13679$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13680if test $ac_cv_struct_sockaddr_alg = yes; then
13681
13682$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13683
13684fi
13685
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13689$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013690if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013695$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013696int
13697main ()
13698{
13699static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013700test_array [0] = 0;
13701return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
13703 ;
13704 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013705}
Martin v. Löwis11437992002-04-12 09:54:03 +000013706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013707if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013708 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013709else
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13715$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718
13719fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13722$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013723if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013725else
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013727/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728
Martin v. Löwis11437992002-04-12 09:54:03 +000013729int
13730main ()
13731{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013732
Martin v. Löwis11437992002-04-12 09:54:03 +000013733#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013734 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013736 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 char const *const *pcpcc;
13739 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 /* NEC SVR4.0.2 mips cc rejects this. */
13741 struct point {int x, y;};
13742 static struct point const zero = {0,0};
13743 /* AIX XL C 1.02.0.0 rejects this.
13744 It does not let you subtract one const X* pointer from another in
13745 an arm of an if-expression whose if-part is not a constant
13746 expression */
13747 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750 ++pcpcc;
13751 ppc = (char**) pcpcc;
13752 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013753 { /* SCO 3.2v4 cc rejects this sort of thing. */
13754 char tx;
13755 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 }
13761 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13762 int x[] = {25, 17};
13763 const int *foo = &x[0];
13764 ++foo;
13765 }
13766 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13767 typedef const int *iptr;
13768 iptr p = 0;
13769 ++p;
13770 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013771 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013773 struct s { int j; const int *ap[3]; } bx;
13774 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 }
13776 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13777 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013778 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013781#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013782
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013785}
Martin v. Löwis11437992002-04-12 09:54:03 +000013786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788 ac_cv_c_const=yes
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13795$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Matthias Kloseb9621712010-04-24 17:59:49 +000013798$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799
13800fi
13801
Michael W. Hudson54241132001-12-07 15:38:26 +000013802
Guido van Rossumda88dad1995-01-26 00:46:29 +000013803works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13805$as_echo_n "checking for working signed char... " >&6; }
13806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013807/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013808
Martin v. Löwis11437992002-04-12 09:54:03 +000013809int
13810main ()
13811{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 ;
13814 return 0;
13815}
13816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013818 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013819else
Skip Montanaro6dead952003-09-25 14:50:04 +000013820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013823
Guido van Rossum7f43da71994-08-01 12:15:30 +000013824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13827$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828
Guido van Rossumda88dad1995-01-26 00:46:29 +000013829have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13831$as_echo_n "checking for prototypes... " >&6; }
13832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013835int
13836main ()
13837{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 ;
13840 return 0;
13841}
13842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013846
Matthias Kloseb159a552010-04-25 21:00:44 +000013847 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13851$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852
Guido van Rossumda88dad1995-01-26 00:46:29 +000013853works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13855$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013857/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013858
13859#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013860int foo(int x, ...) {
13861 va_list va;
13862 va_start(va, x);
13863 va_arg(va, int);
13864 va_arg(va, char *);
13865 va_arg(va, double);
13866 return 0;
13867}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013868
Martin v. Löwis11437992002-04-12 09:54:03 +000013869int
13870main ()
13871{
Guido van Rossum90eea071996-08-30 20:58:57 +000013872return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013873 ;
13874 return 0;
13875}
13876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013878
13879
Matthias Kloseb9621712010-04-24 17:59:49 +000013880$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013882 works=yes
13883
Guido van Rossum627b2d71993-12-24 10:39:16 +000013884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13887$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013888
Martin v. Löwisd6320502004-08-12 13:45:08 +000013889# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13891$as_echo_n "checking for socketpair... " >&6; }
13892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013893/* end confdefs.h. */
13894
13895#include <sys/types.h>
13896#include <sys/socket.h>
13897
13898int
13899main ()
13900{
13901void *x=socketpair
13902 ;
13903 return 0;
13904}
13905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013906if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013909
Matthias Kloseb159a552010-04-25 21:00:44 +000013910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013911$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013912else
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13914$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013915
13916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013918
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13921$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013923/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924#include <sys/types.h>
13925#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013926int
13927main ()
13928{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929struct sockaddr x;
13930x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ;
13932 return 0;
13933}
13934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013935if ac_fn_c_try_compile "$LINENO"; then :
13936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13937$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013940
13941else
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13943$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013944
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013947
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013948# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013952if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13957$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013958 OLD_CFLAGS=$CFLAGS
13959 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013962
13963# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968
13969 char *name;
13970 struct hostent *he, *res;
13971 char buffer[2048];
13972 int buflen = 2048;
13973 int h_errnop;
13974
13975 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
13977 ;
13978 return 0;
13979}
13980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013984
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13989$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991else
Skip Montanaro6dead952003-09-25 14:50:04 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13994$as_echo "no" >&6; }
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13996$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013998/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Martin v. Löwis11437992002-04-12 09:54:03 +000014002int
14003main ()
14004{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005
14006 char *name;
14007 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014008 char buffer[2048];
14009 int buflen = 2048;
14010 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011
Matthias Kloseb159a552010-04-25 21:00:44 +000014012 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014 ;
14015 return 0;
14016}
14017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Matthias Kloseb159a552010-04-25 21:00:44 +000014023$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14026$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028else
Skip Montanaro6dead952003-09-25 14:50:04 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14031$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14033$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14035/* end confdefs.h. */
14036
14037# include <netdb.h>
14038
14039int
14040main ()
14041{
14042
14043 char *name;
14044 struct hostent *he;
14045 struct hostent_data data;
14046
14047 (void) gethostbyname_r(name, he, &data);
14048
14049 ;
14050 return 0;
14051}
14052_ACEOF
14053if ac_fn_c_try_compile "$LINENO"; then :
14054
14055 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14056
14057
14058$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14059
14060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14061$as_echo "yes" >&6; }
14062
14063else
14064
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14066$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014067
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076 CFLAGS=$OLD_CFLAGS
14077
14078else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 for ac_func in gethostbyname
14081do :
14082 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014085#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014086_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014089done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092fi
14093
Michael W. Hudson54241132001-12-07 15:38:26 +000014094
14095
14096
14097
14098
14099
Guido van Rossum627b2d71993-12-24 10:39:16 +000014100# checks for system services
14101# (none yet)
14102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014103# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014104ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014105if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014106
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014107else
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14109$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112else
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014114LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118/* Override any GCC internal prototype to avoid an error.
14119 Use char because int might match the return type of a GCC
14120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014121#ifdef __cplusplus
14122extern "C"
14123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014124char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014125int
14126main ()
14127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 ;
14130 return 0;
14131}
14132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014138rm -f core conftest.err conftest.$ac_objext \
14139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014140LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14143$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014144if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 cat >>confdefs.h <<_ACEOF
14146#define HAVE_LIBIEEE 1
14147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014148
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014149 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014150
Guido van Rossum627b2d71993-12-24 10:39:16 +000014151fi
14152
Michael W. Hudson54241132001-12-07 15:38:26 +000014153
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014154fi
14155
Michael W. Hudson54241132001-12-07 15:38:26 +000014156
Guido van Rossum7f43da71994-08-01 12:15:30 +000014157# check for --with-libm=...
14158
Guido van Rossum563e7081996-09-10 18:20:48 +000014159case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014160Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014161*) LIBM=-lm
14162esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14164$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014169if test "$withval" = no
14170then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14172$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014173elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014174then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14176$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014177else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014178fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14181$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182fi
14183
Guido van Rossum7f43da71994-08-01 12:15:30 +000014184
14185# check for --with-libc=...
14186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14188$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014191if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014193if test "$withval" = no
14194then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14196$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014197elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014198then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14200$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014201else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014202fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014203else
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14205$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206fi
14207
Guido van Rossum7f43da71994-08-01 12:15:30 +000014208
Stefan Krah1919b7e2012-03-21 18:25:23 +010014209# **************************************
14210# * Check for gcc x64 inline assembler *
14211# **************************************
14212
14213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14214$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h. */
14217
14218int
14219main ()
14220{
14221
14222 __asm__ __volatile__ ("movq %rcx, %rax");
14223
14224 ;
14225 return 0;
14226}
14227_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014228if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014229 have_gcc_asm_for_x64=yes
14230else
14231 have_gcc_asm_for_x64=no
14232fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014233rm -f core conftest.err conftest.$ac_objext \
14234 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14236$as_echo "$have_gcc_asm_for_x64" >&6; }
14237if test "$have_gcc_asm_for_x64" = yes
14238then
14239
14240$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14241
14242fi
14243
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014244# **************************************************
14245# * Check for various properties of floating point *
14246# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014247
Matthias Kloseb9621712010-04-24 17:59:49 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
14249$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014250if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252else
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014255 ac_cv_little_endian_double=no
14256else
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014258/* end confdefs.h. */
14259
14260#include <string.h>
14261int main() {
14262 double x = 9006104071832581.0;
14263 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14264 return 0;
14265 else
14266 return 1;
14267}
14268
14269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014270if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014271 ac_cv_little_endian_double=yes
14272else
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14276 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014277fi
14278
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279fi
14280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14282$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014283if test "$ac_cv_little_endian_double" = yes
14284then
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287
14288fi
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14291$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014292if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014294else
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014297 ac_cv_big_endian_double=no
14298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014300/* end confdefs.h. */
14301
14302#include <string.h>
14303int main() {
14304 double x = 9006104071832581.0;
14305 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14306 return 0;
14307 else
14308 return 1;
14309}
14310
14311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014312if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014313 ac_cv_big_endian_double=yes
14314else
Matthias Kloseb9621712010-04-24 17:59:49 +000014315 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014319fi
14320
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014321fi
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14324$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325if test "$ac_cv_big_endian_double" = yes
14326then
14327
Matthias Kloseb9621712010-04-24 17:59:49 +000014328$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014329
14330fi
14331
14332# Some ARM platforms use a mixed-endian representation for doubles.
14333# While Python doesn't currently have full support for these platforms
14334# (see e.g., issue 1762561), we can at least make sure that float <-> string
14335# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14337$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014338if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014340else
14341
Matthias Kloseb9621712010-04-24 17:59:49 +000014342if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014343 ac_cv_mixed_endian_double=no
14344else
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014346/* end confdefs.h. */
14347
14348#include <string.h>
14349int main() {
14350 double x = 9006104071832581.0;
14351 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14352 return 0;
14353 else
14354 return 1;
14355}
14356
14357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014358if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014359 ac_cv_mixed_endian_double=yes
14360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014365fi
14366
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014367fi
14368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14370$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014371if test "$ac_cv_mixed_endian_double" = yes
14372then
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014375
14376fi
14377
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014378# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014379# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014380# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014381# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014382# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014383# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014384
14385# This inline assembler syntax may also work for suncc and icc,
14386# so we try it on all platforms.
14387
Matthias Kloseb9621712010-04-24 17:59:49 +000014388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14389$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014391/* end confdefs.h. */
14392
14393int
14394main ()
14395{
14396
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014397 unsigned short cw;
14398 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14399 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014400
14401 ;
14402 return 0;
14403}
14404_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014405if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014406 have_gcc_asm_for_x87=yes
14407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014409fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014410rm -f core conftest.err conftest.$ac_objext \
14411 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14413$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014414if test "$have_gcc_asm_for_x87" = yes
14415then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014416
Matthias Kloseb9621712010-04-24 17:59:49 +000014417$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014418
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14422$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14424/* end confdefs.h. */
14425
14426int
14427main ()
14428{
14429
14430 unsigned int fpcr;
14431 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14432 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14433
14434 ;
14435 return 0;
14436}
14437_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014438if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014439 have_gcc_asm_for_mc68881=yes
14440else
14441 have_gcc_asm_for_mc68881=no
14442fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014443rm -f core conftest.err conftest.$ac_objext \
14444 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14446$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14447if test "$have_gcc_asm_for_mc68881" = yes
14448then
14449
14450$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14451
14452fi
14453
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014454# Detect whether system arithmetic is subject to x87-style double
14455# rounding issues. The result of this test has little meaning on non
14456# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14457# mode is round-to-nearest and double rounding issues are present, and
14458# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14460$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014461# $BASECFLAGS may affect the result
14462ac_save_cc="$CC"
14463CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014464if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014465 ac_cv_x87_double_rounding=no
14466else
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014468/* end confdefs.h. */
14469
14470#include <stdlib.h>
14471#include <math.h>
14472int main() {
14473 volatile double x, y, z;
14474 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14475 x = 0.99999999999999989; /* 1-2**-53 */
14476 y = 1./x;
14477 if (y != 1.)
14478 exit(0);
14479 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14480 x = 1e16;
14481 y = 2.99999;
14482 z = x + y;
14483 if (z != 1e16+4.)
14484 exit(0);
14485 /* both tests show evidence of double rounding */
14486 exit(1);
14487}
14488
14489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014490if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014491 ac_cv_x87_double_rounding=no
14492else
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014497fi
14498
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014499CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14501$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014502if test "$ac_cv_x87_double_rounding" = yes
14503then
14504
Matthias Kloseb9621712010-04-24 17:59:49 +000014505$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014506
14507fi
14508
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014509# ************************************
14510# * Check for mathematical functions *
14511# ************************************
14512
14513LIBS_SAVE=$LIBS
14514LIBS="$LIBS $LIBM"
14515
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014516for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14517do :
14518 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14519ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014520if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014521 cat >>confdefs.h <<_ACEOF
14522#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14523_ACEOF
14524
14525fi
14526done
14527
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014528for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014529do :
14530 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14531ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014532if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014533 cat >>confdefs.h <<_ACEOF
14534#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14535_ACEOF
14536
14537fi
14538done
14539
14540ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14541"
Victor Stinnere0be4232011-10-25 13:06:09 +020014542if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014543 ac_have_decl=1
14544else
14545 ac_have_decl=0
14546fi
14547
14548cat >>confdefs.h <<_ACEOF
14549#define HAVE_DECL_ISINF $ac_have_decl
14550_ACEOF
14551ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14552"
Victor Stinnere0be4232011-10-25 13:06:09 +020014553if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014554 ac_have_decl=1
14555else
14556 ac_have_decl=0
14557fi
14558
14559cat >>confdefs.h <<_ACEOF
14560#define HAVE_DECL_ISNAN $ac_have_decl
14561_ACEOF
14562ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14563"
Victor Stinnere0be4232011-10-25 13:06:09 +020014564if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014565 ac_have_decl=1
14566else
14567 ac_have_decl=0
14568fi
14569
14570cat >>confdefs.h <<_ACEOF
14571#define HAVE_DECL_ISFINITE $ac_have_decl
14572_ACEOF
14573
14574
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014575# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14576# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14578$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014579if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014581else
14582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014584 ac_cv_tanh_preserves_zero_sign=no
14585else
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014587/* end confdefs.h. */
14588
14589#include <math.h>
14590#include <stdlib.h>
14591int main() {
14592 /* return 0 if either negative zeros don't exist
14593 on this platform or if negative zeros exist
14594 and tanh(-0.) == -0. */
14595 if (atan2(0., -1.) == atan2(-0., -1.) ||
14596 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14597 else exit(1);
14598}
14599
14600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014601if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014602 ac_cv_tanh_preserves_zero_sign=yes
14603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14607 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014608fi
14609
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014610fi
14611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14613$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014614if test "$ac_cv_tanh_preserves_zero_sign" = yes
14615then
14616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014618
14619fi
14620
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014621if test "$ac_cv_func_log1p" = yes
14622then
14623 # On some versions of AIX, log1p(-0.) returns 0. instead of
14624 # -0. See issue #9920.
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14626$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014627 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014628 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014629else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014630
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014631 if test "$cross_compiling" = yes; then :
14632 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014633else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14635/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014636
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014637 #include <math.h>
14638 #include <stdlib.h>
14639 int main() {
14640 /* Fail if the signs of log1p(-0.) and -0. can be
14641 distinguished. */
14642 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14643 return 0;
14644 else
14645 return 1;
14646 }
14647
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014648_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014649if ac_fn_c_try_run "$LINENO"; then :
14650 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014651else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014652 ac_cv_log1p_drops_zero_sign=yes
14653fi
14654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014656fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014657
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014658fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014659
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14661$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14662fi
14663if test "$ac_cv_log1p_drops_zero_sign" = yes
14664then
14665
14666$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14667
14668fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014669
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014670LIBS=$LIBS_SAVE
14671
Mark Dickinsona614f042009-11-28 12:48:43 +000014672# For multiprocessing module, check that sem_open
14673# actually works. For FreeBSD versions <= 7.2,
14674# the kernel module that provides POSIX semaphores
14675# isn't loaded by default, so an attempt to call
14676# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14678$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014679if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014681else
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014683 ac_cv_posix_semaphores_enabled=yes
14684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014686/* end confdefs.h. */
14687
14688#include <unistd.h>
14689#include <fcntl.h>
14690#include <stdio.h>
14691#include <semaphore.h>
14692#include <sys/stat.h>
14693
14694int main(void) {
14695 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14696 if (a == SEM_FAILED) {
14697 perror("sem_open");
14698 return 1;
14699 }
14700 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014701 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014702 return 0;
14703}
14704
14705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014706if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014707 ac_cv_posix_semaphores_enabled=yes
14708else
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014713fi
14714
14715
Mark Dickinsona614f042009-11-28 12:48:43 +000014716fi
14717
Matthias Kloseb9621712010-04-24 17:59:49 +000014718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14719$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014720if test $ac_cv_posix_semaphores_enabled = no
14721then
14722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014724
14725fi
14726
Mark Dickinson10683072009-04-18 21:18:19 +000014727# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14729$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014730if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014732else
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014734 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014737/* end confdefs.h. */
14738
14739#include <unistd.h>
14740#include <fcntl.h>
14741#include <stdio.h>
14742#include <semaphore.h>
14743#include <sys/stat.h>
14744
14745int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014746 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014747 int count;
14748 int res;
14749 if(a==SEM_FAILED){
14750 perror("sem_open");
14751 return 1;
14752
14753 }
14754 res = sem_getvalue(a, &count);
14755 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014756 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014757 return res==-1 ? 1 : 0;
14758}
14759
Mark Dickinson10683072009-04-18 21:18:19 +000014760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014762 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014763else
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014768fi
14769
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014770
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014771fi
14772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14774$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014775if test $ac_cv_broken_sem_getvalue = yes
14776then
14777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014779
14780fi
14781
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014782ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14783"
14784if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14785 ac_have_decl=1
14786else
14787 ac_have_decl=0
14788fi
14789
14790cat >>confdefs.h <<_ACEOF
14791#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14792_ACEOF
14793ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14794"
14795if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14796 ac_have_decl=1
14797else
14798 ac_have_decl=0
14799fi
14800
14801cat >>confdefs.h <<_ACEOF
14802#define HAVE_DECL_RTLD_NOW $ac_have_decl
14803_ACEOF
14804ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14805"
14806if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14807 ac_have_decl=1
14808else
14809 ac_have_decl=0
14810fi
14811
14812cat >>confdefs.h <<_ACEOF
14813#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14814_ACEOF
14815ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14816"
14817if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14818 ac_have_decl=1
14819else
14820 ac_have_decl=0
14821fi
14822
14823cat >>confdefs.h <<_ACEOF
14824#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14825_ACEOF
14826ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14827"
14828if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14829 ac_have_decl=1
14830else
14831 ac_have_decl=0
14832fi
14833
14834cat >>confdefs.h <<_ACEOF
14835#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14836_ACEOF
14837ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14838"
14839if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14840 ac_have_decl=1
14841else
14842 ac_have_decl=0
14843fi
14844
14845cat >>confdefs.h <<_ACEOF
14846#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14847_ACEOF
14848ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14849"
14850if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14851 ac_have_decl=1
14852else
14853 ac_have_decl=0
14854fi
14855
14856cat >>confdefs.h <<_ACEOF
14857#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14858_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014859ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14860"
14861if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14862 ac_have_decl=1
14863else
14864 ac_have_decl=0
14865fi
14866
14867cat >>confdefs.h <<_ACEOF
14868#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14869_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014870
14871
Mark Dickinsonbd792642009-03-18 20:06:12 +000014872# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14874$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014875# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014876if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014877 enableval=$enable_big_digits; case $enable_big_digits in
14878yes)
14879 enable_big_digits=30 ;;
14880no)
14881 enable_big_digits=15 ;;
1488215|30)
14883 ;;
14884*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014885 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 +000014886esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14888$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014889
14890cat >>confdefs.h <<_ACEOF
14891#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14892_ACEOF
14893
14894
14895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14897$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014898fi
14899
14900
Guido van Rossumef2255b2000-03-10 22:30:29 +000014901# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014902ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014903if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
14905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014908 wchar_h="yes"
14909
Guido van Rossumef2255b2000-03-10 22:30:29 +000014910else
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014912
14913fi
14914
Michael W. Hudson54241132001-12-07 15:38:26 +000014915
Martin v. Löwis11437992002-04-12 09:54:03 +000014916
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014917# determine wchar_t size
14918if test "$wchar_h" = yes
14919then
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14923# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14925$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014926if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014928else
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14930"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932else
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 if test "$ac_cv_type_wchar_t" = yes; then
14934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014936as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014937See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 else
14939 ac_cv_sizeof_wchar_t=0
14940 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14945$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946
14947
14948
Martin v. Löwis11437992002-04-12 09:54:03 +000014949cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014950#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014951_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014952
Michael W. Hudson54241132001-12-07 15:38:26 +000014953
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014954fi
14955
Matthias Kloseb9621712010-04-24 17:59:49 +000014956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14957$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014958have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014960/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014961
14962#include <tcl.h>
14963#if TCL_UTF_MAX != 6
14964# error "NOT UCS4_TCL"
14965#endif
14966int
14967main ()
14968{
14969
14970 ;
14971 return 0;
14972}
14973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014974if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014975
14976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014978
14979 have_ucs4_tcl=yes
14980
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14984$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014985
Skip Montanaro6dead952003-09-25 14:50:04 +000014986# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014987if test "$wchar_h" = yes
14988then
14989 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14991$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014992 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014994else
14995
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014997 ac_cv_wchar_t_signed=yes
14998else
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015000/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015001
15002 #include <wchar.h>
15003 int main()
15004 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015005 /* Success: exit code 0 */
15006 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015007 }
15008
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015011 ac_cv_wchar_t_signed=yes
15012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015017fi
15018
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015019fi
15020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15022$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023fi
15024
Miss Islington (bot)4973f762018-08-24 12:36:30 -040015025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15026$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015027# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015028if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015029 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015030then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
Miss Islington (bot)4973f762018-08-24 12:36:30 -040015034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15035$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015036else
Miss Islington (bot)4973f762018-08-24 12:36:30 -040015037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15038$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015039fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015040
15041# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15043$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015044if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015046else
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 ac_cv_c_bigendian=unknown
15048 # See if we're dealing with a universal compiler.
15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050/* end confdefs.h. */
15051#ifndef __APPLE_CC__
15052 not a universal capable compiler
15053 #endif
15054 typedef int dummy;
15055
Skip Montanaro6dead952003-09-25 14:50:04 +000015056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015057if ac_fn_c_try_compile "$LINENO"; then :
15058
15059 # Check for potential -arch flags. It is not universal unless
15060 # there are at least two -arch flags with different values.
15061 ac_arch=
15062 ac_prev=
15063 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15064 if test -n "$ac_prev"; then
15065 case $ac_word in
15066 i?86 | x86_64 | ppc | ppc64)
15067 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15068 ac_arch=$ac_word
15069 else
15070 ac_cv_c_bigendian=universal
15071 break
15072 fi
15073 ;;
15074 esac
15075 ac_prev=
15076 elif test "x$ac_word" = "x-arch"; then
15077 ac_prev=arch
15078 fi
15079 done
15080fi
15081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15082 if test $ac_cv_c_bigendian = unknown; then
15083 # See if sys/param.h defines the BYTE_ORDER macro.
15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015085/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015086#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015088
Martin v. Löwis11437992002-04-12 09:54:03 +000015089int
15090main ()
15091{
Matthias Kloseb9621712010-04-24 17:59:49 +000015092#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15093 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15094 && LITTLE_ENDIAN)
15095 bogus endian macros
15096 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
15098 ;
15099 return 0;
15100}
15101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015102if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015103 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015105/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015106#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015108
Martin v. Löwis11437992002-04-12 09:54:03 +000015109int
15110main ()
15111{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 not big endian
15114 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
15116 ;
15117 return 0;
15118}
15119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015121 ac_cv_c_bigendian=yes
15122else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015126fi
15127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15128 fi
15129 if test $ac_cv_c_bigendian = unknown; then
15130 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015132/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015133#include <limits.h>
15134
Martin v. Löwis11437992002-04-12 09:54:03 +000015135int
15136main ()
15137{
Matthias Kloseb9621712010-04-24 17:59:49 +000015138#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15139 bogus endian macros
15140 #endif
15141
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ;
15143 return 0;
15144}
15145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015146if ac_fn_c_try_compile "$LINENO"; then :
15147 # It does; now see whether it defined to _BIG_ENDIAN or not.
15148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15149/* end confdefs.h. */
15150#include <limits.h>
15151
15152int
15153main ()
15154{
15155#ifndef _BIG_ENDIAN
15156 not big endian
15157 #endif
15158
15159 ;
15160 return 0;
15161}
15162_ACEOF
15163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015165else
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15169fi
15170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15171 fi
15172 if test $ac_cv_c_bigendian = unknown; then
15173 # Compile a test program.
15174 if test "$cross_compiling" = yes; then :
15175 # Try to guess by grepping values from an object file.
15176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15177/* end confdefs.h. */
15178short int ascii_mm[] =
15179 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15180 short int ascii_ii[] =
15181 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15182 int use_ascii (int i) {
15183 return ascii_mm[i] + ascii_ii[i];
15184 }
15185 short int ebcdic_ii[] =
15186 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15187 short int ebcdic_mm[] =
15188 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15189 int use_ebcdic (int i) {
15190 return ebcdic_mm[i] + ebcdic_ii[i];
15191 }
15192 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193
Matthias Kloseb9621712010-04-24 17:59:49 +000015194int
15195main ()
15196{
15197return use_ascii (foo) == use_ebcdic (foo);
15198 ;
15199 return 0;
15200}
15201_ACEOF
15202if ac_fn_c_try_compile "$LINENO"; then :
15203 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15204 ac_cv_c_bigendian=yes
15205 fi
15206 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15207 if test "$ac_cv_c_bigendian" = unknown; then
15208 ac_cv_c_bigendian=no
15209 else
15210 # finding both strings is unlikely to happen, but who knows?
15211 ac_cv_c_bigendian=unknown
15212 fi
15213 fi
15214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015216else
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015218/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015220int
15221main ()
15222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 /* Are we little or big endian? From Harbison&Steele. */
15225 union
15226 {
15227 long int l;
15228 char c[sizeof (long int)];
15229 } u;
15230 u.l = 1;
15231 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232
15233 ;
15234 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015235}
Martin v. Löwis11437992002-04-12 09:54:03 +000015236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015237if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015238 ac_cv_c_bigendian=no
15239else
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15249$as_echo "$ac_cv_c_bigendian" >&6; }
15250 case $ac_cv_c_bigendian in #(
15251 yes)
15252 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15253;; #(
15254 no)
15255 ;; #(
15256 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015259
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ;; #(
15261 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015262 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015263 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015265
Michael W. Hudson54241132001-12-07 15:38:26 +000015266
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015267# ABI version string for Python extension modules. This appears between the
15268# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15269# from the following attributes which affect the ABI of this Python build (in
15270# this order):
15271#
15272# * The Python implementation (always 'cpython-' for us)
15273# * The major and minor version numbers
15274# * --with-pydebug (adds a 'd')
15275# * --with-pymalloc (adds a 'm')
15276# * --with-wide-unicode (adds a 'u')
15277#
15278# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015279# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15280# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015281
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15283$as_echo_n "checking ABIFLAGS... " >&6; }
15284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15285$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15287$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015288SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15290$as_echo "$SOABI" >&6; }
15291
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015292
15293case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015294 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015295 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15296 *)
15297 EXT_SUFFIX=${SHLIB_SUFFIX};;
15298esac
15299
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15301$as_echo_n "checking LDVERSION... " >&6; }
15302LDVERSION='$(VERSION)$(ABIFLAGS)'
15303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15304$as_echo "$LDVERSION" >&6; }
15305
doko@python.org87421192013-01-26 11:39:31 +010015306
doko@ubuntu.com55532312016-06-14 08:55:19 +020015307if test x$PLATFORM_TRIPLET = x; then
15308 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15309else
15310 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15311fi
doko@python.org87421192013-01-26 11:39:31 +010015312
15313
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015314# Check whether right shifting a negative integer extends the sign bit
15315# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15317$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015318if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015320else
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015323 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015327
15328int main()
15329{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015330 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015331}
15332
Martin v. Löwis11437992002-04-12 09:54:03 +000015333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015334if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015335 ac_cv_rshift_extends_sign=yes
15336else
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015341fi
15342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343fi
15344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15346$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015347if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015348then
Martin v. Löwis11437992002-04-12 09:54:03 +000015349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015351
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015352fi
15353
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015354# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15356$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015357if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015359else
Martin v. Löwis11437992002-04-12 09:54:03 +000015360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015362/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015363#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015364int
15365main ()
15366{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015367
15368 FILE *f = fopen("/dev/null", "r");
15369 flockfile(f);
15370 getc_unlocked(f);
15371 funlockfile(f);
15372
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 ;
15374 return 0;
15375}
15376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015377if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015378 ac_cv_have_getc_unlocked=yes
15379else
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 ac_cv_have_getc_unlocked=no
15381fi
15382rm -f core conftest.err conftest.$ac_objext \
15383 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385
Matthias Kloseb9621712010-04-24 17:59:49 +000015386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15387$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015388if test "$ac_cv_have_getc_unlocked" = yes
15389then
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
Matthias Kloseb9621712010-04-24 17:59:49 +000015391$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015392
15393fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015394
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015395# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015396# save the value of LIBS so we don't actually link Python with readline
15397LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015398
Gregory P. Smith18820942008-09-07 06:24:49 +000015399# On some systems we need to link readline to a termcap compatible
15400# library. NOTE: Keep the precedence of listed libraries synchronised
15401# with setup.py.
15402py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15404$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015405for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015406 if test -z "$py_libtermcap"; then
15407 READLINE_LIBS="-lreadline"
15408 else
15409 READLINE_LIBS="-lreadline -l$py_libtermcap"
15410 fi
15411 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015413/* end confdefs.h. */
15414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415/* Override any GCC internal prototype to avoid an error.
15416 Use char because int might match the return type of a GCC
15417 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015418#ifdef __cplusplus
15419extern "C"
15420#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015421char readline ();
15422int
15423main ()
15424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015426 ;
15427 return 0;
15428}
15429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015430if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015431 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015433rm -f core conftest.err conftest.$ac_objext \
15434 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015435 if test $py_cv_lib_readline = yes; then
15436 break
15437 fi
15438done
15439# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15440#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015441if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15443$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15446$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015447
Matthias Kloseb9621712010-04-24 17:59:49 +000015448$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015449
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015450fi
15451
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015452# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015454/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015455#include <readline/readline.h>
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015458 have_readline=yes
15459else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015460 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015461
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015462fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015463rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015464if test $have_readline = yes
15465then
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015467/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015468#include <readline/readline.h>
15469
15470_ACEOF
15471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015475
15476fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015477rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015480/* end confdefs.h. */
15481#include <readline/readline.h>
15482
15483_ACEOF
15484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015485 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015488
15489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015490rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015491
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015492fi
15493
Martin v. Löwis0daad592001-09-30 21:09:59 +000015494# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15496$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015497if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015499else
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015501LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015505/* Override any GCC internal prototype to avoid an error.
15506 Use char because int might match the return type of a GCC
15507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015508#ifdef __cplusplus
15509extern "C"
15510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015511char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015512int
15513main ()
15514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015515return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 ;
15517 return 0;
15518}
15519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015522else
Matthias Kloseb9621712010-04-24 17:59:49 +000015523 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015525rm -f core conftest.err conftest.$ac_objext \
15526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015527LIBS=$ac_check_lib_save_LIBS
15528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15530$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015531if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015534
Martin v. Löwis0daad592001-09-30 21:09:59 +000015535fi
15536
Michael W. Hudson54241132001-12-07 15:38:26 +000015537
Thomas Wouters89d996e2007-09-08 17:39:28 +000015538# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15540$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015541if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015543else
15544 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015545LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015547/* end confdefs.h. */
15548
15549/* Override any GCC internal prototype to avoid an error.
15550 Use char because int might match the return type of a GCC
15551 builtin and then its argument prototype would still apply. */
15552#ifdef __cplusplus
15553extern "C"
15554#endif
15555char rl_completion_display_matches_hook ();
15556int
15557main ()
15558{
15559return rl_completion_display_matches_hook ();
15560 ;
15561 return 0;
15562}
15563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015564if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015565 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15566else
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015569rm -f core conftest.err conftest.$ac_objext \
15570 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015571LIBS=$ac_check_lib_save_LIBS
15572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15574$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015575if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015578
15579fi
15580
15581
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015582# also in 4.0, but not in editline
15583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15584$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15585if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15586 $as_echo_n "(cached) " >&6
15587else
15588 ac_check_lib_save_LIBS=$LIBS
15589LIBS="-lreadline $READLINE_LIBS $LIBS"
15590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591/* end confdefs.h. */
15592
15593/* Override any GCC internal prototype to avoid an error.
15594 Use char because int might match the return type of a GCC
15595 builtin and then its argument prototype would still apply. */
15596#ifdef __cplusplus
15597extern "C"
15598#endif
15599char rl_resize_terminal ();
15600int
15601main ()
15602{
15603return rl_resize_terminal ();
15604 ;
15605 return 0;
15606}
15607_ACEOF
15608if ac_fn_c_try_link "$LINENO"; then :
15609 ac_cv_lib_readline_rl_resize_terminal=yes
15610else
15611 ac_cv_lib_readline_rl_resize_terminal=no
15612fi
15613rm -f core conftest.err conftest.$ac_objext \
15614 conftest$ac_exeext conftest.$ac_ext
15615LIBS=$ac_check_lib_save_LIBS
15616fi
15617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15618$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15619if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15620
15621$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15622
15623fi
15624
15625
Martin v. Löwis0daad592001-09-30 21:09:59 +000015626# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15628$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015629if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015631else
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015633LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637/* Override any GCC internal prototype to avoid an error.
15638 Use char because int might match the return type of a GCC
15639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015640#ifdef __cplusplus
15641extern "C"
15642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015643char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015644int
15645main ()
15646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 ;
15649 return 0;
15650}
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015657rm -f core conftest.err conftest.$ac_objext \
15658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015659LIBS=$ac_check_lib_save_LIBS
15660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15662$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015663if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015666
Guido van Rossum353ae582001-07-10 16:45:32 +000015667fi
15668
Jack Jansendd19cf82001-12-06 22:36:17 +000015669
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015670# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015672/* end confdefs.h. */
15673#include <readline/readline.h>
15674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015675if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015676 have_readline=yes
15677else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015678 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015679
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015680fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015681rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015682if test $have_readline = yes
15683then
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015685/* end confdefs.h. */
15686#include <readline/readline.h>
15687
15688_ACEOF
15689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015691
Matthias Kloseb9621712010-04-24 17:59:49 +000015692$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015693
15694fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015695rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015696
15697fi
15698
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15700$as_echo_n "checking for append_history in -lreadline... " >&6; }
15701if ${ac_cv_lib_readline_append_history+:} false; then :
15702 $as_echo_n "(cached) " >&6
15703else
15704 ac_check_lib_save_LIBS=$LIBS
15705LIBS="-lreadline $READLINE_LIBS $LIBS"
15706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15707/* end confdefs.h. */
15708
15709/* Override any GCC internal prototype to avoid an error.
15710 Use char because int might match the return type of a GCC
15711 builtin and then its argument prototype would still apply. */
15712#ifdef __cplusplus
15713extern "C"
15714#endif
15715char append_history ();
15716int
15717main ()
15718{
15719return append_history ();
15720 ;
15721 return 0;
15722}
15723_ACEOF
15724if ac_fn_c_try_link "$LINENO"; then :
15725 ac_cv_lib_readline_append_history=yes
15726else
15727 ac_cv_lib_readline_append_history=no
15728fi
15729rm -f core conftest.err conftest.$ac_objext \
15730 conftest$ac_exeext conftest.$ac_ext
15731LIBS=$ac_check_lib_save_LIBS
15732fi
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15734$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15735if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15736
15737$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15738
15739fi
15740
15741
Martin v. Löwis82bca632006-02-10 20:49:30 +000015742# End of readline checks: restore LIBS
15743LIBS=$LIBS_no_readline
15744
Matthias Kloseb9621712010-04-24 17:59:49 +000015745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15746$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015747if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015749else
Martin v. Löwis11437992002-04-12 09:54:03 +000015750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015752 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015753else
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015755/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015756
Benjamin Peterson03958692019-02-25 21:59:37 -080015757#include <stdlib.h>
15758#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015759int main()
15760{
15761 int val1 = nice(1);
15762 if (val1 != -1 && val1 == nice(2))
15763 exit(0);
15764 exit(1);
15765}
15766
Martin v. Löwis11437992002-04-12 09:54:03 +000015767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015768if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015769 ac_cv_broken_nice=yes
15770else
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015775fi
15776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777fi
15778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15780$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015781if test "$ac_cv_broken_nice" = yes
15782then
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
Matthias Kloseb9621712010-04-24 17:59:49 +000015784$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015785
15786fi
15787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15789$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015790if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015792else
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015794 ac_cv_broken_poll=no
15795else
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015797/* end confdefs.h. */
15798
15799#include <poll.h>
15800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015801int main()
15802{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015803 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015804 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015805
15806 close (42);
15807
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015808 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015809 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015810 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015811 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015812 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015813 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015814 return 1;
15815}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015816
15817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015818if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015819 ac_cv_broken_poll=yes
15820else
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15824 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015827fi
15828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15830$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015831if test "$ac_cv_broken_poll" = yes
15832then
15833
Matthias Kloseb9621712010-04-24 17:59:49 +000015834$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015835
15836fi
15837
Martin v. Löwis1d459062005-03-14 21:23:33 +000015838# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15840$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015841if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015843else
15844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015846 ac_cv_working_tzset=no
15847else
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015849/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015850
15851#include <stdlib.h>
15852#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015853#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015854
15855#if HAVE_TZNAME
15856extern char *tzname[];
15857#endif
15858
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015859int main()
15860{
Brett Cannon18367812003-09-19 00:59:16 +000015861 /* Note that we need to ensure that not only does tzset(3)
15862 do 'something' with localtime, but it works as documented
15863 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015864 This includes making sure that tzname is set properly if
15865 tm->tm_zone does not exist since it is the alternative way
15866 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015867
15868 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015869 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015870 */
15871
Martin v. Löwis1d459062005-03-14 21:23:33 +000015872 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015873 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15874
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015875 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015876 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015877 if (localtime(&groundhogday)->tm_hour != 0)
15878 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015879#if HAVE_TZNAME
15880 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15881 if (strcmp(tzname[0], "UTC") ||
15882 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15883 exit(1);
15884#endif
Brett Cannon18367812003-09-19 00:59:16 +000015885
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015886 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015887 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015888 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015889 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015890#if HAVE_TZNAME
15891 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15892 exit(1);
15893#endif
Brett Cannon18367812003-09-19 00:59:16 +000015894
15895 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15896 tzset();
15897 if (localtime(&groundhogday)->tm_hour != 11)
15898 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015899#if HAVE_TZNAME
15900 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15901 exit(1);
15902#endif
15903
15904#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015905 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15906 exit(1);
15907 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15908 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015909#endif
Brett Cannon18367812003-09-19 00:59:16 +000015910
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015911 exit(0);
15912}
15913
15914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015915if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015916 ac_cv_working_tzset=yes
15917else
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015922fi
15923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924fi
15925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15927$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015928if test "$ac_cv_working_tzset" = yes
15929then
15930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015932
15933fi
15934
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015935# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15937$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015938if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015939 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015942/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015943#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015944int
15945main ()
15946{
15947
15948struct stat st;
15949st.st_mtim.tv_nsec = 1;
15950
15951 ;
15952 return 0;
15953}
15954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015956 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015957else
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15961fi
15962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15964$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015965if test "$ac_cv_stat_tv_nsec" = yes
15966then
15967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015969
15970fi
15971
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015972# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15974$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015975if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015977else
Matthias Kloseb9621712010-04-24 17:59:49 +000015978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015979/* end confdefs.h. */
15980#include <sys/stat.h>
15981int
15982main ()
15983{
15984
15985struct stat st;
15986st.st_mtimespec.tv_nsec = 1;
15987
15988 ;
15989 return 0;
15990}
15991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015992if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015993 ac_cv_stat_tv_nsec2=yes
15994else
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998fi
15999
Matthias Kloseb9621712010-04-24 17:59:49 +000016000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16001$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016002if test "$ac_cv_stat_tv_nsec2" = yes
16003then
16004
Matthias Kloseb9621712010-04-24 17:59:49 +000016005$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016006
16007fi
16008
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016009# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016010ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016011if test "$cross_compiling" = no; then
16012 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16013fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016014
16015for ac_header in curses.h ncurses.h
16016do :
16017 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16018ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16019if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16020 cat >>confdefs.h <<_ACEOF
16021#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16022_ACEOF
16023
16024fi
16025
16026done
16027
16028
16029# On Solaris, term.h requires curses.h
16030for ac_header in term.h
16031do :
16032 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16033#ifdef HAVE_CURSES_H
16034#include <curses.h>
16035#endif
16036
16037"
16038if test "x$ac_cv_header_term_h" = xyes; then :
16039 cat >>confdefs.h <<_ACEOF
16040#define HAVE_TERM_H 1
16041_ACEOF
16042
16043fi
16044
16045done
16046
16047
Jack Jansen666b1e72001-10-31 12:11:48 +000016048# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16050$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016051if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016053else
Matthias Kloseb9621712010-04-24 17:59:49 +000016054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016055/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016056#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016057int
16058main ()
16059{
Jack Jansen666b1e72001-10-31 12:11:48 +000016060
16061 int rtn;
16062 rtn = mvwdelch(0,0,0);
16063
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 ;
16065 return 0;
16066}
16067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016068if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016069 ac_cv_mvwdelch_is_expression=yes
16070else
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16074fi
16075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16077$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016078
16079if test "$ac_cv_mvwdelch_is_expression" = yes
16080then
Martin v. Löwis11437992002-04-12 09:54:03 +000016081
Matthias Kloseb9621712010-04-24 17:59:49 +000016082$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016083
16084fi
16085
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016086# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16087# structs since version 5.7. If the macro is defined as zero before including
16088# [n]curses.h, ncurses will expose fields of the structs regardless of the
16089# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16091$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016092if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016093 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016094else
Matthias Kloseb9621712010-04-24 17:59:49 +000016095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016096/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016097
16098 #define NCURSES_OPAQUE 0
16099 #include <curses.h>
16100
Martin v. Löwis11437992002-04-12 09:54:03 +000016101int
16102main ()
16103{
Jack Jansen666b1e72001-10-31 12:11:48 +000016104
16105 WINDOW *w;
16106 w->_flags = 0;
16107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 ;
16109 return 0;
16110}
16111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016112if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016113 ac_cv_window_has_flags=yes
16114else
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16118fi
16119
Matthias Kloseb9621712010-04-24 17:59:49 +000016120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16121$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016122
Jack Jansen666b1e72001-10-31 12:11:48 +000016123
16124if test "$ac_cv_window_has_flags" = yes
16125then
Martin v. Löwis11437992002-04-12 09:54:03 +000016126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016128
16129fi
16130
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16132$as_echo_n "checking for is_pad... " >&6; }
16133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16134/* end confdefs.h. */
16135#include <curses.h>
16136int
16137main ()
16138{
16139
16140#ifndef is_pad
16141void *x=is_pad
16142#endif
16143
16144 ;
16145 return 0;
16146}
16147_ACEOF
16148if ac_fn_c_try_compile "$LINENO"; then :
16149
16150$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16151
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16153$as_echo "yes" >&6; }
16154else
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16156$as_echo "no" >&6; }
16157
16158fi
16159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16160
Matthias Kloseb9621712010-04-24 17:59:49 +000016161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16162$as_echo_n "checking for is_term_resized... " >&6; }
16163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016164/* end confdefs.h. */
16165#include <curses.h>
16166int
16167main ()
16168{
16169void *x=is_term_resized
16170 ;
16171 return 0;
16172}
16173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016175
Matthias Kloseb9621712010-04-24 17:59:49 +000016176$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016177
Matthias Kloseb159a552010-04-25 21:00:44 +000016178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016180else
Matthias Kloseb9621712010-04-24 17:59:49 +000016181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16182$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016183
16184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16188$as_echo_n "checking for resize_term... " >&6; }
16189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016190/* end confdefs.h. */
16191#include <curses.h>
16192int
16193main ()
16194{
16195void *x=resize_term
16196 ;
16197 return 0;
16198}
16199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016200if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016203
Matthias Kloseb159a552010-04-25 21:00:44 +000016204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016205$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016206else
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16208$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016209
16210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16212
Matthias Kloseb9621712010-04-24 17:59:49 +000016213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16214$as_echo_n "checking for resizeterm... " >&6; }
16215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016216/* end confdefs.h. */
16217#include <curses.h>
16218int
16219main ()
16220{
16221void *x=resizeterm
16222 ;
16223 return 0;
16224}
16225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016226if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016227
Matthias Kloseb9621712010-04-24 17:59:49 +000016228$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016229
Matthias Kloseb159a552010-04-25 21:00:44 +000016230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016232else
Matthias Kloseb9621712010-04-24 17:59:49 +000016233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16234$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016235
16236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016238
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16240$as_echo_n "checking for immedok... " >&6; }
16241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16242/* end confdefs.h. */
16243#include <curses.h>
16244int
16245main ()
16246{
16247
16248#ifndef immedok
16249void *x=immedok
16250#endif
16251
16252 ;
16253 return 0;
16254}
16255_ACEOF
16256if ac_fn_c_try_compile "$LINENO"; then :
16257
16258$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16259
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16261$as_echo "yes" >&6; }
16262else
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16264$as_echo "no" >&6; }
16265
16266fi
16267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16268
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16270$as_echo_n "checking for syncok... " >&6; }
16271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272/* end confdefs.h. */
16273#include <curses.h>
16274int
16275main ()
16276{
16277
16278#ifndef syncok
16279void *x=syncok
16280#endif
16281
16282 ;
16283 return 0;
16284}
16285_ACEOF
16286if ac_fn_c_try_compile "$LINENO"; then :
16287
16288$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16289
16290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16291$as_echo "yes" >&6; }
16292else
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16294$as_echo "no" >&6; }
16295
16296fi
16297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16298
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16300$as_echo_n "checking for wchgat... " >&6; }
16301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16302/* end confdefs.h. */
16303#include <curses.h>
16304int
16305main ()
16306{
16307
16308#ifndef wchgat
16309void *x=wchgat
16310#endif
16311
16312 ;
16313 return 0;
16314}
16315_ACEOF
16316if ac_fn_c_try_compile "$LINENO"; then :
16317
16318$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16319
16320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16321$as_echo "yes" >&6; }
16322else
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16324$as_echo "no" >&6; }
16325
16326fi
16327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16328
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16330$as_echo_n "checking for filter... " >&6; }
16331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332/* end confdefs.h. */
16333#include <curses.h>
16334int
16335main ()
16336{
16337
16338#ifndef filter
16339void *x=filter
16340#endif
16341
16342 ;
16343 return 0;
16344}
16345_ACEOF
16346if ac_fn_c_try_compile "$LINENO"; then :
16347
16348$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16349
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16351$as_echo "yes" >&6; }
16352else
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16354$as_echo "no" >&6; }
16355
16356fi
16357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16358
16359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16360$as_echo_n "checking for has_key... " >&6; }
16361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16362/* end confdefs.h. */
16363#include <curses.h>
16364int
16365main ()
16366{
16367
16368#ifndef has_key
16369void *x=has_key
16370#endif
16371
16372 ;
16373 return 0;
16374}
16375_ACEOF
16376if ac_fn_c_try_compile "$LINENO"; then :
16377
16378$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16379
16380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16381$as_echo "yes" >&6; }
16382else
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16384$as_echo "no" >&6; }
16385
16386fi
16387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16388
16389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16390$as_echo_n "checking for typeahead... " >&6; }
16391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16392/* end confdefs.h. */
16393#include <curses.h>
16394int
16395main ()
16396{
16397
16398#ifndef typeahead
16399void *x=typeahead
16400#endif
16401
16402 ;
16403 return 0;
16404}
16405_ACEOF
16406if ac_fn_c_try_compile "$LINENO"; then :
16407
16408$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16409
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16411$as_echo "yes" >&6; }
16412else
16413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16414$as_echo "no" >&6; }
16415
16416fi
16417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16418
16419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16420$as_echo_n "checking for use_env... " >&6; }
16421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16422/* end confdefs.h. */
16423#include <curses.h>
16424int
16425main ()
16426{
16427
16428#ifndef use_env
16429void *x=use_env
16430#endif
16431
16432 ;
16433 return 0;
16434}
16435_ACEOF
16436if ac_fn_c_try_compile "$LINENO"; then :
16437
16438$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16439
16440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16441$as_echo "yes" >&6; }
16442else
16443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16444$as_echo "no" >&6; }
16445
16446fi
16447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016448# last curses configure check
16449CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16452$as_echo "$as_me: checking for device files" >&6;}
16453
16454if test "x$cross_compiling" = xyes; then
16455 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16457$as_echo_n "checking for /dev/ptmx... " >&6; }
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16459$as_echo "not set" >&6; }
16460 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16461 fi
16462 if test "${ac_cv_file__dev_ptc+set}" != set; then
16463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16464$as_echo_n "checking for /dev/ptc... " >&6; }
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16466$as_echo "not set" >&6; }
16467 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16468 fi
16469fi
16470
Matthias Kloseb9621712010-04-24 17:59:49 +000016471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16472$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016473if ${ac_cv_file__dev_ptmx+:} false; then :
16474 $as_echo_n "(cached) " >&6
16475else
16476 test "$cross_compiling" = yes &&
16477 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16478if test -r "/dev/ptmx"; then
16479 ac_cv_file__dev_ptmx=yes
16480else
16481 ac_cv_file__dev_ptmx=no
16482fi
16483fi
16484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16485$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16486if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016487
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016488fi
16489
16490if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016491
Matthias Kloseb9621712010-04-24 17:59:49 +000016492$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016493
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16496$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016497if ${ac_cv_file__dev_ptc+:} false; then :
16498 $as_echo_n "(cached) " >&6
16499else
16500 test "$cross_compiling" = yes &&
16501 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16502if test -r "/dev/ptc"; then
16503 ac_cv_file__dev_ptc=yes
16504else
16505 ac_cv_file__dev_ptc=no
16506fi
16507fi
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16509$as_echo "$ac_cv_file__dev_ptc" >&6; }
16510if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016511
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016512fi
16513
16514if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016515
Matthias Kloseb9621712010-04-24 17:59:49 +000016516$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016517
Neal Norwitz865400f2003-03-21 01:42:58 +000016518fi
16519
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016520if test $ac_sys_system = Darwin
16521then
16522 LIBS="$LIBS -framework CoreFoundation"
16523fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016524
Matthias Kloseb9621712010-04-24 17:59:49 +000016525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16526$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016527if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016528 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016529else
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016531 ac_cv_have_size_t_format="cross -- assuming yes"
16532
Thomas Wouters477c8d52006-05-27 19:21:47 +000016533else
Matthias Kloseb9621712010-04-24 17:59:49 +000016534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016535/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016536
Thomas Wouters477c8d52006-05-27 19:21:47 +000016537#include <stdio.h>
16538#include <stddef.h>
16539#include <string.h>
16540
Christian Heimes2c181612007-12-17 20:04:13 +000016541#ifdef HAVE_SYS_TYPES_H
16542#include <sys/types.h>
16543#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016544
16545#ifdef HAVE_SSIZE_T
16546typedef ssize_t Py_ssize_t;
16547#elif SIZEOF_VOID_P == SIZEOF_LONG
16548typedef long Py_ssize_t;
16549#else
16550typedef int Py_ssize_t;
16551#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016552
Christian Heimes2c181612007-12-17 20:04:13 +000016553int main()
16554{
16555 char buffer[256];
16556
Thomas Wouters477c8d52006-05-27 19:21:47 +000016557 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16558 return 1;
16559
Thomas Wouters89f507f2006-12-13 04:49:30 +000016560 if (strcmp(buffer, "123"))
16561 return 1;
16562
16563 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16564 return 1;
16565
16566 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016567 return 1;
16568
16569 return 0;
16570}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016571
Thomas Wouters477c8d52006-05-27 19:21:47 +000016572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016573if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016574 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016575else
Matthias Kloseb9621712010-04-24 17:59:49 +000016576 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016580fi
16581
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16584$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016585if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016586
Matthias Kloseb9621712010-04-24 17:59:49 +000016587$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016588
16589fi
16590
Matthias Kloseb9621712010-04-24 17:59:49 +000016591ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016592#ifdef HAVE_SYS_TYPES_H
16593#include <sys/types.h>
16594#endif
16595#ifdef HAVE_SYS_SOCKET_H
16596#include <sys/socket.h>
16597#endif
16598
Matthias Kloseb9621712010-04-24 17:59:49 +000016599"
Victor Stinnere0be4232011-10-25 13:06:09 +020016600if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016603
Matthias Kloseb9621712010-04-24 17:59:49 +000016604$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016605
16606fi
16607
Michael W. Hudson54241132001-12-07 15:38:26 +000016608
Matthias Kloseb9621712010-04-24 17:59:49 +000016609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16610$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016611if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016612 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016613else
Matthias Kloseb9621712010-04-24 17:59:49 +000016614 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016615 ac_cv_broken_mbstowcs=no
16616else
Matthias Kloseb9621712010-04-24 17:59:49 +000016617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016618/* end confdefs.h. */
16619
Stefan Krah19c21392012-11-22 23:47:32 +010016620#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016621#include<stdlib.h>
16622int main() {
16623 size_t len = -1;
16624 const char *str = "text";
16625 len = mbstowcs(NULL, str, 0);
16626 return (len != 4);
16627}
16628
16629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016630if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016631 ac_cv_broken_mbstowcs=no
16632else
Matthias Kloseb9621712010-04-24 17:59:49 +000016633 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016637fi
16638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016639fi
16640
Matthias Kloseb9621712010-04-24 17:59:49 +000016641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16642$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016643if test "$ac_cv_broken_mbstowcs" = yes
16644then
16645
Matthias Kloseb9621712010-04-24 17:59:49 +000016646$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016647
16648fi
16649
Antoine Pitroub52ec782009-01-25 16:34:23 +000016650# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16652$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016653
16654# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016655if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016656 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016657if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016658then
16659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016661
Matthias Kloseb9621712010-04-24 17:59:49 +000016662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16663$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016664fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016665if test "$withval" = no
16666then
16667
16668$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16669
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16671$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016672fi
16673
Antoine Pitrou042b1282010-08-13 21:15:58 +000016674else
16675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16676$as_echo "no value specified" >&6; }
16677fi
16678
Antoine Pitroub52ec782009-01-25 16:34:23 +000016679
Matthias Kloseb17289e2012-03-15 19:51:34 +010016680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16681$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16682if ${ac_cv_computed_gotos+:} false; then :
16683 $as_echo_n "(cached) " >&6
16684else
16685 if test "$cross_compiling" = yes; then :
16686 if test "${with_computed_gotos+set}" = set; then
16687 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16688 else
16689 ac_cv_computed_gotos=no
16690 fi
16691else
16692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16693/* end confdefs.h. */
16694
16695int main(int argc, char **argv)
16696{
16697 static void *targets[1] = { &&LABEL1 };
16698 goto LABEL2;
16699LABEL1:
16700 return 0;
16701LABEL2:
16702 goto *targets[0];
16703 return 1;
16704}
16705
16706_ACEOF
16707if ac_fn_c_try_run "$LINENO"; then :
16708 ac_cv_computed_gotos=yes
16709else
16710 ac_cv_computed_gotos=no
16711fi
16712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16713 conftest.$ac_objext conftest.beam conftest.$ac_ext
16714fi
16715
16716fi
16717
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16719$as_echo "$ac_cv_computed_gotos" >&6; }
16720case "$ac_cv_computed_gotos" in yes*)
16721
16722$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16723
16724esac
16725
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016726case $ac_sys_system in
16727AIX*)
16728
16729$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16730 ;;
16731esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016732
Michael W. Hudson54241132001-12-07 15:38:26 +000016733
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016734
16735
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016736for h in `(cd $srcdir;echo Python/thread_*.h)`
16737do
16738 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16739done
16740
Michael W. Hudson54241132001-12-07 15:38:26 +000016741
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016742SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16744$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016745for dir in $SRCDIRS; do
16746 if test ! -d $dir; then
16747 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016748 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016749done
Matthias Kloseb9621712010-04-24 17:59:49 +000016750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16751$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016752
Stefan Krah1919b7e2012-03-21 18:25:23 +010016753# Availability of -O2:
16754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16755$as_echo_n "checking for -O2... " >&6; }
16756saved_cflags="$CFLAGS"
16757CFLAGS="-O2"
16758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16759/* end confdefs.h. */
16760
16761int
16762main ()
16763{
16764
16765
16766 ;
16767 return 0;
16768}
16769_ACEOF
16770if ac_fn_c_try_compile "$LINENO"; then :
16771 have_O2=yes
16772else
16773 have_O2=no
16774fi
16775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16777$as_echo "$have_O2" >&6; }
16778CFLAGS="$saved_cflags"
16779
16780# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16781# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16783$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16784saved_cflags="$CFLAGS"
16785CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16786if test "$have_O2" = no; then
16787 CFLAGS=""
16788fi
16789if test "$cross_compiling" = yes; then :
16790 have_glibc_memmove_bug=undefined
16791else
16792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16793/* end confdefs.h. */
16794
16795#include <stdio.h>
16796#include <stdlib.h>
16797#include <string.h>
16798void foo(void *p, void *q) { memmove(p, q, 19); }
16799int main() {
16800 char a[32] = "123456789000000000";
16801 foo(&a[9], a);
16802 if (strcmp(a, "123456789123456789000000000") != 0)
16803 return 1;
16804 foo(a, &a[9]);
16805 if (strcmp(a, "123456789000000000") != 0)
16806 return 1;
16807 return 0;
16808}
16809
16810_ACEOF
16811if ac_fn_c_try_run "$LINENO"; then :
16812 have_glibc_memmove_bug=no
16813else
16814 have_glibc_memmove_bug=yes
16815fi
16816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16817 conftest.$ac_objext conftest.beam conftest.$ac_ext
16818fi
16819
16820CFLAGS="$saved_cflags"
16821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16822$as_echo "$have_glibc_memmove_bug" >&6; }
16823if test "$have_glibc_memmove_bug" = yes; then
16824
16825$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16826
16827fi
16828
16829if test "$have_gcc_asm_for_x87" = yes; then
16830 # Some versions of gcc miscompile inline asm:
16831 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16832 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16833 case $CC in
16834 *gcc*)
16835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16836$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16837 saved_cflags="$CFLAGS"
16838 CFLAGS="-O2"
16839 if test "$cross_compiling" = yes; then :
16840 have_ipa_pure_const_bug=undefined
16841else
16842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16843/* end confdefs.h. */
16844
16845 __attribute__((noinline)) int
16846 foo(int *p) {
16847 int r;
16848 asm ( "movl \$6, (%1)\n\t"
16849 "xorl %0, %0\n\t"
16850 : "=r" (r) : "r" (p) : "memory"
16851 );
16852 return r;
16853 }
16854 int main() {
16855 int p = 8;
16856 if ((foo(&p) ? : p) != 6)
16857 return 1;
16858 return 0;
16859 }
16860
16861_ACEOF
16862if ac_fn_c_try_run "$LINENO"; then :
16863 have_ipa_pure_const_bug=no
16864else
16865 have_ipa_pure_const_bug=yes
16866fi
16867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16868 conftest.$ac_objext conftest.beam conftest.$ac_ext
16869fi
16870
16871 CFLAGS="$saved_cflags"
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16873$as_echo "$have_ipa_pure_const_bug" >&6; }
16874 if test "$have_ipa_pure_const_bug" = yes; then
16875
16876$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16877
16878 fi
16879 ;;
16880 esac
16881fi
16882
Victor Stinner4f5366e2015-01-09 02:13:19 +010016883# Check for stdatomic.h
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16885$as_echo_n "checking for stdatomic.h... " >&6; }
16886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16887/* end confdefs.h. */
16888
16889
16890 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016891 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016892 int main() {
16893 int loaded_value = atomic_load(&value);
16894 return 0;
16895 }
16896
16897
16898_ACEOF
16899if ac_fn_c_try_link "$LINENO"; then :
16900 have_stdatomic_h=yes
16901else
16902 have_stdatomic_h=no
16903fi
16904rm -f core conftest.err conftest.$ac_objext \
16905 conftest$ac_exeext conftest.$ac_ext
16906
16907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16908$as_echo "$have_stdatomic_h" >&6; }
16909
16910if test "$have_stdatomic_h" = yes; then
16911
16912$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16913
16914fi
16915
16916# Check for GCC >= 4.7 __atomic builtins
16917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16918$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16920/* end confdefs.h. */
16921
16922
16923 volatile int val = 1;
16924 int main() {
16925 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16926 return 0;
16927 }
16928
16929
16930_ACEOF
16931if ac_fn_c_try_link "$LINENO"; then :
16932 have_builtin_atomic=yes
16933else
16934 have_builtin_atomic=no
16935fi
16936rm -f core conftest.err conftest.$ac_objext \
16937 conftest$ac_exeext conftest.$ac_ext
16938
16939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16940$as_echo "$have_builtin_atomic" >&6; }
16941
16942if test "$have_builtin_atomic" = yes; then
16943
16944$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16945
16946fi
16947
Ned Deily322f5ba2013-11-21 23:01:59 -080016948# ensurepip option
16949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16950$as_echo_n "checking for ensurepip... " >&6; }
16951
16952# Check whether --with-ensurepip was given.
16953if test "${with_ensurepip+set}" = set; then :
16954 withval=$with_ensurepip;
16955else
16956 with_ensurepip=upgrade
16957fi
16958
16959case $with_ensurepip in #(
16960 yes|upgrade) :
16961 ENSUREPIP=upgrade ;; #(
16962 install) :
16963 ENSUREPIP=install ;; #(
16964 no) :
16965 ENSUREPIP=no ;; #(
16966 *) :
16967 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16968esac
16969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16970$as_echo "$ENSUREPIP" >&6; }
16971
16972
Victor Stinner35a97c02015-03-08 02:59:09 +010016973# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16975$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16977/* end confdefs.h. */
16978
16979
16980 #include <dirent.h>
16981
16982 int main() {
16983 struct dirent entry;
16984 return entry.d_type == DT_UNKNOWN;
16985 }
16986
16987
16988_ACEOF
16989if ac_fn_c_try_link "$LINENO"; then :
16990 have_dirent_d_type=yes
16991else
16992 have_dirent_d_type=no
16993fi
16994rm -f core conftest.err conftest.$ac_objext \
16995 conftest$ac_exeext conftest.$ac_ext
16996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16997$as_echo "$have_dirent_d_type" >&6; }
16998
16999if test "$have_dirent_d_type" = yes; then
17000
17001$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17002
17003fi
17004
Victor Stinner9eb57c52015-03-19 22:21:49 +010017005# check if the Linux getrandom() syscall is available
17006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17007$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17009/* end confdefs.h. */
17010
17011
Victor Stinner1b80b242016-04-12 22:34:58 +020017012 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017013 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017014 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017015
17016 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017017 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017018 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017019 const int flags = GRND_NONBLOCK;
17020 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017021 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017022 return 0;
17023 }
17024
17025
17026_ACEOF
17027if ac_fn_c_try_link "$LINENO"; then :
17028 have_getrandom_syscall=yes
17029else
17030 have_getrandom_syscall=no
17031fi
17032rm -f core conftest.err conftest.$ac_objext \
17033 conftest$ac_exeext conftest.$ac_ext
17034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17035$as_echo "$have_getrandom_syscall" >&6; }
17036
17037if test "$have_getrandom_syscall" = yes; then
17038
17039$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17040
17041fi
17042
Victor Stinner3abf44e2015-09-18 15:38:37 +020017043# check if the getrandom() function is available
17044# the test was written for the Solaris function of <sys/random.h>
17045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17046$as_echo_n "checking for the getrandom() function... " >&6; }
17047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17048/* end confdefs.h. */
17049
17050
17051 #include <sys/random.h>
17052
17053 int main() {
17054 char buffer[1];
17055 const size_t buflen = sizeof(buffer);
17056 const int flags = 0;
17057 /* ignore the result, Python checks for ENOSYS at runtime */
17058 (void)getrandom(buffer, buflen, flags);
17059 return 0;
17060 }
17061
17062
17063_ACEOF
17064if ac_fn_c_try_link "$LINENO"; then :
17065 have_getrandom=yes
17066else
17067 have_getrandom=no
17068fi
17069rm -f core conftest.err conftest.$ac_objext \
17070 conftest$ac_exeext conftest.$ac_ext
17071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17072$as_echo "$have_getrandom" >&6; }
17073
17074if test "$have_getrandom" = yes; then
17075
17076$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17077
17078fi
17079
Christian Heimesff5be6e2018-01-20 13:19:21 +010017080# Check for usable OpenSSL
17081
17082 found=false
17083
17084# Check whether --with-openssl was given.
17085if test "${with_openssl+set}" = set; then :
17086 withval=$with_openssl;
17087 case "$withval" in
17088 "" | y | ye | yes | n | no)
17089 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17090 ;;
17091 *) ssldirs="$withval"
17092 ;;
17093 esac
17094
17095else
17096
17097 # if pkg-config is installed and openssl has installed a .pc file,
17098 # then use that information and don't search ssldirs
17099 if test -n "$ac_tool_prefix"; then
17100 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17101set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17103$as_echo_n "checking for $ac_word... " >&6; }
17104if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17105 $as_echo_n "(cached) " >&6
17106else
17107 if test -n "$PKG_CONFIG"; then
17108 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17109else
17110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17111for as_dir in $PATH
17112do
17113 IFS=$as_save_IFS
17114 test -z "$as_dir" && as_dir=.
17115 for ac_exec_ext in '' $ac_executable_extensions; do
17116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17117 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17119 break 2
17120 fi
17121done
17122 done
17123IFS=$as_save_IFS
17124
17125fi
17126fi
17127PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17128if test -n "$PKG_CONFIG"; then
17129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17130$as_echo "$PKG_CONFIG" >&6; }
17131else
17132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17133$as_echo "no" >&6; }
17134fi
17135
17136
17137fi
17138if test -z "$ac_cv_prog_PKG_CONFIG"; then
17139 ac_ct_PKG_CONFIG=$PKG_CONFIG
17140 # Extract the first word of "pkg-config", so it can be a program name with args.
17141set dummy pkg-config; ac_word=$2
17142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17143$as_echo_n "checking for $ac_word... " >&6; }
17144if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17145 $as_echo_n "(cached) " >&6
17146else
17147 if test -n "$ac_ct_PKG_CONFIG"; then
17148 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17149else
17150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17151for as_dir in $PATH
17152do
17153 IFS=$as_save_IFS
17154 test -z "$as_dir" && as_dir=.
17155 for ac_exec_ext in '' $ac_executable_extensions; do
17156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17157 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17159 break 2
17160 fi
17161done
17162 done
17163IFS=$as_save_IFS
17164
17165fi
17166fi
17167ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17168if test -n "$ac_ct_PKG_CONFIG"; then
17169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17170$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17171else
17172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17173$as_echo "no" >&6; }
17174fi
17175
17176 if test "x$ac_ct_PKG_CONFIG" = x; then
17177 PKG_CONFIG=""
17178 else
17179 case $cross_compiling:$ac_tool_warned in
17180yes:)
17181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17183ac_tool_warned=yes ;;
17184esac
17185 PKG_CONFIG=$ac_ct_PKG_CONFIG
17186 fi
17187else
17188 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17189fi
17190
17191 if test x"$PKG_CONFIG" != x""; then
17192 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17193 if test $? = 0; then
17194 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17195 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17196 found=true
17197 fi
17198 fi
17199
17200 # no such luck; use some default ssldirs
17201 if ! $found; then
17202 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17203 fi
17204
17205
17206fi
17207
17208
17209
17210 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17211 # an 'openssl' subdirectory
17212
17213 if ! $found; then
17214 OPENSSL_INCLUDES=
17215 for ssldir in $ssldirs; do
17216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17217$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17218 if test -f "$ssldir/include/openssl/ssl.h"; then
17219 OPENSSL_INCLUDES="-I$ssldir/include"
17220 OPENSSL_LDFLAGS="-L$ssldir/lib"
17221 OPENSSL_LIBS="-lssl -lcrypto"
17222 found=true
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17224$as_echo "yes" >&6; }
17225 break
17226 else
17227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17228$as_echo "no" >&6; }
17229 fi
17230 done
17231
17232 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17233 # it will just work!
17234 fi
17235
17236 # try the preprocessor and linker with our new flags,
17237 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17238
17239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17240$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17241 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17242 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17243
17244 save_LIBS="$LIBS"
17245 save_LDFLAGS="$LDFLAGS"
17246 save_CPPFLAGS="$CPPFLAGS"
17247 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17248 LIBS="$OPENSSL_LIBS $LIBS"
17249 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17251/* end confdefs.h. */
17252#include <openssl/ssl.h>
17253int
17254main ()
17255{
17256SSL_new(NULL)
17257 ;
17258 return 0;
17259}
17260_ACEOF
17261if ac_fn_c_try_link "$LINENO"; then :
17262
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17264$as_echo "yes" >&6; }
17265 have_openssl=yes
17266
17267else
17268
17269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17270$as_echo "no" >&6; }
17271 have_openssl=no
17272
17273fi
17274rm -f core conftest.err conftest.$ac_objext \
17275 conftest$ac_exeext conftest.$ac_ext
17276 CPPFLAGS="$save_CPPFLAGS"
17277 LDFLAGS="$save_LDFLAGS"
17278 LIBS="$save_LIBS"
17279
17280
17281
17282
17283
17284
17285if test "$have_openssl" = yes; then
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17287$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17288
17289 save_LIBS="$LIBS"
17290 save_LDFLAGS="$LDFLAGS"
17291 save_CPPFLAGS="$CPPFLAGS"
17292 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17293 LIBS="$OPENSSL_LIBS $LIBS"
17294 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17295
17296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17297/* end confdefs.h. */
17298
17299 #include <openssl/x509_vfy.h>
17300
17301int
17302main ()
17303{
17304
17305 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17306 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17307 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17308 X509_VERIFY_PARAM_set_hostflags(p, 0);
17309
17310 ;
17311 return 0;
17312}
17313
17314_ACEOF
17315if ac_fn_c_try_link "$LINENO"; then :
17316
17317 ac_cv_has_x509_verify_param_set1_host=yes
17318
17319else
17320
17321 ac_cv_has_x509_verify_param_set1_host=no
17322
17323fi
17324rm -f core conftest.err conftest.$ac_objext \
17325 conftest$ac_exeext conftest.$ac_ext
17326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17327$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17328 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17329
17330$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17331
17332 fi
17333
17334 CPPFLAGS="$save_CPPFLAGS"
17335 LDFLAGS="$save_LDFLAGS"
17336 LIBS="$save_LIBS"
17337fi
17338
Christian Heimes892d66e2018-01-29 14:10:18 +010017339# ssl module default cipher suite string
17340
17341
17342
17343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17344$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17345
17346# Check whether --with-ssl-default-suites was given.
17347if test "${with_ssl_default_suites+set}" = set; then :
17348 withval=$with_ssl_default_suites;
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17350$as_echo "$withval" >&6; }
17351case "$withval" in
17352 python)
17353 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17354
17355 ;;
17356 openssl)
17357 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17358
17359 ;;
17360 *)
17361 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17362
17363 cat >>confdefs.h <<_ACEOF
17364#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17365_ACEOF
17366
17367 ;;
17368esac
17369
17370else
17371
17372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17373$as_echo "python" >&6; }
17374$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17375
17376
17377fi
17378
17379
17380
Guido van Rossum627b2d71993-12-24 10:39:16 +000017381# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017382ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017383
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017384ac_config_files="$ac_config_files Modules/ld_so_aix"
17385
Martin v. Löwis11437992002-04-12 09:54:03 +000017386cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017387# This file is a shell script that caches the results of configure
17388# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017389# scripts and configure runs, see configure's option --config-cache.
17390# It is not useful on other systems. If it contains results you don't
17391# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017392#
Martin v. Löwis11437992002-04-12 09:54:03 +000017393# config.status only pays attention to the cache file if you give it
17394# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017395#
Skip Montanaro6dead952003-09-25 14:50:04 +000017396# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017397# loading this file, other *unset* `ac_cv_foo' will be assigned the
17398# following values.
17399
17400_ACEOF
17401
Guido van Rossumf78abae1997-01-21 22:02:36 +000017402# The following way of writing the cache mishandles newlines in values,
17403# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017405# Ultrix sh set writes to stderr and can't be redirected directly,
17406# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407(
17408 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17409 eval ac_val=\$$ac_var
17410 case $ac_val in #(
17411 *${as_nl}*)
17412 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017413 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17414$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 esac
17416 case $ac_var in #(
17417 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17419 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 esac ;;
17421 esac
17422 done
17423
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17426 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017427 # `set' does not quote correctly, so add quotes: double-quote
17428 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017430 "s/'/'\\\\''/g;
17431 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 *)
17434 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 esac |
17438 sort
17439) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017440 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17445 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17447 :end' >>confcache
17448if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17449 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017450 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017451 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17452$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017453 if test ! -f "$cache_file" || test -h "$cache_file"; then
17454 cat confcache >"$cache_file"
17455 else
17456 case $cache_file in #(
17457 */* | ?:*)
17458 mv -f confcache "$cache_file"$$ &&
17459 mv -f "$cache_file"$$ "$cache_file" ;; #(
17460 *)
17461 mv -f confcache "$cache_file" ;;
17462 esac
17463 fi
17464 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017465 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17467$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017468 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017469fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017470rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017472test "x$prefix" = xNONE && prefix=$ac_default_prefix
17473# Let make expand exec_prefix.
17474test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017476DEFS=-DHAVE_CONFIG_H
17477
Skip Montanaro6dead952003-09-25 14:50:04 +000017478ac_libobjs=
17479ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017480U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017481for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17482 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017484 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17486 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017487 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17488 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017489done
17490LIBOBJS=$ac_libobjs
17491
17492LTLIBOBJS=$ac_ltlibobjs
17493
17494
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
Matthias Kloseb9621712010-04-24 17:59:49 +000017496
Victor Stinnere0be4232011-10-25 13:06:09 +020017497: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017498ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017499ac_clean_files_save=$ac_clean_files
17500ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017501{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17502$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17503as_write_fail=0
17504cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017505#! $SHELL
17506# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017507# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017508# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017509# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017510
Martin v. Löwis11437992002-04-12 09:54:03 +000017511debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017512ac_cs_recheck=false
17513ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017514
Matthias Kloseb9621712010-04-24 17:59:49 +000017515SHELL=\${CONFIG_SHELL-$SHELL}
17516export SHELL
17517_ASEOF
17518cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17519## -------------------- ##
17520## M4sh Initialization. ##
17521## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523# Be more Bourne compatible
17524DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017525if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017526 emulate sh
17527 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017529 # is contrary to our usage. Disable this feature.
17530 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017532else
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 case `(set -o) 2>/dev/null` in #(
17534 *posix*) :
17535 set -o posix ;; #(
17536 *) :
17537 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017539fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017540
17541
Matthias Kloseb9621712010-04-24 17:59:49 +000017542as_nl='
17543'
17544export as_nl
17545# Printing a long string crashes Solaris 7 /usr/bin/printf.
17546as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17547as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17548as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17549# Prefer a ksh shell builtin over an external printf program on Solaris,
17550# but without wasting forks for bash or zsh.
17551if test -z "$BASH_VERSION$ZSH_VERSION" \
17552 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17553 as_echo='print -r --'
17554 as_echo_n='print -rn --'
17555elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17556 as_echo='printf %s\n'
17557 as_echo_n='printf %s'
17558else
17559 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17560 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17561 as_echo_n='/usr/ucb/echo -n'
17562 else
17563 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17564 as_echo_n_body='eval
17565 arg=$1;
17566 case $arg in #(
17567 *"$as_nl"*)
17568 expr "X$arg" : "X\\(.*\\)$as_nl";
17569 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17570 esac;
17571 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17572 '
17573 export as_echo_n_body
17574 as_echo_n='sh -c $as_echo_n_body as_echo'
17575 fi
17576 export as_echo_body
17577 as_echo='sh -c $as_echo_body as_echo'
17578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017579
17580# The user is always right.
17581if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 PATH_SEPARATOR=:
17583 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17584 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17585 PATH_SEPARATOR=';'
17586 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589
17590# IFS
17591# We need space, tab and new line, in precisely that order. Quoting is
17592# there to prevent editors from complaining about space-tab.
17593# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17594# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595IFS=" "" $as_nl"
17596
17597# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017598as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017599case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600 *[\\/]* ) as_myself=$0 ;;
17601 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017602for as_dir in $PATH
17603do
17604 IFS=$as_save_IFS
17605 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17607 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017610 ;;
17611esac
17612# We did not find ourselves, most probably we were run as `sh COMMAND'
17613# in which case we are not to be found in the path.
17614if test "x$as_myself" = x; then
17615 as_myself=$0
17616fi
17617if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17619 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620fi
17621
Matthias Kloseb9621712010-04-24 17:59:49 +000017622# Unset variables that we do not need and which cause bugs (e.g. in
17623# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17624# suppresses any "Segmentation fault" message there. '((' could
17625# trigger a bug in pdksh 5.2.14.
17626for as_var in BASH_ENV ENV MAIL MAILPATH
17627do eval test x\${$as_var+set} = xset \
17628 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629done
17630PS1='$ '
17631PS2='> '
17632PS4='+ '
17633
17634# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017635LC_ALL=C
17636export LC_ALL
17637LANGUAGE=C
17638export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017639
Matthias Kloseb9621712010-04-24 17:59:49 +000017640# CDPATH.
17641(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17642
17643
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017644# as_fn_error STATUS ERROR [LINENO LOG_FD]
17645# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017646# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17647# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017648# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017649as_fn_error ()
17650{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017651 as_status=$1; test $as_status -eq 0 && as_status=1
17652 if test "$4"; then
17653 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17654 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017656 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017657 as_fn_exit $as_status
17658} # as_fn_error
17659
17660
17661# as_fn_set_status STATUS
17662# -----------------------
17663# Set $? to STATUS, without forking.
17664as_fn_set_status ()
17665{
17666 return $1
17667} # as_fn_set_status
17668
17669# as_fn_exit STATUS
17670# -----------------
17671# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17672as_fn_exit ()
17673{
17674 set +e
17675 as_fn_set_status $1
17676 exit $1
17677} # as_fn_exit
17678
17679# as_fn_unset VAR
17680# ---------------
17681# Portably unset VAR.
17682as_fn_unset ()
17683{
17684 { eval $1=; unset $1;}
17685}
17686as_unset=as_fn_unset
17687# as_fn_append VAR VALUE
17688# ----------------------
17689# Append the text in VALUE to the end of the definition contained in VAR. Take
17690# advantage of any shell optimizations that allow amortized linear growth over
17691# repeated appends, instead of the typical quadratic growth present in naive
17692# implementations.
17693if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17694 eval 'as_fn_append ()
17695 {
17696 eval $1+=\$2
17697 }'
17698else
17699 as_fn_append ()
17700 {
17701 eval $1=\$$1\$2
17702 }
17703fi # as_fn_append
17704
17705# as_fn_arith ARG...
17706# ------------------
17707# Perform arithmetic evaluation on the ARGs, and store the result in the
17708# global $as_val. Take advantage of shells that can avoid forks. The arguments
17709# must be portable across $(()) and expr.
17710if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17711 eval 'as_fn_arith ()
17712 {
17713 as_val=$(( $* ))
17714 }'
17715else
17716 as_fn_arith ()
17717 {
17718 as_val=`expr "$@" || test $? -eq 1`
17719 }
17720fi # as_fn_arith
17721
17722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723if expr a : '\(a\)' >/dev/null 2>&1 &&
17724 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17725 as_expr=expr
17726else
17727 as_expr=false
17728fi
17729
17730if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17731 as_basename=basename
17732else
17733 as_basename=false
17734fi
17735
Matthias Kloseb9621712010-04-24 17:59:49 +000017736if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17737 as_dirname=dirname
17738else
17739 as_dirname=false
17740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742as_me=`$as_basename -- "$0" ||
17743$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17744 X"$0" : 'X\(//\)$' \| \
17745 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017746$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 sed '/^.*\/\([^/][^/]*\)\/*$/{
17748 s//\1/
17749 q
17750 }
17751 /^X\/\(\/\/\)$/{
17752 s//\1/
17753 q
17754 }
17755 /^X\/\(\/\).*/{
17756 s//\1/
17757 q
17758 }
17759 s/.*/./; q'`
17760
Matthias Kloseb9621712010-04-24 17:59:49 +000017761# Avoid depending upon Character Ranges.
17762as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17763as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17764as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17765as_cr_digits='0123456789'
17766as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767
17768ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017769case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017771 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017773 xy) ECHO_C='\c';;
17774 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17775 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776 esac;;
17777*)
17778 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017780
Martin v. Löwis11437992002-04-12 09:54:03 +000017781rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782if test -d conf$$.dir; then
17783 rm -f conf$$.dir/conf$$.file
17784else
17785 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017786 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017788if (echo >conf$$.file) 2>/dev/null; then
17789 if ln -s conf$$.file conf$$ 2>/dev/null; then
17790 as_ln_s='ln -s'
17791 # ... but there are two gotchas:
17792 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17793 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017794 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017795 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017796 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017797 elif ln conf$$.file conf$$ 2>/dev/null; then
17798 as_ln_s=ln
17799 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017800 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017802else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017803 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17806rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
Matthias Kloseb9621712010-04-24 17:59:49 +000017808
17809# as_fn_mkdir_p
17810# -------------
17811# Create "$as_dir" as a directory, including parents if necessary.
17812as_fn_mkdir_p ()
17813{
17814
17815 case $as_dir in #(
17816 -*) as_dir=./$as_dir;;
17817 esac
17818 test -d "$as_dir" || eval $as_mkdir_p || {
17819 as_dirs=
17820 while :; do
17821 case $as_dir in #(
17822 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17823 *) as_qdir=$as_dir;;
17824 esac
17825 as_dirs="'$as_qdir' $as_dirs"
17826 as_dir=`$as_dirname -- "$as_dir" ||
17827$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17828 X"$as_dir" : 'X\(//\)[^/]' \| \
17829 X"$as_dir" : 'X\(//\)$' \| \
17830 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17831$as_echo X"$as_dir" |
17832 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17833 s//\1/
17834 q
17835 }
17836 /^X\(\/\/\)[^/].*/{
17837 s//\1/
17838 q
17839 }
17840 /^X\(\/\/\)$/{
17841 s//\1/
17842 q
17843 }
17844 /^X\(\/\).*/{
17845 s//\1/
17846 q
17847 }
17848 s/.*/./; q'`
17849 test -d "$as_dir" && break
17850 done
17851 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017852 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017853
17854
17855} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017856if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017857 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017858else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017859 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017860 as_mkdir_p=false
17861fi
17862
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017863
17864# as_fn_executable_p FILE
17865# -----------------------
17866# Test if FILE is an executable regular file.
17867as_fn_executable_p ()
17868{
17869 test -f "$1" && test -x "$1"
17870} # as_fn_executable_p
17871as_test_x='test -x'
17872as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
17874# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017875as_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 +000017876
17877# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017878as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017879
17880
Martin v. Löwis11437992002-04-12 09:54:03 +000017881exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017882## ----------------------------------- ##
17883## Main body of $CONFIG_STATUS script. ##
17884## ----------------------------------- ##
17885_ASEOF
17886test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017887
Matthias Kloseb9621712010-04-24 17:59:49 +000017888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17889# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017890# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891# values after options handling.
17892ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017893This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017894generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017895
17896 CONFIG_FILES = $CONFIG_FILES
17897 CONFIG_HEADERS = $CONFIG_HEADERS
17898 CONFIG_LINKS = $CONFIG_LINKS
17899 CONFIG_COMMANDS = $CONFIG_COMMANDS
17900 $ $0 $@
17901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902on `(hostname || uname -n) 2>/dev/null | sed 1q`
17903"
17904
Martin v. Löwis11437992002-04-12 09:54:03 +000017905_ACEOF
17906
Matthias Kloseb9621712010-04-24 17:59:49 +000017907case $ac_config_files in *"
17908"*) set x $ac_config_files; shift; ac_config_files=$*;;
17909esac
17910
17911case $ac_config_headers in *"
17912"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17913esac
17914
17915
17916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017917# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017918config_files="$ac_config_files"
17919config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
Matthias Kloseb9621712010-04-24 17:59:49 +000017923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017924ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017925\`$as_me' instantiates files and other configuration actions
17926from templates according to the current configuration. Unless the files
17927and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017928
Matthias Kloseb9621712010-04-24 17:59:49 +000017929Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017930
17931 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017933 --config print configuration, then exit
17934 -q, --quiet, --silent
17935 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 -d, --debug don't remove temporary files
17937 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017938 --file=FILE[:TEMPLATE]
17939 instantiate the configuration file FILE
17940 --header=FILE[:TEMPLATE]
17941 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017942
17943Configuration files:
17944$config_files
17945
17946Configuration headers:
17947$config_headers
17948
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017949Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17953ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017954ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017955python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017956configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017957 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017958
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017959Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017960This config.status script is free software; the Free Software Foundation
17961gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962
17963ac_pwd='$ac_pwd'
17964srcdir='$srcdir'
17965INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017966MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017967test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017968_ACEOF
17969
Matthias Kloseb9621712010-04-24 17:59:49 +000017970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17971# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017972ac_need_defaults=:
17973while test $# != 0
17974do
17975 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017976 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17978 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017979 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017981 --*=)
17982 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17983 ac_optarg=
17984 ac_shift=:
17985 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017987 ac_option=$1
17988 ac_optarg=$2
17989 ac_shift=shift
17990 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 esac
17992
Skip Montanaro6dead952003-09-25 14:50:04 +000017993 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017995 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17996 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017998 $as_echo "$ac_cs_version"; exit ;;
17999 --config | --confi | --conf | --con | --co | --c )
18000 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 debug=: ;;
18003 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018004 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018005 case $ac_optarg in
18006 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018007 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018008 esac
18009 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 ac_need_defaults=false;;
18011 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018012 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018013 case $ac_optarg in
18014 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18015 esac
18016 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018 --he | --h)
18019 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018020 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018021Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018023 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018024 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18025 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18026 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018027
18028 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018029 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018030Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018031
Matthias Kloseb9621712010-04-24 17:59:49 +000018032 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018034
18035 esac
18036 shift
18037done
18038
Skip Montanaro6dead952003-09-25 14:50:04 +000018039ac_configure_extra_args=
18040
18041if $ac_cs_silent; then
18042 exec 6>/dev/null
18043 ac_configure_extra_args="$ac_configure_extra_args --silent"
18044fi
18045
18046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018048if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018049 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018050 shift
18051 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18052 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018054 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018055fi
18056
Martin v. Löwis11437992002-04-12 09:54:03 +000018057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059exec 5>>config.log
18060{
18061 echo
18062 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18063## Running $as_me. ##
18064_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018065 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018071
Matthias Kloseb9621712010-04-24 17:59:49 +000018072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073
18074# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018075for ac_config_target in $ac_config_targets
18076do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 case $ac_config_target in
18078 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18079 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18080 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018081 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18082 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018083 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018084 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018085 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018086 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087
Victor Stinnere0be4232011-10-25 13:06:09 +020018088 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 esac
18090done
18091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092
Martin v. Löwis11437992002-04-12 09:54:03 +000018093# If the user did not use the arguments to specify the items to instantiate,
18094# then the envvar interface is used. Set only those that are not.
18095# We use the long form for the default assignment because of an extremely
18096# bizarre bug on SunOS 4.1.3.
18097if $ac_need_defaults; then
18098 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18099 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18100fi
18101
Skip Montanaro6dead952003-09-25 14:50:04 +000018102# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018104# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105# Hook for its removal unless debugging.
18106# Note that there is a small window in which the directory will not be cleaned:
18107# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018108$debug ||
18109{
Victor Stinnere0be4232011-10-25 13:06:09 +020018110 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018112 : "${ac_tmp:=$tmp}"
18113 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018115 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018116}
Martin v. Löwis11437992002-04-12 09:54:03 +000018117# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018118
Martin v. Löwis11437992002-04-12 09:54:03 +000018119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018121 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018122} ||
18123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018124 tmp=./conf$$-$RANDOM
18125 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018126} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018127ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018128
Matthias Kloseb9621712010-04-24 17:59:49 +000018129# Set up the scripts for CONFIG_FILES section.
18130# No need to generate them if there are no CONFIG_FILES.
18131# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018133
Matthias Kloseb9621712010-04-24 17:59:49 +000018134
18135ac_cr=`echo X | tr X '\015'`
18136# On cygwin, bash can eat \r inside `` if the user requested igncr.
18137# But we know of no other shell where ac_cr would be empty at this
18138# point, so we can use a bashism as a fallback.
18139if test "x$ac_cr" = x; then
18140 eval ac_cr=\$\'\\r\'
18141fi
18142ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18143if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018144 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018145else
18146 ac_cs_awk_cr=$ac_cr
18147fi
18148
Victor Stinnere0be4232011-10-25 13:06:09 +020018149echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018150_ACEOF
18151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152
Matthias Kloseb9621712010-04-24 17:59:49 +000018153{
18154 echo "cat >conf$$subs.awk <<_ACEOF" &&
18155 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18156 echo "_ACEOF"
18157} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018158 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18159ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160ac_delim='%!_!# '
18161for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018162 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018163 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164
Matthias Kloseb9621712010-04-24 17:59:49 +000018165 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18166 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167 break
18168 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018169 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170 else
18171 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173done
Matthias Kloseb9621712010-04-24 17:59:49 +000018174rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175
Matthias Kloseb9621712010-04-24 17:59:49 +000018176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018177cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018179sed -n '
18180h
18181s/^/S["/; s/!.*/"]=/
18182p
18183g
18184s/^[^!]*!//
18185:repl
18186t repl
18187s/'"$ac_delim"'$//
18188t delim
18189:nl
18190h
18191s/\(.\{148\}\)..*/\1/
18192t more1
18193s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18194p
18195n
18196b repl
18197:more1
18198s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18199p
18200g
18201s/.\{148\}//
18202t nl
18203:delim
18204h
18205s/\(.\{148\}\)..*/\1/
18206t more2
18207s/["\\]/\\&/g; s/^/"/; s/$/"/
18208p
18209b
18210:more2
18211s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18212p
18213g
18214s/.\{148\}//
18215t delim
18216' <conf$$subs.awk | sed '
18217/^[^""]/{
18218 N
18219 s/\n//
18220}
18221' >>$CONFIG_STATUS || ac_write_fail=1
18222rm -f conf$$subs.awk
18223cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18224_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018225cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018226 for (key in S) S_is_set[key] = 1
18227 FS = ""
18228
18229}
18230{
18231 line = $ 0
18232 nfields = split(line, field, "@")
18233 substed = 0
18234 len = length(field[1])
18235 for (i = 2; i < nfields; i++) {
18236 key = field[i]
18237 keylen = length(key)
18238 if (S_is_set[key]) {
18239 value = S[key]
18240 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18241 len += length(value) + length(field[++i])
18242 substed = 1
18243 } else
18244 len += 1 + keylen
18245 }
18246
18247 print line
18248}
18249
18250_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18253if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18254 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18255else
18256 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018257fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018258 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018259_ACEOF
18260
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018261# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18262# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018263# trailing colons and then remove the whole line if VPATH becomes empty
18264# (actually we leave an empty line to preserve line numbers).
18265if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018266 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18267h
18268s///
18269s/^/:/
18270s/[ ]*$/:/
18271s/:\$(srcdir):/:/g
18272s/:\${srcdir}:/:/g
18273s/:@srcdir@:/:/g
18274s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018275s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018276x
18277s/\(=[ ]*\).*/\1/
18278G
18279s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280s/^[^=]*=[ ]*$//
18281}'
18282fi
18283
Matthias Kloseb9621712010-04-24 17:59:49 +000018284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018285fi # test -n "$CONFIG_FILES"
18286
Matthias Kloseb9621712010-04-24 17:59:49 +000018287# Set up the scripts for CONFIG_HEADERS section.
18288# No need to generate them if there are no CONFIG_HEADERS.
18289# This happens for instance with `./config.status Makefile'.
18290if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018291cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018292BEGIN {
18293_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294
Matthias Kloseb9621712010-04-24 17:59:49 +000018295# Transform confdefs.h into an awk script `defines.awk', embedded as
18296# here-document in config.status, that substitutes the proper values into
18297# config.h.in to produce config.h.
18298
18299# Create a delimiter string that does not exist in confdefs.h, to ease
18300# handling of long lines.
18301ac_delim='%!_!# '
18302for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018303 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18304 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018305 break
18306 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018307 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018308 else
18309 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18310 fi
18311done
18312
18313# For the awk script, D is an array of macro values keyed by name,
18314# likewise P contains macro parameters if any. Preserve backslash
18315# newline sequences.
18316
18317ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18318sed -n '
18319s/.\{148\}/&'"$ac_delim"'/g
18320t rset
18321:rset
18322s/^[ ]*#[ ]*define[ ][ ]*/ /
18323t def
18324d
18325:def
18326s/\\$//
18327t bsnl
18328s/["\\]/\\&/g
18329s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18330D["\1"]=" \3"/p
18331s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18332d
18333:bsnl
18334s/["\\]/\\&/g
18335s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18336D["\1"]=" \3\\\\\\n"\\/p
18337t cont
18338s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18339t cont
18340d
18341:cont
18342n
18343s/.\{148\}/&'"$ac_delim"'/g
18344t clear
18345:clear
18346s/\\$//
18347t bsnlc
18348s/["\\]/\\&/g; s/^/"/; s/$/"/p
18349d
18350:bsnlc
18351s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18352b cont
18353' <confdefs.h | sed '
18354s/'"$ac_delim"'/"\\\
18355"/g' >>$CONFIG_STATUS || ac_write_fail=1
18356
18357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18358 for (key in D) D_is_set[key] = 1
18359 FS = ""
18360}
18361/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18362 line = \$ 0
18363 split(line, arg, " ")
18364 if (arg[1] == "#") {
18365 defundef = arg[2]
18366 mac1 = arg[3]
18367 } else {
18368 defundef = substr(arg[1], 2)
18369 mac1 = arg[2]
18370 }
18371 split(mac1, mac2, "(") #)
18372 macro = mac2[1]
18373 prefix = substr(line, 1, index(line, defundef) - 1)
18374 if (D_is_set[macro]) {
18375 # Preserve the white space surrounding the "#".
18376 print prefix "define", macro P[macro] D[macro]
18377 next
18378 } else {
18379 # Replace #undef with comments. This is necessary, for example,
18380 # in the case of _POSIX_SOURCE, which is predefined and required
18381 # on some systems where configure will not decide to define it.
18382 if (defundef == "undef") {
18383 print "/*", prefix defundef, macro, "*/"
18384 next
18385 }
18386 }
18387}
18388{ print }
18389_ACAWK
18390_ACEOF
18391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018392 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018393fi # test -n "$CONFIG_HEADERS"
18394
18395
18396eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18397shift
18398for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399do
18400 case $ac_tag in
18401 :[FHLC]) ac_mode=$ac_tag; continue;;
18402 esac
18403 case $ac_mode$ac_tag in
18404 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018405 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 :[FH]-) ac_tag=-:-;;
18407 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18408 esac
18409 ac_save_IFS=$IFS
18410 IFS=:
18411 set x $ac_tag
18412 IFS=$ac_save_IFS
18413 shift
18414 ac_file=$1
18415 shift
18416
18417 case $ac_mode in
18418 :L) ac_source=$1;;
18419 :[FH])
18420 ac_file_inputs=
18421 for ac_f
18422 do
18423 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018424 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425 *) # Look for the file first in the build tree, then in the source tree
18426 # (if the path is not absolute). The absolute path cannot be DOS-style,
18427 # because $ac_f cannot contain `:'.
18428 test -f "$ac_f" ||
18429 case $ac_f in
18430 [\\/$]*) false;;
18431 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18432 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018433 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018435 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18436 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437 done
18438
18439 # Let's still pretend it is `configure' which instantiates (i.e., don't
18440 # use $as_me), people would be surprised to read:
18441 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018442 configure_input='Generated from '`
18443 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18444 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 if test x"$ac_file" != x-; then
18446 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018447 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18448$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018450 # Neutralize special characters interpreted by sed in replacement strings.
18451 case $configure_input in #(
18452 *\&* | *\|* | *\\* )
18453 ac_sed_conf_input=`$as_echo "$configure_input" |
18454 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18455 *) ac_sed_conf_input=$configure_input;;
18456 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457
18458 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018459 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18460 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461 esac
18462 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018463 esac
18464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018466$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018467 X"$ac_file" : 'X\(//\)[^/]' \| \
18468 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018470$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18472 s//\1/
18473 q
18474 }
18475 /^X\(\/\/\)[^/].*/{
18476 s//\1/
18477 q
18478 }
18479 /^X\(\/\/\)$/{
18480 s//\1/
18481 q
18482 }
18483 /^X\(\/\).*/{
18484 s//\1/
18485 q
18486 }
18487 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018488 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 ac_builddir=.
18490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491case "$ac_dir" in
18492.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18493*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018494 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018496 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 case $ac_top_builddir_sub in
18498 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18499 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18500 esac ;;
18501esac
18502ac_abs_top_builddir=$ac_pwd
18503ac_abs_builddir=$ac_pwd$ac_dir_suffix
18504# for backward compatibility:
18505ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018506
18507case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018509 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510 ac_top_srcdir=$ac_top_builddir_sub
18511 ac_abs_top_srcdir=$ac_pwd ;;
18512 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 ac_top_srcdir=$srcdir
18515 ac_abs_top_srcdir=$srcdir ;;
18516 *) # Relative name.
18517 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18518 ac_top_srcdir=$ac_top_build_prefix$srcdir
18519 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018520esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018522
Martin v. Löwis11437992002-04-12 09:54:03 +000018523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524 case $ac_mode in
18525 :F)
18526 #
18527 # CONFIG_FILE
18528 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018529
18530 case $INSTALL in
18531 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018534 ac_MKDIR_P=$MKDIR_P
18535 case $MKDIR_P in
18536 [\\/$]* | ?:[\\/]* ) ;;
18537 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18538 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018539_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540
Matthias Kloseb9621712010-04-24 17:59:49 +000018541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542# If the template does not know about datarootdir, expand it.
18543# FIXME: This hack should be removed a few years after 2.60.
18544ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018545ac_sed_dataroot='
18546/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547 p
18548 q
18549}
18550/@datadir@/p
18551/@docdir@/p
18552/@infodir@/p
18553/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018554/@mandir@/p'
18555case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556*datarootdir*) ac_datarootdir_seen=yes;;
18557*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18559$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562 ac_datarootdir_hack='
18563 s&@datadir@&$datadir&g
18564 s&@docdir@&$docdir&g
18565 s&@infodir@&$infodir&g
18566 s&@localedir@&$localedir&g
18567 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018568 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018569esac
18570_ACEOF
18571
18572# Neutralize VPATH when `$srcdir' = `.'.
18573# Shell code in configure.ac might set extrasub.
18574# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18576ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018577$extrasub
18578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018580:t
18581/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018582s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018584s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585s&@srcdir@&$ac_srcdir&;t t
18586s&@abs_srcdir@&$ac_abs_srcdir&;t t
18587s&@top_srcdir@&$ac_top_srcdir&;t t
18588s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18589s&@builddir@&$ac_builddir&;t t
18590s&@abs_builddir@&$ac_abs_builddir&;t t
18591s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18592s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018593s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018595"
Victor Stinnere0be4232011-10-25 13:06:09 +020018596eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18597 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018600 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18601 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18602 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018604which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018605$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018606which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018607
Victor Stinnere0be4232011-10-25 13:06:09 +020018608 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018610 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18611 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018612 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018613 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018614 ;;
18615 :H)
18616 #
18617 # CONFIG_HEADER
18618 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018620 {
18621 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018622 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18623 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018624 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018625 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018626 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18627$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018629 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018630 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018631 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018632 fi
18633 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018634 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018635 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018636 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018637 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018640
18641 esac
18642
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018643
18644 case $ac_file$ac_mode in
18645 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18646
18647 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018648done # for ac_tag
18649
Guido van Rossum627b2d71993-12-24 10:39:16 +000018650
Matthias Kloseb9621712010-04-24 17:59:49 +000018651as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018652_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018653ac_clean_files=$ac_clean_files_save
18654
Matthias Kloseb9621712010-04-24 17:59:49 +000018655test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018656 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018657
Martin v. Löwis11437992002-04-12 09:54:03 +000018658
18659# configure is writing to config.log, and then calls config.status.
18660# config.status does its own redirection, appending to config.log.
18661# Unfortunately, on DOS this fails, as config.log is still kept open
18662# by configure, so config.status won't be able to write to it; its
18663# output is simply discarded. So we exec the FD to /dev/null,
18664# effectively closing config.log, so it can be properly (re)opened and
18665# appended to by config.status. When coming back to configure, we
18666# need to make the FD available again.
18667if test "$no_create" != yes; then
18668 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018669 ac_config_status_args=
18670 test "$silent" = yes &&
18671 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018672 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018673 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 exec 5>>config.log
18675 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18676 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018677 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018678fi
18679if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18681$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018682fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018683
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018684
Christian Heimes75ed8902013-11-20 01:11:18 +010018685echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018686if test ! -f Modules/Setup
18687then
18688 cp $srcdir/Modules/Setup.dist Modules/Setup
18689fi
18690
Christian Heimes75ed8902013-11-20 01:11:18 +010018691echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018692if test ! -f Modules/Setup.local
18693then
18694 echo "# Edit this file for local setup changes" >Modules/Setup.local
18695fi
18696
Christian Heimes75ed8902013-11-20 01:11:18 +010018697echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018698$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018699 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018700 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018701mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018702
18703if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18704 echo "" >&6
18705 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018706 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 +000018707 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018708 echo "" >&6
18709 echo "" >&6
18710fi
18711