blob: cacf9fc41894413082f63152108248630e529599 [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 Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
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 Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
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
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
684target_os
685target_vendor
686target_cpu
687target
688LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
703LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000704LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000705RUNSHARED
706INSTSONAME
707LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000708PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BLDLIBRARY
710DLLLIBRARY
711LDLIBRARY
712LIBRARY
713BUILDEXEEXT
714EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200715NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200716MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717PLATFORM_TRIPLET
718MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200719ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720MAINCC
721CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700722SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723GREP
724CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732EXPORT_MACOSX_DEPLOYMENT_TARGET
733CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000735MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000736FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800738FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKALTINSTALLLAST
740FRAMEWORKALTINSTALLFIRST
741FRAMEWORKINSTALLLAST
742FRAMEWORKINSTALLFIRST
743PYTHONFRAMEWORKINSTALLDIR
744PYTHONFRAMEWORKPREFIX
745PYTHONFRAMEWORKDIR
746PYTHONFRAMEWORKIDENTIFIER
747PYTHONFRAMEWORK
748LIPO_32BIT_FLAGS
749ARCH_RUN_32BIT
750UNIVERSALSDK
751CONFIG_ARGS
752SOVERSION
753VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200755PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500764HAS_GIT
765GITBRANCH
766GITTAG
767GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
Zackery Spytz43fdbd22019-05-29 13:57:07 -0600788runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000789localstatedir
790sharedstatedir
791sysconfdir
792datadir
793datarootdir
794libexecdir
795sbindir
796bindir
797program_transform_name
798prefix
799exec_prefix
800PACKAGE_URL
801PACKAGE_BUGREPORT
802PACKAGE_STRING
803PACKAGE_VERSION
804PACKAGE_TARNAME
805PACKAGE_NAME
806PATH_SEPARATOR
807SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000808ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000809ac_user_opts='
810enable_option_checking
811enable_universalsdk
812with_universal_archs
813with_framework_name
814enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200820with_trace_refs
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. Smith1584a002018-11-12 12:07:14 -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
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800859CPP
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'
Zackery Spytz43fdbd22019-05-29 13:57:07 -0600901runstatedir='${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
Zackery Spytz43fdbd22019-05-29 13:57:07 -06001154 -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 \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06001300 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 Deily5489bda2018-01-31 17:44:09 -05001413\`configure' configures python 3.8 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]
Zackery Spytz43fdbd22019-05-29 13:57:07 -06001453 --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 Deily5489bda2018-01-31 17:44:09 -05001480 short | recursive ) echo "Configuration of python 3.8:";;
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
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-cxx-main=<compiler>
1514 compile main() and link python executable with C++
1515 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-suffix=.exe set executable suffix
1517 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001518 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001519 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001520 --with-lto Enable Link Time Optimization in any build. Disabled
1521 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001522 --with-hash-algorithm=[fnv|siphash24]
1523 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001524 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001525 enable AddressSanitizer (asan)
1526 --with-memory-sanitizer enable MemorySanitizer (msan)
1527 --with-undefined-behavior-sanitizer
1528 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001530 --with-system-expat build pyexpat module using an installed expat
1531 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001532 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001533 --with-system-libmpdec build _decimal module using an installed libmpdec
1534 library
Ned Deilyd819b932013-09-06 01:07:05 -07001535 --with-tcltk-includes='-I...'
1536 override search for Tcl and Tk include files
1537 --with-tcltk-libs='-L...'
1538 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001539 --with-dbmliborder=db1:db2:...
1540 order to check db backends for dbm. Valid value is a
1541 colon separated string with the backend names
1542 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with(out)-doc-strings disable/enable documentation strings
1544 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001545 --with(out)-c-locale-coercion
1546 disable/enable C locale coercion to a UTF-8 based
1547 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001548 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001549 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001550 --with-libm=STRING math library
1551 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001552 --with(out)-computed-gotos
1553 Use computed gotos in evaluation loop (enabled by
1554 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001555 --with(out)-ensurepip=[=upgrade]
1556 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001557 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001558 --with-ssl-default-suites=[python|openssl|STRING]
1559 Override default cipher suites string, python: use
1560 Python's preferred selection (default), openssl:
1561 leave OpenSSL's defaults untouched, STRING: use a
1562 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001565 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 CC C compiler command
1567 CFLAGS C compiler flags
1568 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1569 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001571 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001574 PKG_CONFIG path to pkg-config utility
1575 PKG_CONFIG_PATH
1576 directories to add to pkg-config's search path
1577 PKG_CONFIG_LIBDIR
1578 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001579
1580Use these variables to override the choices made by `configure' or to help
1581it to find libraries and programs with nonstandard names/locations.
1582
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001583Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001586fi
1587
1588if test "$ac_init_help" = "recursive"; then
1589 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 test -d "$ac_dir" ||
1592 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1593 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_builddir=.
1595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596case "$ac_dir" in
1597.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1598*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001599 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001601 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 case $ac_top_builddir_sub in
1603 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1604 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1605 esac ;;
1606esac
1607ac_abs_top_builddir=$ac_pwd
1608ac_abs_builddir=$ac_pwd$ac_dir_suffix
1609# for backward compatibility:
1610ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
1612case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 ac_top_srcdir=$ac_top_builddir_sub
1616 ac_abs_top_srcdir=$ac_pwd ;;
1617 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 ac_top_srcdir=$srcdir
1620 ac_abs_top_srcdir=$srcdir ;;
1621 *) # Relative name.
1622 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1623 ac_top_srcdir=$ac_top_build_prefix$srcdir
1624 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001625esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 cd "$ac_dir" || { ac_status=$?; continue; }
1629 # Check for guested configure.
1630 if test -f "$ac_srcdir/configure.gnu"; then
1631 echo &&
1632 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1633 elif test -f "$ac_srcdir/configure"; then
1634 echo &&
1635 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001637 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 fi || ac_status=$?
1639 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 done
1641fi
1642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001644if $ac_init_version; then
1645 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001646python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001647generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001649Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001650This configure script is free software; the Free Software Foundation
1651gives unlimited permission to copy, distribute and modify it.
1652_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001655
1656## ------------------------ ##
1657## Autoconf initialization. ##
1658## ------------------------ ##
1659
1660# ac_fn_c_try_compile LINENO
1661# --------------------------
1662# Try to compile conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_compile ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 rm -f conftest.$ac_objext
1667 if { { ac_try="$ac_compile"
1668case "(($ac_try" in
1669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1670 *) ac_try_echo=$ac_try;;
1671esac
1672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1673$as_echo "$ac_try_echo"; } >&5
1674 (eval "$ac_compile") 2>conftest.err
1675 ac_status=$?
1676 if test -s conftest.err; then
1677 grep -v '^ *+' conftest.err >conftest.er1
1678 cat conftest.er1 >&5
1679 mv -f conftest.er1 conftest.err
1680 fi
1681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1682 test $ac_status = 0; } && {
1683 test -z "$ac_c_werror_flag" ||
1684 test ! -s conftest.err
1685 } && test -s conftest.$ac_objext; then :
1686 ac_retval=0
1687else
1688 $as_echo "$as_me: failed program was:" >&5
1689sed 's/^/| /' conftest.$ac_ext >&5
1690
1691 ac_retval=1
1692fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001694 as_fn_set_status $ac_retval
1695
1696} # ac_fn_c_try_compile
1697
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001698# ac_fn_c_try_cpp LINENO
1699# ----------------------
1700# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1701ac_fn_c_try_cpp ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704 if { { ac_try="$ac_cpp conftest.$ac_ext"
1705case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1712 ac_status=$?
1713 if test -s conftest.err; then
1714 grep -v '^ *+' conftest.err >conftest.er1
1715 cat conftest.er1 >&5
1716 mv -f conftest.er1 conftest.err
1717 fi
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; } > conftest.i && {
1720 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1721 test ! -s conftest.err
1722 }; then :
1723 ac_retval=0
1724else
1725 $as_echo "$as_me: failed program was:" >&5
1726sed 's/^/| /' conftest.$ac_ext >&5
1727
1728 ac_retval=1
1729fi
1730 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_cpp
1734
Matthias Kloseb9621712010-04-24 17:59:49 +00001735# ac_fn_c_try_link LINENO
1736# -----------------------
1737# Try to link conftest.$ac_ext, and return whether this succeeded.
1738ac_fn_c_try_link ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741 rm -f conftest.$ac_objext conftest$ac_exeext
1742 if { { ac_try="$ac_link"
1743case "(($ac_try" in
1744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1745 *) ac_try_echo=$ac_try;;
1746esac
1747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1748$as_echo "$ac_try_echo"; } >&5
1749 (eval "$ac_link") 2>conftest.err
1750 ac_status=$?
1751 if test -s conftest.err; then
1752 grep -v '^ *+' conftest.err >conftest.er1
1753 cat conftest.er1 >&5
1754 mv -f conftest.er1 conftest.err
1755 fi
1756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1757 test $ac_status = 0; } && {
1758 test -z "$ac_c_werror_flag" ||
1759 test ! -s conftest.err
1760 } && test -s conftest$ac_exeext && {
1761 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001762 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001763 }; then :
1764 ac_retval=0
1765else
1766 $as_echo "$as_me: failed program was:" >&5
1767sed 's/^/| /' conftest.$ac_ext >&5
1768
1769 ac_retval=1
1770fi
1771 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1772 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1773 # interfere with the next link command; also delete a directory that is
1774 # left behind by Apple's compiler. We do this before executing the actions.
1775 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 as_fn_set_status $ac_retval
1778
1779} # ac_fn_c_try_link
1780
Matthias Kloseb9621712010-04-24 17:59:49 +00001781# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1782# -------------------------------------------------------
1783# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1784# the include files in INCLUDES and setting the cache variable VAR
1785# accordingly.
1786ac_fn_c_check_header_mongrel ()
1787{
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001789 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1791$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001792if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001793 $as_echo_n "(cached) " >&6
1794fi
1795eval ac_res=\$$3
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1797$as_echo "$ac_res" >&6; }
1798else
1799 # Is the header compilable?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1801$as_echo_n "checking $2 usability... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804$4
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_compile "$LINENO"; then :
1808 ac_header_compiler=yes
1809else
1810 ac_header_compiler=no
1811fi
1812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1814$as_echo "$ac_header_compiler" >&6; }
1815
1816# Is the header present?
1817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1818$as_echo_n "checking $2 presence... " >&6; }
1819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_cpp "$LINENO"; then :
1824 ac_header_preproc=yes
1825else
1826 ac_header_preproc=no
1827fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001828rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1830$as_echo "$ac_header_preproc" >&6; }
1831
1832# So? What about this header?
1833case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1834 yes:no: )
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1836$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1839 ;;
1840 no:yes:* )
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1842$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1844$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1846$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1848$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1850$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001851( $as_echo "## --------------------------------------- ##
1852## Report this to https://bugs.python.org/ ##
1853## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001854 ) | sed "s/^/$as_me: WARNING: /" >&2
1855 ;;
1856esac
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001859if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001860 $as_echo_n "(cached) " >&6
1861else
1862 eval "$3=\$ac_header_compiler"
1863fi
1864eval ac_res=\$$3
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866$as_echo "$ac_res" >&6; }
1867fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001868 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001869
1870} # ac_fn_c_check_header_mongrel
1871
1872# ac_fn_c_try_run LINENO
1873# ----------------------
1874# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1875# that executables *can* be run.
1876ac_fn_c_try_run ()
1877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 if { { ac_try="$ac_link"
1880case "(($ac_try" in
1881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882 *) ac_try_echo=$ac_try;;
1883esac
1884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885$as_echo "$ac_try_echo"; } >&5
1886 (eval "$ac_link") 2>&5
1887 ac_status=$?
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1890 { { case "(($ac_try" in
1891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892 *) ac_try_echo=$ac_try;;
1893esac
1894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895$as_echo "$ac_try_echo"; } >&5
1896 (eval "$ac_try") 2>&5
1897 ac_status=$?
1898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1899 test $ac_status = 0; }; }; then :
1900 ac_retval=0
1901else
1902 $as_echo "$as_me: program exited with status $ac_status" >&5
1903 $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
1905
1906 ac_retval=$ac_status
1907fi
1908 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001910 as_fn_set_status $ac_retval
1911
1912} # ac_fn_c_try_run
1913
1914# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1915# -------------------------------------------------------
1916# Tests whether HEADER exists and can be compiled using the include files in
1917# INCLUDES, setting the cache variable VAR accordingly.
1918ac_fn_c_check_header_compile ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001923if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001924 $as_echo_n "(cached) " >&6
1925else
1926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927/* end confdefs.h. */
1928$4
1929#include <$2>
1930_ACEOF
1931if ac_fn_c_try_compile "$LINENO"; then :
1932 eval "$3=yes"
1933else
1934 eval "$3=no"
1935fi
1936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937fi
1938eval ac_res=\$$3
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001942
1943} # ac_fn_c_check_header_compile
1944
Matthias Kloseb9621712010-04-24 17:59:49 +00001945# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1946# -------------------------------------------
1947# Tests whether TYPE exists after having included INCLUDES, setting cache
1948# variable VAR accordingly.
1949ac_fn_c_check_type ()
1950{
1951 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1953$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001954if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001955 $as_echo_n "(cached) " >&6
1956else
1957 eval "$3=no"
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964if (sizeof ($2))
1965 return 0;
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972/* end confdefs.h. */
1973$4
1974int
1975main ()
1976{
1977if (sizeof (($2)))
1978 return 0;
1979 ;
1980 return 0;
1981}
1982_ACEOF
1983if ac_fn_c_try_compile "$LINENO"; then :
1984
1985else
1986 eval "$3=yes"
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1989fi
1990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1991fi
1992eval ac_res=\$$3
1993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1994$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001995 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997} # ac_fn_c_check_type
1998
Matthias Kloseb9621712010-04-24 17:59:49 +00001999# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2000# --------------------------------------------
2001# Tries to find the compile-time value of EXPR in a program that includes
2002# INCLUDES, setting VAR accordingly. Returns whether the value could be
2003# computed
2004ac_fn_c_compute_int ()
2005{
2006 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2007 if test "$cross_compiling" = yes; then
2008 # Depending upon the size, compute the lo and hi bounds.
2009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_lo=0 ac_mid=0
2025 while :; do
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$4
2029int
2030main ()
2031{
2032static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002033test_array [0] = 0;
2034return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
2052else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002077test_array [0] = 0;
2078return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002112test_array [0] = 0;
2113return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid
2121else
2122 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125done
2126case $ac_lo in #((
2127?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128'') ac_retval=1 ;;
2129esac
2130 else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134static long int longval () { return $2; }
2135static unsigned long int ulongval () { return $2; }
2136#include <stdio.h>
2137#include <stdlib.h>
2138int
2139main ()
2140{
2141
2142 FILE *f = fopen ("conftest.val", "w");
2143 if (! f)
2144 return 1;
2145 if (($2) < 0)
2146 {
2147 long int i = longval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%ld", i);
2151 }
2152 else
2153 {
2154 unsigned long int i = ulongval ();
2155 if (i != ($2))
2156 return 1;
2157 fprintf (f, "%lu", i);
2158 }
2159 /* Do not output a trailing newline, as this causes \r\n confusion
2160 on some platforms. */
2161 return ferror (f) || fclose (f) != 0;
2162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_run "$LINENO"; then :
2168 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169else
2170 ac_retval=1
2171fi
2172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173 conftest.$ac_objext conftest.beam conftest.$ac_ext
2174rm -f conftest.val
2175
2176 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002177 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 as_fn_set_status $ac_retval
2179
2180} # ac_fn_c_compute_int
2181
2182# ac_fn_c_check_func LINENO FUNC VAR
2183# ----------------------------------
2184# Tests whether FUNC exists, setting the cache variable VAR accordingly
2185ac_fn_c_check_func ()
2186{
2187 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002190if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002191 $as_echo_n "(cached) " >&6
2192else
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2197#define $2 innocuous_$2
2198
2199/* System header to define __stub macros and hopefully few prototypes,
2200 which can conflict with char $2 (); below.
2201 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202 <limits.h> exists even on freestanding compilers. */
2203
2204#ifdef __STDC__
2205# include <limits.h>
2206#else
2207# include <assert.h>
2208#endif
2209
2210#undef $2
2211
2212/* Override any GCC internal prototype to avoid an error.
2213 Use char because int might match the return type of a GCC
2214 builtin and then its argument prototype would still apply. */
2215#ifdef __cplusplus
2216extern "C"
2217#endif
2218char $2 ();
2219/* The GNU C library defines this for functions which it implements
2220 to always fail with ENOSYS. Some functions are actually named
2221 something starting with __ and the normal name is an alias. */
2222#if defined __stub_$2 || defined __stub___$2
2223choke me
2224#endif
2225
2226int
2227main ()
2228{
2229return $2 ();
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_link "$LINENO"; then :
2235 eval "$3=yes"
2236else
2237 eval "$3=no"
2238fi
2239rm -f core conftest.err conftest.$ac_objext \
2240 conftest$ac_exeext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002246
2247} # ac_fn_c_check_func
2248
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002249# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2250# ---------------------------------------------
2251# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2252# accordingly.
2253ac_fn_c_check_decl ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 as_decl_name=`echo $2|sed 's/ *(.*//'`
2257 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2259$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2260if eval \${$3+:} false; then :
2261 $as_echo_n "(cached) " >&6
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$4
2266int
2267main ()
2268{
2269#ifndef $as_decl_name
2270#ifdef __cplusplus
2271 (void) $as_decl_use;
2272#else
2273 (void) $as_decl_name;
2274#endif
2275#endif
2276
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281if ac_fn_c_try_compile "$LINENO"; then :
2282 eval "$3=yes"
2283else
2284 eval "$3=no"
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$3
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
2291 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2292
2293} # ac_fn_c_check_decl
2294
Matthias Kloseb9621712010-04-24 17:59:49 +00002295# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2296# ----------------------------------------------------
2297# Tries to find if the field MEMBER exists in type AGGR, after including
2298# INCLUDES, setting cache variable VAR accordingly.
2299ac_fn_c_check_member ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2303$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002304if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (ac_aggr.$3)
2315return 0;
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$4=yes"
2322else
2323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324/* end confdefs.h. */
2325$5
2326int
2327main ()
2328{
2329static $2 ac_aggr;
2330if (sizeof ac_aggr.$3)
2331return 0;
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$4=yes"
2338else
2339 eval "$4=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345eval ac_res=\$$4
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002349
2350} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002352This file contains any messages produced by compilers while
2353running configure, to aid debugging if configure makes a mistake.
2354
Ned Deily5489bda2018-01-31 17:44:09 -05002355It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002356generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358 $ $0 $@
2359
2360_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002362{
2363cat <<_ASUNAME
2364## --------- ##
2365## Platform. ##
2366## --------- ##
2367
2368hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2369uname -m = `(uname -m) 2>/dev/null || echo unknown`
2370uname -r = `(uname -r) 2>/dev/null || echo unknown`
2371uname -s = `(uname -s) 2>/dev/null || echo unknown`
2372uname -v = `(uname -v) 2>/dev/null || echo unknown`
2373
2374/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2375/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2376
2377/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2378/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2379/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002381/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2382/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2383/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2384
2385_ASUNAME
2386
2387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002392 $as_echo "PATH: $as_dir"
2393 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396} >&5
2397
2398cat >&5 <<_ACEOF
2399
2400
2401## ----------- ##
2402## Core tests. ##
2403## ----------- ##
2404
2405_ACEOF
2406
2407
2408# Keep a trace of the command line.
2409# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002413ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_configure_args0=
2415ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002416ac_must_keep_next=false
2417for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002418do
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 for ac_arg
2420 do
2421 case $ac_arg in
2422 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2423 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2424 | -silent | --silent | --silen | --sile | --sil)
2425 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 esac
2429 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002436 case $ac_arg in
2437 *=* | --config-cache | -C | -disable-* | --disable-* \
2438 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2439 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2440 | -with-* | --with-* | -without-* | --without-* | --x)
2441 case "$ac_configure_args0 " in
2442 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2443 esac
2444 ;;
2445 -* ) ac_must_keep_next=true ;;
2446 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 ;;
2450 esac
2451 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002452done
Matthias Kloseb9621712010-04-24 17:59:49 +00002453{ ac_configure_args0=; unset ac_configure_args0;}
2454{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002455
2456# When interrupted or exit'd, cleanup temporary files, and complete
2457# config.log. We remove comments because anyway the quotes in there
2458# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459# WARNING: Use '\'' to represent an apostrophe within the trap.
2460# 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 +00002461trap 'exit_status=$?
2462 # Save into config.log some information that might help in debugging.
2463 {
2464 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002465
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002466 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002467## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002468## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 echo
2470 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471(
2472 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2473 eval ac_val=\$$ac_var
2474 case $ac_val in #(
2475 *${as_nl}*)
2476 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2478$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 esac
2480 case $ac_var in #(
2481 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002482 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2483 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac ;;
2485 esac
2486 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2489 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 "s/'\''/'\''\\\\'\'''\''/g;
2492 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2493 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002494 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002496 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac |
2498 sort
2499)
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002501
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002503## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_vars
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515
2516 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 echo
2521 for ac_var in $ac_subst_files
2522 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 eval ac_val=\$$ac_var
2524 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 done | sort
2529 echo
2530 fi
2531
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002534## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
2539 fi
2540 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 $as_echo "$as_me: caught signal $ac_signal"
2542 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 rm -f core *.core core.conftest.* &&
2545 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002548for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002550done
2551ac_signal=0
2552
2553# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
Matthias Kloseb9621712010-04-24 17:59:49 +00002556$as_echo "/* confdefs.h */" > confdefs.h
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558# Predefined preprocessor variables.
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_NAME "$PACKAGE_NAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_VERSION "$PACKAGE_VERSION"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_STRING "$PACKAGE_STRING"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2578_ACEOF
2579
Matthias Kloseb9621712010-04-24 17:59:49 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_URL "$PACKAGE_URL"
2582_ACEOF
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584
2585# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002586# Prefer an explicitly selected file to automatically selected ones.
2587ac_site_file1=NONE
2588ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002590 # We do not want a PATH search for config.site.
2591 case $CONFIG_SITE in #((
2592 -*) ac_site_file1=./$CONFIG_SITE;;
2593 */*) ac_site_file1=$CONFIG_SITE;;
2594 *) ac_site_file1=./$CONFIG_SITE;;
2595 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$prefix/share/config.site
2598 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599else
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 ac_site_file1=$ac_default_prefix/share/config.site
2601 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002603for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604do
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 test "x$ac_site_file" = xNONE && continue
2606 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2608$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002610 . "$ac_site_file" \
2611 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2613as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002614See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615 fi
2616done
2617
2618if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 # Some versions of bash will fail to source /dev/null (special files
2620 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2621 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2623$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2626 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 esac
2628 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629else
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2631$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 >$cache_file
2633fi
2634
2635# Check that the precious variables saved in the cache have kept the same
2636# value.
2637ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2640 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2642 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 case $ac_old_set,$ac_new_set in
2644 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2646$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 +00002647 ac_cache_corrupted=: ;;
2648 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2650$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 ac_cache_corrupted=: ;;
2652 ,);;
2653 *)
2654 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002655 # differences in whitespace do not lead to failure.
2656 ac_old_val_w=`echo x $ac_old_val`
2657 ac_new_val_w=`echo x $ac_new_val`
2658 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2660$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2661 ac_cache_corrupted=:
2662 else
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2664$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2665 eval $ac_var=\$ac_old_val
2666 fi
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2668$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2670$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 fi;;
2672 esac
2673 # Pass precious variables to config.status.
2674 if test "$ac_new_set" = set; then
2675 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 *) ac_arg=$ac_var=$ac_new_val ;;
2678 esac
2679 case " $ac_configure_args " in
2680 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 esac
2683 fi
2684done
2685if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2689$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002690 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002692## -------------------- ##
2693## Main body of script. ##
2694## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695
Guido van Rossum7f43da71994-08-01 12:15:30 +00002696ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2700ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701
Guido van Rossum627b2d71993-12-24 10:39:16 +00002702
Michael W. Hudson54241132001-12-07 15:38:26 +00002703
Trent Nelson4d4ec652012-10-16 08:51:24 -04002704
Christian Heimesff5be6e2018-01-20 13:19:21 +01002705
2706
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002707if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002708 # If we're building out-of-tree, we need to make sure the following
2709 # resources get picked up before their $srcdir counterparts.
2710 # Objects/ -> typeslots.inc
2711 # Include/ -> Python-ast.h, graminit.h
2712 # Python/ -> importlib.h
2713 # (A side effect of this is that these resources will automatically be
2714 # regenerated when building out-of-tree, regardless of whether or not
2715 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2716 # off.)
2717 BASECPPFLAGS="-IObjects -IInclude -IPython"
2718else
2719 BASECPPFLAGS=""
2720fi
2721
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722
2723
2724
2725
Victor Stinner9ed34a82017-05-02 22:35:58 +02002726if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728# Extract the first word of "git", so it can be a program name with args.
2729set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2731$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo_n "(cached) " >&6
2734else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002735 if test -n "$HAS_GIT"; then
2736 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737else
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
2743 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2747 break 2
2748 fi
2749done
2750 done
2751IFS=$as_save_IFS
2752
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
2755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756HAS_GIT=$ac_cv_prog_HAS_GIT
2757if test -n "$HAS_GIT"; then
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2759$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2762$as_echo "no" >&6; }
2763fi
2764
2765
2766else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002767HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002769if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770then
Xiang Zhang4c855572018-08-20 22:36:19 +08002771 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2772 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2773 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002775 GITVERSION=""
2776 GITTAG=""
2777 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002778fi
2779
2780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002781ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002782
2783
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002784ac_aux_dir=
2785for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2786 if test -f "$ac_dir/install-sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install-sh -c"
2789 break
2790 elif test -f "$ac_dir/install.sh"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/install.sh -c"
2793 break
2794 elif test -f "$ac_dir/shtool"; then
2795 ac_aux_dir=$ac_dir
2796 ac_install_sh="$ac_aux_dir/shtool install -c"
2797 break
2798 fi
2799done
2800if test -z "$ac_aux_dir"; then
2801 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2802fi
2803
2804# These three variables are undocumented and unsupported,
2805# and are intended to be withdrawn in a future Autoconf release.
2806# They can cause serious problems if a builder's source tree is in a directory
2807# whose full name contains unusual characters.
2808ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2809ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2810ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2811
2812
2813# Make sure we can run config.sub.
2814$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2815 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2816
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2818$as_echo_n "checking build system type... " >&6; }
2819if ${ac_cv_build+:} false; then :
2820 $as_echo_n "(cached) " >&6
2821else
2822 ac_build_alias=$build_alias
2823test "x$ac_build_alias" = x &&
2824 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2825test "x$ac_build_alias" = x &&
2826 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2827ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2828 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2829
2830fi
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2832$as_echo "$ac_cv_build" >&6; }
2833case $ac_cv_build in
2834*-*-*) ;;
2835*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2836esac
2837build=$ac_cv_build
2838ac_save_IFS=$IFS; IFS='-'
2839set x $ac_cv_build
2840shift
2841build_cpu=$1
2842build_vendor=$2
2843shift; shift
2844# Remember, the first character of IFS is used to create $*,
2845# except with old shells:
2846build_os=$*
2847IFS=$ac_save_IFS
2848case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2849
2850
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2852$as_echo_n "checking host system type... " >&6; }
2853if ${ac_cv_host+:} false; then :
2854 $as_echo_n "(cached) " >&6
2855else
2856 if test "x$host_alias" = x; then
2857 ac_cv_host=$ac_cv_build
2858else
2859 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2860 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2861fi
2862
2863fi
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2865$as_echo "$ac_cv_host" >&6; }
2866case $ac_cv_host in
2867*-*-*) ;;
2868*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2869esac
2870host=$ac_cv_host
2871ac_save_IFS=$IFS; IFS='-'
2872set x $ac_cv_host
2873shift
2874host_cpu=$1
2875host_vendor=$2
2876shift; shift
2877# Remember, the first character of IFS is used to create $*,
2878# except with old shells:
2879host_os=$*
2880IFS=$ac_save_IFS
2881case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2882
2883
2884
doko@python.orga10e4a92013-01-25 18:45:12 +01002885
2886
Ned Deilyfcbc2462014-08-22 13:32:49 -07002887# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2888rm -f pybuilddir.txt
2889
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002890for ac_prog in python$PACKAGE_VERSION python3 python
2891do
2892 # Extract the first word of "$ac_prog", so it can be a program name with args.
2893set dummy $ac_prog; ac_word=$2
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2895$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002896if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897 $as_echo_n "(cached) " >&6
2898else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002899 if test -n "$PYTHON_FOR_REGEN"; then
2900 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002901else
2902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2903for as_dir in $PATH
2904do
2905 IFS=$as_save_IFS
2906 test -z "$as_dir" && as_dir=.
2907 for ac_exec_ext in '' $ac_executable_extensions; do
2908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002909 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2911 break 2
2912 fi
2913done
2914 done
2915IFS=$as_save_IFS
2916
2917fi
2918fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2920if test -n "$PYTHON_FOR_REGEN"; then
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2922$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002923else
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2925$as_echo "no" >&6; }
2926fi
2927
2928
Victor Stinnera5c62a82017-05-03 18:21:48 +02002929 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002930done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002931test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002933
2934
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002935if test "$cross_compiling" = yes; then
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2937$as_echo_n "checking for python interpreter for cross build... " >&6; }
2938 if test -z "$PYTHON_FOR_BUILD"; then
2939 for interp in python$PACKAGE_VERSION python3 python; do
2940 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002941 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 +02002942 break
2943 fi
2944 interp=
2945 done
2946 if test x$interp = x; then
2947 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2948 fi
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2950$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002951 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 +02002952 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002953elif test "$cross_compiling" = maybe; then
2954 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002955else
2956 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2957fi
2958
2959
Martin v. Löwis11437992002-04-12 09:54:03 +00002960
Benjamin Petersond23f8222009-04-05 19:13:16 +00002961if test "$prefix" != "/"; then
2962 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2963fi
2964
2965
Martin v. Löwis11437992002-04-12 09:54:03 +00002966
2967
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002968# We don't use PACKAGE_ variables, and they cause conflicts
2969# with other autoconf-based packages that include Python.h
2970grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2971rm confdefs.h
2972mv confdefs.h.new confdefs.h
2973
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002974
Ned Deily5489bda2018-01-31 17:44:09 -05002975VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002976
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002977# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002978
2979SOVERSION=1.0
2980
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981# The later defininition of _XOPEN_SOURCE disables certain features
2982# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002985
2986
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002992
2993
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2996# them.
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002999
3000
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3003# them.
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006
3007
3008
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003009define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003010
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003011# Arguments passed to configure.
3012
3013CONFIG_ARGS="$ac_configure_args"
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3016$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003018if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 case $enableval in
3021 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003022 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 # information
3024 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003025 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003027 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3028 if test ! -d "${enableval}"
3029 then
3030 enableval=/
3031 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 ;;
3034 esac
3035 case $enableval in
3036 no)
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039 ;;
3040 *)
3041 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042 if test ! -d "${UNIVERSALSDK}"
3043 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003044 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046 ;;
3047 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003048
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050else
3051
3052 UNIVERSALSDK=
3053 enable_universalsdk=
3054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057if test -n "${UNIVERSALSDK}"
3058then
Matthias Kloseb9621712010-04-24 17:59:49 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3060$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061else
Matthias Kloseb9621712010-04-24 17:59:49 +00003062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003067
Ned Deily87adb6e2013-10-18 21:09:56 -07003068ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070# For backward compatibility reasons we prefer to select '32-bit' if available,
3071# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073if test "`uname -s`" = "Darwin"
3074then
3075 if test -n "${UNIVERSALSDK}"
3076 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003077 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003078 then
3079 UNIVERSAL_ARCHS="intel"
3080 fi
3081 fi
3082fi
3083
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3086$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087
3088# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 UNIVERSAL_ARCHS="$withval"
3092
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093fi
3094
Ned Deily87adb6e2013-10-18 21:09:56 -07003095if test -n "${UNIVERSALSDK}"
3096then
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3098$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3099else
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3101$as_echo "no" >&6; }
3102fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003104
3105# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003107 withval=$with_framework_name;
3108 PYTHONFRAMEWORK=${withval}
3109 PYTHONFRAMEWORKDIR=${withval}.framework
3110 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3111
3112else
3113
3114 PYTHONFRAMEWORK=Python
3115 PYTHONFRAMEWORKDIR=Python.framework
3116 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3117
3118fi
3119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003121if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003123 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003124 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003125 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 esac
3127 case $enableval in
3128 no)
3129 PYTHONFRAMEWORK=
3130 PYTHONFRAMEWORKDIR=no-framework
3131 PYTHONFRAMEWORKPREFIX=
3132 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST=
3134 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003135 FRAMEWORKALTINSTALLFIRST=
3136 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003137 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 if test "x${prefix}" = "xNONE"; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3140 else
3141 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3142 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003144 ;;
3145 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003149 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003150 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3151 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003152 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003154
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 if test "x${prefix}" = "xNONE" ; then
3156 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 else
3159 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3160 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003161
3162 case "${enableval}" in
3163 /System*)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 if test "${prefix}" = "NONE" ; then
3166 # See below
3167 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3168 fi
3169 ;;
3170
3171 /Library*)
3172 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3173 ;;
3174
3175 */Library/Frameworks)
3176 MDIR="`dirname "${enableval}"`"
3177 MDIR="`dirname "${MDIR}"`"
3178 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3179
3180 if test "${prefix}" = "NONE"; then
3181 # User hasn't specified the
3182 # --prefix option, but wants to install
3183 # the framework in a non-default location,
3184 # ensure that the compatibility links get
3185 # installed relative to that prefix as well
3186 # instead of in /usr/local.
3187 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3188 fi
3189 ;;
3190
3191 *)
3192 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3193 ;;
3194 esac
3195
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003198 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003204 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3205
3206 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3207
Jack Jansene578a632001-08-15 01:27:14 +00003208 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
Guido van Rossum563e7081996-09-10 18:20:48 +00003210else
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Jack Jansene578a632001-08-15 01:27:14 +00003212 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORKPREFIX=
3215 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216 FRAMEWORKINSTALLFIRST=
3217 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003218 FRAMEWORKALTINSTALLFIRST=
3219 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003220 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221 if test "x${prefix}" = "xNONE" ; then
3222 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3223 else
3224 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3225 fi
Jack Jansene578a632001-08-15 01:27:14 +00003226 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229fi
3230
Thomas Wouters477c8d52006-05-27 19:21:47 +00003231
3232
Michael W. Hudson54241132001-12-07 15:38:26 +00003233
3234
3235
3236
Jack Jansene578a632001-08-15 01:27:14 +00003237
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003238
3239
3240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003242
Ned Deilyb8f944f2013-11-21 22:42:25 -08003243
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003244
3245cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003246#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003247_ACEOF
3248
3249
Jack Jansene578a632001-08-15 01:27:14 +00003250##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003251## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003252## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003253##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254# Set name for machine-dependent library files
3255
Matthias Kloseb9621712010-04-24 17:59:49 +00003256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3257$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258if test -z "$MACHDEP"
3259then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 # avoid using uname for cross builds
3261 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003262 # ac_sys_system and ac_sys_release are used for setting
3263 # a lot of different things including 'define_xopen_source'
3264 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003266 *-*-linux-android*)
3267 ac_sys_system=Linux-android
3268 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003269 *-*-linux*)
3270 ac_sys_system=Linux
3271 ;;
3272 *-*-cygwin*)
3273 ac_sys_system=Cygwin
3274 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003275 *-*-vxworks*)
3276 ac_sys_system=VxWorks
3277 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 *)
3279 # for now, limit cross builds to known configurations
3280 MACHDEP="unknown"
3281 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3282 esac
3283 ac_sys_release=
3284 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003285 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003286 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003287 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003288 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003290 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 fi
3293 ac_md_system=`echo $ac_sys_system |
3294 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3295 ac_md_release=`echo $ac_sys_release |
3296 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3297 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003298
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003299 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003300 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003301 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003302 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003303 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003304 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003305 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3308$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003309
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003310
3311if test "$cross_compiling" = yes; then
3312 case "$host" in
3313 *-*-linux*)
3314 case "$host_cpu" in
3315 arm*)
3316 _host_cpu=arm
3317 ;;
3318 *)
3319 _host_cpu=$host_cpu
3320 esac
3321 ;;
3322 *-*-cygwin*)
3323 _host_cpu=
3324 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003325 *-*-vxworks*)
3326 _host_cpu=$host_cpu
3327 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003328 *)
3329 # for now, limit cross builds to known configurations
3330 MACHDEP="unknown"
3331 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3332 esac
3333 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3334fi
3335
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003336# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3337# disable features if it is defined, without any means to access these
3338# features as extensions. For these systems, we skip the definition of
3339# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3340# some feature, make sure there is no alternative way to access this
3341# feature. Also, when using wildcards, make sure you have verified the
3342# need for not defining _XOPEN_SOURCE on all systems matching the
3343# wildcard, and that the wildcard does not include future systems
3344# (which may remove their limitations).
3345case $ac_sys_system/$ac_sys_release in
3346 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3347 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003348 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003349 # In addition, Stefan Krah confirms that issue #1244610 exists through
3350 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003351 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003352 define_xopen_source=no
3353 # 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
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003358
3359 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003360 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003361 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3362 # also defined. This can be overridden by defining _BSD_SOURCE
3363 # As this has a different meaning on Linux, only define it on OpenBSD
3364
Matthias Kloseb9621712010-04-24 17:59:49 +00003365$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003366
3367 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003368 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3369 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3370 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003371 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 +00003372 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003373 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3374 # request to enable features supported by the standard as a request
3375 # to disable features not supported by the standard. The best way
3376 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3377 # entirely and define __EXTENSIONS__ instead.
3378 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003379 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003380 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3381 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003382 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003383 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003384 define_xopen_source=no;;
3385 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003386 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003387 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003388 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003389 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3390 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3391 # identifies itself as Darwin/7.*
3392 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # disables platform specific features beyond repair.
3394 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3395 # has no effect, don't bother defining them
3396 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003397 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003398 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003399 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003400 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3401 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3402 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003403 AIX/4)
3404 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003405 AIX/5)
3406 if test `uname -r` -eq 1; then
3407 define_xopen_source=no
3408 fi
3409 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003410 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3411 # defining NI_NUMERICHOST.
3412 QNX/6.3.2)
3413 define_xopen_source=no
3414 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003415 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3416 # in network headers still using system V types.
3417 VxWorks/*)
3418 define_xopen_source=no
3419 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003420
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421esac
3422
3423if test $define_xopen_source = yes
3424then
Victor Stinner14d098d2011-09-07 22:29:43 +02003425 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Victor Stinner14d098d2011-09-07 22:29:43 +02003427$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3431 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3432 # several APIs are not declared. Since this is also needed in some
3433 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003434
Matthias Kloseb9621712010-04-24 17:59:49 +00003435$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003436
3437
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003438
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003439$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003440
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003441fi
3442
Christian Heimes647cd872013-12-07 23:39:33 +01003443# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3444case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003445 hp*|HP*)
3446 define_stdc_a1=yes;;
3447 *)
3448 define_stdc_a1=no;;
3449esac
3450
3451if test $define_stdc_a1 = yes
3452then
Christian Heimes647cd872013-12-07 23:39:33 +01003453
3454$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3455
Christian Heimesb02bcae2013-12-08 15:21:08 +01003456fi
Christian Heimes647cd872013-12-07 23:39:33 +01003457
Jack Jansen6b08a402004-06-03 12:41:45 +00003458# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3459# it may influence the way we can build extensions, so distutils
3460# needs to check it
3461
Thomas Wouters477c8d52006-05-27 19:21:47 +00003462
Jack Jansen6b08a402004-06-03 12:41:45 +00003463CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003464EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003465
Guido van Rossum627b2d71993-12-24 10:39:16 +00003466# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003467
3468# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3469# for debug/optimization stuff. BASECFLAGS is for flags that are required
3470# just to get things to compile and link. Users are free to override OPT
3471# when running configure or make. The build should not break if they do.
3472# BASECFLAGS should generally not be messed with, however.
3473
Guido van Rossum8b131c51995-03-09 14:10:13 +00003474# If the user switches compilers, we can't believe the cache
3475if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3476then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003477 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003478(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003479fi
3480
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003481# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3482# when the compiler supports them, but we don't always want -O2, and
3483# we set -g later.
3484if test -z "$CFLAGS"; then
3485 CFLAGS=
3486fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003487
3488if test "$ac_sys_system" = "Darwin"
3489then
3490 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003491 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003492 # information
3493 if test -z "${CC}"
3494 then
3495 found_gcc=
3496 found_clang=
3497 as_save_IFS=$IFS; IFS=:
3498 for as_dir in $PATH
3499 do
3500 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003501 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003502 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003503 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003504 fi
3505 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003506 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003507 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003508 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003509 fi
3510 fi
3511 done
3512 IFS=$as_save_IFS
3513
3514 if test -n "$found_gcc" -a -n "$found_clang"
3515 then
3516 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3517 then
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3519$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3520 CC="$found_clang"
3521 CXX="$found_clang++"
3522 fi
3523
3524
3525 elif test -z "$found_gcc" -a -n "$found_clang"
3526 then
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3528$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3529 CC="$found_clang"
3530 CXX="$found_clang++"
3531
3532 elif test -z "$found_gcc" -a -z "$found_clang"
3533 then
3534 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3535 if test -n "${found_clang}"
3536 then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3538$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3539 CC="${found_clang}"
3540 CXX="`/usr/bin/xcrun -find clang++`"
3541
3542 # else: use default behaviour
3543 fi
3544 fi
3545 fi
3546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003547ac_ext=c
3548ac_cpp='$CPP $CPPFLAGS'
3549ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3550ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3551ac_compiler_gnu=$ac_cv_c_compiler_gnu
3552if test -n "$ac_tool_prefix"; then
3553 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3554set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3556$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003557if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003559else
3560 if test -n "$CC"; then
3561 ac_cv_prog_CC="$CC" # Let the user override the test.
3562else
Martin v. Löwis11437992002-04-12 09:54:03 +00003563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3564for as_dir in $PATH
3565do
3566 IFS=$as_save_IFS
3567 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003569 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003571 $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 +00003572 break 2
3573 fi
3574done
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003577
Jack Jansendd19cf82001-12-06 22:36:17 +00003578fi
3579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003580CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003581if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3583$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003584else
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3586$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003587fi
3588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590fi
3591if test -z "$ac_cv_prog_CC"; then
3592 ac_ct_CC=$CC
3593 # Extract the first word of "gcc", so it can be a program name with args.
3594set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3596$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003597if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003599else
3600 if test -n "$ac_ct_CC"; then
3601 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3602else
3603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 $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 +00003612 break 2
3613 fi
3614done
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003617
3618fi
3619fi
3620ac_ct_CC=$ac_cv_prog_ac_ct_CC
3621if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3623$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3626$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629 if test "x$ac_ct_CC" = x; then
3630 CC=""
3631 else
3632 case $cross_compiling:$ac_tool_warned in
3633yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003634{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3635$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636ac_tool_warned=yes ;;
3637esac
3638 CC=$ac_ct_CC
3639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003640else
3641 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003642fi
3643
Jack Jansendd19cf82001-12-06 22:36:17 +00003644if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 if test -n "$ac_tool_prefix"; then
3646 # 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 +00003647set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003650if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003652else
3653 if test -n "$CC"; then
3654 ac_cv_prog_CC="$CC" # Let the user override the test.
3655else
Martin v. Löwis11437992002-04-12 09:54:03 +00003656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $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 +00003665 break 2
3666 fi
3667done
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
3671fi
3672fi
3673CC=$ac_cv_prog_CC
3674if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3676$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680fi
3681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003684fi
3685if test -z "$CC"; then
3686 # Extract the first word of "cc", so it can be a program name with args.
3687set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3689$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003690if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003692else
3693 if test -n "$CC"; then
3694 ac_cv_prog_CC="$CC" # Let the user override the test.
3695else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003696 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3698for as_dir in $PATH
3699do
3700 IFS=$as_save_IFS
3701 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3705 ac_prog_rejected=yes
3706 continue
3707 fi
3708 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $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 +00003710 break 2
3711 fi
3712done
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003715
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716if test $ac_prog_rejected = yes; then
3717 # We found a bogon in the path, so make sure we never use it.
3718 set dummy $ac_cv_prog_CC
3719 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721 # We chose a different compiler from the bogus one.
3722 # However, it has the same basename, so the bogon will be chosen
3723 # first if we set CC to just the basename; use the full file name.
3724 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003725 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726 fi
3727fi
3728fi
3729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3733$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003734else
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003737fi
3738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 do
3745 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3746set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3748$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003749if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003751else
3752 if test -n "$CC"; then
3753 ac_cv_prog_CC="$CC" # Let the user override the test.
3754else
Martin v. Löwis11437992002-04-12 09:54:03 +00003755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3756for as_dir in $PATH
3757do
3758 IFS=$as_save_IFS
3759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $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 +00003764 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003766done
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003769
3770fi
3771fi
3772CC=$ac_cv_prog_CC
3773if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3775$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003776else
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3778$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003779fi
3780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 test -n "$CC" && break
3783 done
3784fi
3785if test -z "$CC"; then
3786 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003788do
3789 # Extract the first word of "$ac_prog", so it can be a program name with args.
3790set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3792$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003793if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
3796 if test -n "$ac_ct_CC"; then
3797 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3798else
3799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3800for as_dir in $PATH
3801do
3802 IFS=$as_save_IFS
3803 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $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 +00003808 break 2
3809 fi
3810done
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
3815fi
3816ac_ct_CC=$ac_cv_prog_ac_ct_CC
3817if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3819$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003820else
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3822$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 test -n "$ac_ct_CC" && break
3827done
Michael W. Hudson54241132001-12-07 15:38:26 +00003828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 if test "x$ac_ct_CC" = x; then
3830 CC=""
3831 else
3832 case $cross_compiling:$ac_tool_warned in
3833yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003834{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3835$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836ac_tool_warned=yes ;;
3837esac
3838 CC=$ac_ct_CC
3839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
3841
3842fi
3843
3844
Matthias Kloseb9621712010-04-24 17:59:49 +00003845test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003847as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003848See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003851$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3852set X $ac_compile
3853ac_compiler=$2
3854for ac_option in --version -v -V -qversion; do
3855 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856case "(($ac_try" in
3857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3858 *) ac_try_echo=$ac_try;;
3859esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3861$as_echo "$ac_try_echo"; } >&5
3862 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 if test -s conftest.err; then
3865 sed '10a\
3866... rest of stderr output deleted ...
3867 10q' conftest.err >conftest.er1
3868 cat conftest.er1 >&5
3869 fi
3870 rm -f conftest.er1 conftest.err
3871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3872 test $ac_status = 0; }
3873done
Martin v. Löwis11437992002-04-12 09:54:03 +00003874
Matthias Kloseb9621712010-04-24 17:59:49 +00003875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003876/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003877
Martin v. Löwis11437992002-04-12 09:54:03 +00003878int
3879main ()
3880{
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
3886ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003887ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003888# Try to create an executable without -o first, disregard a.out.
3889# It will help us diagnose broken compilers, and finding out an intuition
3890# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3892$as_echo_n "checking whether the C compiler works... " >&6; }
3893ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3894
3895# The possible output files:
3896ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898ac_rmfiles=
3899for ac_file in $ac_files
3900do
3901 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003902 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3904 esac
3905done
3906rm -f $ac_rmfiles
3907
Matthias Kloseb9621712010-04-24 17:59:49 +00003908if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3914$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3918 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3920# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3921# in a Makefile. We should not override ac_cv_exeext if it was cached,
3922# so that the user can short-circuit this test for compilers unknown to
3923# Autoconf.
3924for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003925do
3926 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003929 ;;
3930 [ab].out )
3931 # We found the default executable, but exeext='' is most
3932 # certainly right.
3933 break;;
3934 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 then :; else
3937 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3938 fi
3939 # We set ac_cv_exeext here because the later test for it is not
3940 # safe: cross compilers may not add the suffix if given an `-o'
3941 # argument, so we may need to know it at that point already.
3942 # Even if this section looks crufty: it has the advantage of
3943 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003944 break;;
3945 * )
3946 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 esac
3948done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949test "$ac_cv_exeext" = no && ac_cv_exeext=
3950
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003951else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 ac_file=''
3953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003954if test -z "$ac_file"; then :
3955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3956$as_echo "no" >&6; }
3957$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003958sed 's/^/| /' conftest.$ac_ext >&5
3959
Matthias Kloseb9621712010-04-24 17:59:49 +00003960{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003962as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003963See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003964else
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3966$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3969$as_echo_n "checking for C compiler default output file name... " >&6; }
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3971$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3977$as_echo_n "checking for suffix of executables... " >&6; }
3978if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3990# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3991# work properly (i.e., refer to `conftest.exe'), while it won't with
3992# `rm'.
3993for ac_file in conftest.exe conftest conftest.*; do
3994 test -f "$ac_file" || continue
3995 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3998 break;;
3999 * ) break;;
4000 esac
4001done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002else
Matthias Kloseb9621712010-04-24 17:59:49 +00004003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004005as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004006See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004008rm -f conftest conftest$ac_cv_exeext
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4010$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011
4012rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004013EXEEXT=$ac_cv_exeext
4014ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4016/* end confdefs.h. */
4017#include <stdio.h>
4018int
4019main ()
4020{
4021FILE *f = fopen ("conftest.out", "w");
4022 return ferror (f) || fclose (f) != 0;
4023
4024 ;
4025 return 0;
4026}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004028ac_clean_files="$ac_clean_files conftest.out"
4029# Check that the compiler produces executables we can run. If not, either
4030# the compiler is broken, or we cross compile.
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4032$as_echo_n "checking whether we are cross compiling... " >&6; }
4033if test "$cross_compiling" != yes; then
4034 { { ac_try="$ac_link"
4035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
4039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
4041 (eval "$ac_link") 2>&5
4042 ac_status=$?
4043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }
4045 if { ac_try='./conftest$ac_cv_exeext'
4046 { { case "(($ac_try" in
4047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4048 *) ac_try_echo=$ac_try;;
4049esac
4050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4051$as_echo "$ac_try_echo"; } >&5
4052 (eval "$ac_try") 2>&5
4053 ac_status=$?
4054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4055 test $ac_status = 0; }; }; then
4056 cross_compiling=no
4057 else
4058 if test "$cross_compiling" = maybe; then
4059 cross_compiling=yes
4060 else
4061 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004063as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004065See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 fi
4067 fi
4068fi
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4070$as_echo "$cross_compiling" >&6; }
4071
4072rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4073ac_clean_files=$ac_clean_files_save
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4075$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004076if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 $as_echo_n "(cached) " >&6
4078else
4079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080/* end confdefs.h. */
4081
4082int
4083main ()
4084{
4085
4086 ;
4087 return 0;
4088}
4089_ACEOF
4090rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004091if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004098 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004102 for ac_file in conftest.o conftest.obj conftest.*; do
4103 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004104 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004106 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4107 break;;
4108 esac
4109done
4110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004112sed 's/^/| /' conftest.$ac_ext >&5
4113
Matthias Kloseb9621712010-04-24 17:59:49 +00004114{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004116as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004117See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004118fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4122$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004123OBJEXT=$ac_cv_objext
4124ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4126$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004127if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004129else
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133int
4134main ()
4135{
4136#ifndef __GNUC__
4137 choke me
4138#endif
4139
4140 ;
4141 return 0;
4142}
4143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 ac_compiler_gnu=yes
4146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004150ac_cv_c_compiler_gnu=$ac_compiler_gnu
4151
4152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4154$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4155if test $ac_compiler_gnu = yes; then
4156 GCC=yes
4157else
4158 GCC=
4159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004160ac_test_CFLAGS=${CFLAGS+set}
4161ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4163$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004164if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004166else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004167 ac_save_c_werror_flag=$ac_c_werror_flag
4168 ac_c_werror_flag=yes
4169 ac_cv_prog_cc_g=no
4170 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004173
Martin v. Löwis11437992002-04-12 09:54:03 +00004174int
4175main ()
4176{
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004183 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184else
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 CFLAGS=""
4186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187/* end confdefs.h. */
4188
4189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198
Matthias Kloseb9621712010-04-24 17:59:49 +00004199else
4200 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203/* end confdefs.h. */
4204
4205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4221 ac_c_werror_flag=$ac_save_c_werror_flag
4222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4224$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004225if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004227elif test $ac_cv_prog_cc_g = yes; then
4228 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004229 CFLAGS="-g -O2"
4230 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004231 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232 fi
4233else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234 if test "$GCC" = yes; then
4235 CFLAGS="-O2"
4236 else
4237 CFLAGS=
4238 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4241$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004242if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004244else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004246ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004248/* end confdefs.h. */
4249#include <stdarg.h>
4250#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004251struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004252/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4253struct buf { int x; };
4254FILE * (*rcsopen) (struct buf *, struct stat *, int);
4255static char *e (p, i)
4256 char **p;
4257 int i;
4258{
4259 return p[i];
4260}
4261static char *f (char * (*g) (char **, int), char **p, ...)
4262{
4263 char *s;
4264 va_list v;
4265 va_start (v,p);
4266 s = g (p, va_arg (v,int));
4267 va_end (v);
4268 return s;
4269}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004270
4271/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4272 function prototypes and stuff, but not '\xHH' hex character constants.
4273 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004275 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4276 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004278int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4281 inside strings and character constants. */
4282#define FOO(x) 'x'
4283int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4284
Skip Montanaro6dead952003-09-25 14:50:04 +00004285int test (int i, double x);
4286struct s1 {int (*f) (int a);};
4287struct s2 {int (*f) (double a);};
4288int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4289int argc;
4290char **argv;
4291int
4292main ()
4293{
4294return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4295 ;
4296 return 0;
4297}
4298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4300 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004301do
4302 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306rm -f core conftest.err conftest.$ac_objext
4307 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004308done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004310CC=$ac_save_CC
4311
4312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313# AC_CACHE_VAL
4314case "x$ac_cv_prog_cc_c89" in
4315 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4317$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4320$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004321 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4324$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004325esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004326if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004327
Matthias Kloseb9621712010-04-24 17:59:49 +00004328fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004329
Martin v. Löwis11437992002-04-12 09:54:03 +00004330ac_ext=c
4331ac_cpp='$CPP $CPPFLAGS'
4332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4334ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004335
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004336ac_ext=c
4337ac_cpp='$CPP $CPPFLAGS'
4338ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4339ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4340ac_compiler_gnu=$ac_cv_c_compiler_gnu
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4342$as_echo_n "checking how to run the C preprocessor... " >&6; }
4343# On Suns, sometimes $CPP names a directory.
4344if test -n "$CPP" && test -d "$CPP"; then
4345 CPP=
4346fi
4347if test -z "$CPP"; then
4348 if ${ac_cv_prog_CPP+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350else
4351 # Double quotes because CPP needs to be expanded
4352 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4353 do
4354 ac_preproc_ok=false
4355for ac_c_preproc_warn_flag in '' yes
4356do
4357 # Use a header file that comes with gcc, so configuring glibc
4358 # with a fresh cross-compiler works.
4359 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4360 # <limits.h> exists even on freestanding compilers.
4361 # On the NeXT, cc -E runs the code through the compiler's parser,
4362 # not just through cpp. "Syntax error" is here to catch this case.
4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364/* end confdefs.h. */
4365#ifdef __STDC__
4366# include <limits.h>
4367#else
4368# include <assert.h>
4369#endif
4370 Syntax error
4371_ACEOF
4372if ac_fn_c_try_cpp "$LINENO"; then :
4373
4374else
4375 # Broken: fails on valid input.
4376continue
4377fi
4378rm -f conftest.err conftest.i conftest.$ac_ext
4379
4380 # OK, works on sane cases. Now check whether nonexistent headers
4381 # can be detected and how.
4382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4383/* end confdefs.h. */
4384#include <ac_nonexistent.h>
4385_ACEOF
4386if ac_fn_c_try_cpp "$LINENO"; then :
4387 # Broken: success on invalid input.
4388continue
4389else
4390 # Passes both tests.
4391ac_preproc_ok=:
4392break
4393fi
4394rm -f conftest.err conftest.i conftest.$ac_ext
4395
4396done
4397# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4398rm -f conftest.i conftest.err conftest.$ac_ext
4399if $ac_preproc_ok; then :
4400 break
4401fi
4402
4403 done
4404 ac_cv_prog_CPP=$CPP
4405
4406fi
4407 CPP=$ac_cv_prog_CPP
4408else
4409 ac_cv_prog_CPP=$CPP
4410fi
4411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4412$as_echo "$CPP" >&6; }
4413ac_preproc_ok=false
4414for ac_c_preproc_warn_flag in '' yes
4415do
4416 # Use a header file that comes with gcc, so configuring glibc
4417 # with a fresh cross-compiler works.
4418 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4419 # <limits.h> exists even on freestanding compilers.
4420 # On the NeXT, cc -E runs the code through the compiler's parser,
4421 # not just through cpp. "Syntax error" is here to catch this case.
4422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4423/* end confdefs.h. */
4424#ifdef __STDC__
4425# include <limits.h>
4426#else
4427# include <assert.h>
4428#endif
4429 Syntax error
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432
4433else
4434 # Broken: fails on valid input.
4435continue
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439 # OK, works on sane cases. Now check whether nonexistent headers
4440 # can be detected and how.
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442/* end confdefs.h. */
4443#include <ac_nonexistent.h>
4444_ACEOF
4445if ac_fn_c_try_cpp "$LINENO"; then :
4446 # Broken: success on invalid input.
4447continue
4448else
4449 # Passes both tests.
4450ac_preproc_ok=:
4451break
4452fi
4453rm -f conftest.err conftest.i conftest.$ac_ext
4454
4455done
4456# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4457rm -f conftest.i conftest.err conftest.$ac_ext
4458if $ac_preproc_ok; then :
4459
4460else
4461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4463as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4464See \`config.log' for more details" "$LINENO" 5; }
4465fi
4466
4467ac_ext=c
4468ac_cpp='$CPP $CPPFLAGS'
4469ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4470ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4471ac_compiler_gnu=$ac_cv_c_compiler_gnu
4472
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4474$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4475if ${ac_cv_path_GREP+:} false; then :
4476 $as_echo_n "(cached) " >&6
4477else
4478 if test -z "$GREP"; then
4479 ac_path_GREP_found=false
4480 # Loop through the user's path and test for each of PROGNAME-LIST
4481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4483do
4484 IFS=$as_save_IFS
4485 test -z "$as_dir" && as_dir=.
4486 for ac_prog in grep ggrep; do
4487 for ac_exec_ext in '' $ac_executable_extensions; do
4488 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4489 as_fn_executable_p "$ac_path_GREP" || continue
4490# Check for GNU ac_path_GREP and select it if it is found.
4491 # Check for GNU $ac_path_GREP
4492case `"$ac_path_GREP" --version 2>&1` in
4493*GNU*)
4494 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4495*)
4496 ac_count=0
4497 $as_echo_n 0123456789 >"conftest.in"
4498 while :
4499 do
4500 cat "conftest.in" "conftest.in" >"conftest.tmp"
4501 mv "conftest.tmp" "conftest.in"
4502 cp "conftest.in" "conftest.nl"
4503 $as_echo 'GREP' >> "conftest.nl"
4504 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4505 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4506 as_fn_arith $ac_count + 1 && ac_count=$as_val
4507 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4508 # Best one so far, save it but keep looking for a better one
4509 ac_cv_path_GREP="$ac_path_GREP"
4510 ac_path_GREP_max=$ac_count
4511 fi
4512 # 10*(2^10) chars as input seems more than enough
4513 test $ac_count -gt 10 && break
4514 done
4515 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4516esac
4517
4518 $ac_path_GREP_found && break 3
4519 done
4520 done
4521 done
4522IFS=$as_save_IFS
4523 if test -z "$ac_cv_path_GREP"; then
4524 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4525 fi
4526else
4527 ac_cv_path_GREP=$GREP
4528fi
4529
4530fi
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4532$as_echo "$ac_cv_path_GREP" >&6; }
4533 GREP="$ac_cv_path_GREP"
4534
4535
Łukasz Langaa785c872016-09-09 17:37:37 -07004536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4537$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4538if ${ac_cv_path_SED+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4542 for ac_i in 1 2 3 4 5 6 7; do
4543 ac_script="$ac_script$as_nl$ac_script"
4544 done
4545 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4546 { ac_script=; unset ac_script;}
4547 if test -z "$SED"; then
4548 ac_path_SED_found=false
4549 # Loop through the user's path and test for each of PROGNAME-LIST
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4551for as_dir in $PATH
4552do
4553 IFS=$as_save_IFS
4554 test -z "$as_dir" && as_dir=.
4555 for ac_prog in sed gsed; do
4556 for ac_exec_ext in '' $ac_executable_extensions; do
4557 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4558 as_fn_executable_p "$ac_path_SED" || continue
4559# Check for GNU ac_path_SED and select it if it is found.
4560 # Check for GNU $ac_path_SED
4561case `"$ac_path_SED" --version 2>&1` in
4562*GNU*)
4563 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4564*)
4565 ac_count=0
4566 $as_echo_n 0123456789 >"conftest.in"
4567 while :
4568 do
4569 cat "conftest.in" "conftest.in" >"conftest.tmp"
4570 mv "conftest.tmp" "conftest.in"
4571 cp "conftest.in" "conftest.nl"
4572 $as_echo '' >> "conftest.nl"
4573 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4574 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4575 as_fn_arith $ac_count + 1 && ac_count=$as_val
4576 if test $ac_count -gt ${ac_path_SED_max-0}; then
4577 # Best one so far, save it but keep looking for a better one
4578 ac_cv_path_SED="$ac_path_SED"
4579 ac_path_SED_max=$ac_count
4580 fi
4581 # 10*(2^10) chars as input seems more than enough
4582 test $ac_count -gt 10 && break
4583 done
4584 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4585esac
4586
4587 $ac_path_SED_found && break 3
4588 done
4589 done
4590 done
4591IFS=$as_save_IFS
4592 if test -z "$ac_cv_path_SED"; then
4593 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4594 fi
4595else
4596 ac_cv_path_SED=$SED
4597fi
4598
4599fi
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4601$as_echo "$ac_cv_path_SED" >&6; }
4602 SED="$ac_cv_path_SED"
4603 rm -f conftest.sed
4604
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004605
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004606
4607
Matthias Kloseb9621712010-04-24 17:59:49 +00004608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4609$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004611# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004612if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004613 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004614
4615 case $withval in
4616 no) with_cxx_main=no
4617 MAINCC='$(CC)';;
4618 yes) with_cxx_main=yes
4619 MAINCC='$(CXX)';;
4620 *) with_cxx_main=yes
4621 MAINCC=$withval
4622 if test -z "$CXX"
4623 then
4624 CXX=$withval
4625 fi;;
4626 esac
4627else
4628
4629 with_cxx_main=no
4630 MAINCC='$(CC)'
4631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004632fi
4633
Matthias Kloseb9621712010-04-24 17:59:49 +00004634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4635$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
4637preset_cxx="$CXX"
4638if test -z "$CXX"
4639then
4640 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004641 gcc) if test -n "$ac_tool_prefix"; then
4642 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4643set dummy ${ac_tool_prefix}g++; ac_word=$2
4644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645$as_echo_n "checking for $ac_word... " >&6; }
4646if ${ac_cv_path_CXX+:} false; then :
4647 $as_echo_n "(cached) " >&6
4648else
4649 case $CXX in
4650 [\\/]* | ?:[\\/]*)
4651 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4652 ;;
4653 *)
4654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in notfound
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004661 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4663 break 2
4664 fi
4665done
4666 done
4667IFS=$as_save_IFS
4668
4669 ;;
4670esac
4671fi
4672CXX=$ac_cv_path_CXX
4673if test -n "$CXX"; then
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4675$as_echo "$CXX" >&6; }
4676else
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4678$as_echo "no" >&6; }
4679fi
4680
4681
4682fi
4683if test -z "$ac_cv_path_CXX"; then
4684 ac_pt_CXX=$CXX
4685 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004686set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4688$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004689if ${ac_cv_path_ac_pt_CXX+:} false; then :
4690 $as_echo_n "(cached) " >&6
4691else
4692 case $ac_pt_CXX in
4693 [\\/]* | ?:[\\/]*)
4694 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4695 ;;
4696 *)
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in notfound
4699do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706 break 2
4707 fi
4708done
4709 done
4710IFS=$as_save_IFS
4711
4712 ;;
4713esac
4714fi
4715ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4716if test -n "$ac_pt_CXX"; then
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4718$as_echo "$ac_pt_CXX" >&6; }
4719else
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4721$as_echo "no" >&6; }
4722fi
4723
4724 if test "x$ac_pt_CXX" = x; then
4725 CXX="g++"
4726 else
4727 case $cross_compiling:$ac_tool_warned in
4728yes:)
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4730$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4731ac_tool_warned=yes ;;
4732esac
4733 CXX=$ac_pt_CXX
4734 fi
4735else
4736 CXX="$ac_cv_path_CXX"
4737fi
4738 ;;
4739 cc) if test -n "$ac_tool_prefix"; then
4740 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4741set dummy ${ac_tool_prefix}c++; ac_word=$2
4742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004744if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746else
4747 case $CXX in
4748 [\\/]* | ?:[\\/]*)
4749 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4750 ;;
4751 *)
4752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753for as_dir in notfound
4754do
4755 IFS=$as_save_IFS
4756 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761 break 2
4762 fi
4763done
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767 ;;
4768esac
4769fi
4770CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004771if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4773$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004774else
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004778
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004779
4780fi
4781if test -z "$ac_cv_path_CXX"; then
4782 ac_pt_CXX=$CXX
4783 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4786$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792 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 +00004793 ;;
4794 *)
4795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4796for as_dir in notfound
4797do
4798 IFS=$as_save_IFS
4799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004802 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 break 2
4805 fi
4806done
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004808IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
4811esac
4812fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4814if test -n "$ac_pt_CXX"; then
4815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4816$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004817else
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822 if test "x$ac_pt_CXX" = x; then
4823 CXX="c++"
4824 else
4825 case $cross_compiling:$ac_tool_warned in
4826yes:)
4827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4829ac_tool_warned=yes ;;
4830esac
4831 CXX=$ac_pt_CXX
4832 fi
4833else
4834 CXX="$ac_cv_path_CXX"
4835fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 clang|*/clang) if test -n "$ac_tool_prefix"; then
4838 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4839set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4841$as_echo_n "checking for $ac_word... " >&6; }
4842if ${ac_cv_path_CXX+:} false; then :
4843 $as_echo_n "(cached) " >&6
4844else
4845 case $CXX in
4846 [\\/]* | ?:[\\/]*)
4847 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4848 ;;
4849 *)
4850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4851for as_dir in notfound
4852do
4853 IFS=$as_save_IFS
4854 test -z "$as_dir" && as_dir=.
4855 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004857 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4859 break 2
4860 fi
4861done
4862 done
4863IFS=$as_save_IFS
4864
Ned Deilycbfb9a52012-06-23 16:02:19 -07004865 ;;
4866esac
4867fi
4868CXX=$ac_cv_path_CXX
4869if test -n "$CXX"; then
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4871$as_echo "$CXX" >&6; }
4872else
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4874$as_echo "no" >&6; }
4875fi
4876
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004877
4878fi
4879if test -z "$ac_cv_path_CXX"; then
4880 ac_pt_CXX=$CXX
4881 # Extract the first word of "clang++", so it can be a program name with args.
4882set dummy clang++; ac_word=$2
4883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if ${ac_cv_path_ac_pt_CXX+:} false; then :
4886 $as_echo_n "(cached) " >&6
4887else
4888 case $ac_pt_CXX in
4889 [\\/]* | ?:[\\/]*)
4890 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4891 ;;
4892 *)
4893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in notfound
4895do
4896 IFS=$as_save_IFS
4897 test -z "$as_dir" && as_dir=.
4898 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004900 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902 break 2
4903 fi
4904done
4905 done
4906IFS=$as_save_IFS
4907
4908 ;;
4909esac
4910fi
4911ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4912if test -n "$ac_pt_CXX"; then
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4914$as_echo "$ac_pt_CXX" >&6; }
4915else
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
4920 if test "x$ac_pt_CXX" = x; then
4921 CXX="clang++"
4922 else
4923 case $cross_compiling:$ac_tool_warned in
4924yes:)
4925{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4926$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4927ac_tool_warned=yes ;;
4928esac
4929 CXX=$ac_pt_CXX
4930 fi
4931else
4932 CXX="$ac_cv_path_CXX"
4933fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004934 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004935 icc|*/icc) if test -n "$ac_tool_prefix"; then
4936 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4937set dummy ${ac_tool_prefix}icpc; ac_word=$2
4938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4939$as_echo_n "checking for $ac_word... " >&6; }
4940if ${ac_cv_path_CXX+:} false; then :
4941 $as_echo_n "(cached) " >&6
4942else
4943 case $CXX in
4944 [\\/]* | ?:[\\/]*)
4945 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4946 ;;
4947 *)
4948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949for as_dir in notfound
4950do
4951 IFS=$as_save_IFS
4952 test -z "$as_dir" && as_dir=.
4953 for ac_exec_ext in '' $ac_executable_extensions; do
4954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4955 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4957 break 2
4958 fi
4959done
4960 done
4961IFS=$as_save_IFS
4962
4963 ;;
4964esac
4965fi
4966CXX=$ac_cv_path_CXX
4967if test -n "$CXX"; then
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4969$as_echo "$CXX" >&6; }
4970else
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4972$as_echo "no" >&6; }
4973fi
4974
4975
4976fi
4977if test -z "$ac_cv_path_CXX"; then
4978 ac_pt_CXX=$CXX
4979 # Extract the first word of "icpc", so it can be a program name with args.
4980set dummy icpc; ac_word=$2
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4982$as_echo_n "checking for $ac_word... " >&6; }
4983if ${ac_cv_path_ac_pt_CXX+:} false; then :
4984 $as_echo_n "(cached) " >&6
4985else
4986 case $ac_pt_CXX in
4987 [\\/]* | ?:[\\/]*)
4988 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4989 ;;
4990 *)
4991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992for as_dir in notfound
4993do
4994 IFS=$as_save_IFS
4995 test -z "$as_dir" && as_dir=.
4996 for ac_exec_ext in '' $ac_executable_extensions; do
4997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4998 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000 break 2
5001 fi
5002done
5003 done
5004IFS=$as_save_IFS
5005
5006 ;;
5007esac
5008fi
5009ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5010if test -n "$ac_pt_CXX"; then
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5012$as_echo "$ac_pt_CXX" >&6; }
5013else
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5015$as_echo "no" >&6; }
5016fi
5017
5018 if test "x$ac_pt_CXX" = x; then
5019 CXX="icpc"
5020 else
5021 case $cross_compiling:$ac_tool_warned in
5022yes:)
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5025ac_tool_warned=yes ;;
5026esac
5027 CXX=$ac_pt_CXX
5028 fi
5029else
5030 CXX="$ac_cv_path_CXX"
5031fi
5032 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005033 esac
5034 if test "$CXX" = "notfound"
5035 then
5036 CXX=""
5037 fi
5038fi
5039if test -z "$CXX"
5040then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005041 if test -n "$ac_tool_prefix"; then
5042 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5043 do
5044 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5047$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005048if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050else
5051 if test -n "$CXX"; then
5052 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5053else
5054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055for as_dir in $PATH
5056do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005061 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063 break 2
5064 fi
5065done
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005068
5069fi
5070fi
5071CXX=$ac_cv_prog_CXX
5072if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5074$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005075else
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5077$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078fi
5079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005081 test -n "$CXX" && break
5082 done
5083fi
5084if test -z "$CXX"; then
5085 ac_ct_CXX=$CXX
5086 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5087do
5088 # Extract the first word of "$ac_prog", so it can be a program name with args.
5089set dummy $ac_prog; ac_word=$2
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091$as_echo_n "checking for $ac_word... " >&6; }
5092if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5093 $as_echo_n "(cached) " >&6
5094else
5095 if test -n "$ac_ct_CXX"; then
5096 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5097else
5098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101 IFS=$as_save_IFS
5102 test -z "$as_dir" && as_dir=.
5103 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005105 ac_cv_prog_ac_ct_CXX="$ac_prog"
5106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 break 2
5108 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005109done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005110 done
5111IFS=$as_save_IFS
5112
5113fi
5114fi
5115ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5116if test -n "$ac_ct_CXX"; then
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5118$as_echo "$ac_ct_CXX" >&6; }
5119else
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125 test -n "$ac_ct_CXX" && break
5126done
5127
5128 if test "x$ac_ct_CXX" = x; then
5129 CXX="notfound"
5130 else
5131 case $cross_compiling:$ac_tool_warned in
5132yes:)
5133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5135ac_tool_warned=yes ;;
5136esac
5137 CXX=$ac_ct_CXX
5138 fi
5139fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140
5141 if test "$CXX" = "notfound"
5142 then
5143 CXX=""
5144 fi
5145fi
5146if test "$preset_cxx" != "$CXX"
5147then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005148 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005149
5150 By default, distutils will build C++ extension modules with \"$CXX\".
5151 If this is not intended, then set CXX on the configure command line.
5152 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005153$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154
5155 By default, distutils will build C++ extension modules with \"$CXX\".
5156 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005157 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005158fi
5159
5160
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005161MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5162
5163
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5165$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5166cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005167#undef bfin
5168#undef cris
5169#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005170#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005171#undef hppa
5172#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005173#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005174#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005175#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005176#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005177#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005178#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005179 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005180#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005181# if defined(__x86_64__) && defined(__LP64__)
5182 x86_64-linux-gnu
5183# elif defined(__x86_64__) && defined(__ILP32__)
5184 x86_64-linux-gnux32
5185# elif defined(__i386__)
5186 i386-linux-gnu
5187# elif defined(__aarch64__) && defined(__AARCH64EL__)
5188# if defined(__ILP32__)
5189 aarch64_ilp32-linux-gnu
5190# else
5191 aarch64-linux-gnu
5192# endif
5193# elif defined(__aarch64__) && defined(__AARCH64EB__)
5194# if defined(__ILP32__)
5195 aarch64_be_ilp32-linux-gnu
5196# else
5197 aarch64_be-linux-gnu
5198# endif
5199# elif defined(__alpha__)
5200 alpha-linux-gnu
5201# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5202# if defined(__ARMEL__)
5203 arm-linux-gnueabihf
5204# else
5205 armeb-linux-gnueabihf
5206# endif
5207# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5208# if defined(__ARMEL__)
5209 arm-linux-gnueabi
5210# else
5211 armeb-linux-gnueabi
5212# endif
5213# elif defined(__hppa__)
5214 hppa-linux-gnu
5215# elif defined(__ia64__)
5216 ia64-linux-gnu
5217# elif defined(__m68k__) && !defined(__mcoldfire__)
5218 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005219# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5220# if _MIPS_SIM == _ABIO32
5221 mipsisa32r6el-linux-gnu
5222# elif _MIPS_SIM == _ABIN32
5223 mipsisa64r6el-linux-gnuabin32
5224# elif _MIPS_SIM == _ABI64
5225 mipsisa64r6el-linux-gnuabi64
5226# else
5227# error unknown platform triplet
5228# endif
5229# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5230# if _MIPS_SIM == _ABIO32
5231 mipsisa32r6-linux-gnu
5232# elif _MIPS_SIM == _ABIN32
5233 mipsisa64r6-linux-gnuabin32
5234# elif _MIPS_SIM == _ABI64
5235 mipsisa64r6-linux-gnuabi64
5236# else
5237# error unknown platform triplet
5238# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005239# elif defined(__mips_hard_float) && defined(_MIPSEL)
5240# if _MIPS_SIM == _ABIO32
5241 mipsel-linux-gnu
5242# elif _MIPS_SIM == _ABIN32
5243 mips64el-linux-gnuabin32
5244# elif _MIPS_SIM == _ABI64
5245 mips64el-linux-gnuabi64
5246# else
5247# error unknown platform triplet
5248# endif
5249# elif defined(__mips_hard_float)
5250# if _MIPS_SIM == _ABIO32
5251 mips-linux-gnu
5252# elif _MIPS_SIM == _ABIN32
5253 mips64-linux-gnuabin32
5254# elif _MIPS_SIM == _ABI64
5255 mips64-linux-gnuabi64
5256# else
5257# error unknown platform triplet
5258# endif
5259# elif defined(__or1k__)
5260 or1k-linux-gnu
5261# elif defined(__powerpc__) && defined(__SPE__)
5262 powerpc-linux-gnuspe
5263# elif defined(__powerpc64__)
5264# if defined(__LITTLE_ENDIAN__)
5265 powerpc64le-linux-gnu
5266# else
5267 powerpc64-linux-gnu
5268# endif
5269# elif defined(__powerpc__)
5270 powerpc-linux-gnu
5271# elif defined(__s390x__)
5272 s390x-linux-gnu
5273# elif defined(__s390__)
5274 s390-linux-gnu
5275# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5276 sh4-linux-gnu
5277# elif defined(__sparc__) && defined(__arch64__)
5278 sparc64-linux-gnu
5279# elif defined(__sparc__)
5280 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005281# elif defined(__riscv)
5282# if __riscv_xlen == 32
5283 riscv32-linux-gnu
5284# elif __riscv_xlen == 64
5285 riscv64-linux-gnu
5286# else
5287# error unknown platform triplet
5288# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005289# else
5290# error unknown platform triplet
5291# endif
5292#elif defined(__FreeBSD_kernel__)
5293# if defined(__LP64__)
5294 x86_64-kfreebsd-gnu
5295# elif defined(__i386__)
5296 i386-kfreebsd-gnu
5297# else
5298# error unknown platform triplet
5299# endif
5300#elif defined(__gnu_hurd__)
5301 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005302#elif defined(__APPLE__)
5303 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005304#elif defined(__VXWORKS__)
5305 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005306#else
5307# error unknown platform triplet
5308#endif
5309
5310EOF
5311
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005312if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5315$as_echo "$PLATFORM_TRIPLET" >&6; }
5316else
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5318$as_echo "none" >&6; }
5319fi
5320rm -f conftest.c conftest.out
5321
5322if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5323 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5324 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5325 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005326elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5327 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329
doko@ubuntu.com55532312016-06-14 08:55:19 +02005330if test x$MULTIARCH != x; then
5331 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5332fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333
5334
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5336$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5337save_LDFLAGS="$LDFLAGS"
5338LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005339
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5341/* end confdefs.h. */
5342
5343int
5344main ()
5345{
5346
5347 ;
5348 return 0;
5349}
5350_ACEOF
5351if ac_fn_c_try_link "$LINENO"; then :
5352 NO_AS_NEEDED="-Wl,--no-as-needed"
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5354$as_echo "yes" >&6; }
5355else
5356 NO_AS_NEEDED=""
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5358$as_echo "no" >&6; }
5359fi
5360rm -f core conftest.err conftest.$ac_objext \
5361 conftest$ac_exeext conftest.$ac_ext
5362LDFLAGS="$save_LDFLAGS"
5363
5364
5365
5366# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005367
Matthias Kloseb9621712010-04-24 17:59:49 +00005368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5369$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005370if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372else
5373 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5374 then ac_cv_path_EGREP="$GREP -E"
5375 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 # Loop through the user's path and test for each of PROGNAME-LIST
5379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5381do
5382 IFS=$as_save_IFS
5383 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 for ac_prog in egrep; do
5385 for ac_exec_ext in '' $ac_executable_extensions; do
5386 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005387 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005388# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 # Check for GNU $ac_path_EGREP
5390case `"$ac_path_EGREP" --version 2>&1` in
5391*GNU*)
5392 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5393*)
5394 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 while :
5397 do
5398 cat "conftest.in" "conftest.in" >"conftest.tmp"
5399 mv "conftest.tmp" "conftest.in"
5400 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5403 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5406 # Best one so far, save it but keep looking for a better one
5407 ac_cv_path_EGREP="$ac_path_EGREP"
5408 ac_path_EGREP_max=$ac_count
5409 fi
5410 # 10*(2^10) chars as input seems more than enough
5411 test $ac_count -gt 10 && break
5412 done
5413 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5414esac
5415
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 $ac_path_EGREP_found && break 3
5417 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005422 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 +00005423 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424else
5425 ac_cv_path_EGREP=$EGREP
5426fi
5427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 fi
5429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5431$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005433
5434
Matthias Kloseb9621712010-04-24 17:59:49 +00005435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5436$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005437if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 $as_echo_n "(cached) " >&6
5439else
5440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005441/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005442#include <stdlib.h>
5443#include <stdarg.h>
5444#include <string.h>
5445#include <float.h>
5446
5447int
5448main ()
5449{
5450
5451 ;
5452 return 0;
5453}
5454_ACEOF
5455if ac_fn_c_try_compile "$LINENO"; then :
5456 ac_cv_header_stdc=yes
5457else
5458 ac_cv_header_stdc=no
5459fi
5460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461
5462if test $ac_cv_header_stdc = yes; then
5463 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5465/* end confdefs.h. */
5466#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005468_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005470 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005472else
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005474fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005475rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476
Matthias Kloseb9621712010-04-24 17:59:49 +00005477fi
5478
5479if test $ac_cv_header_stdc = yes; then
5480 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h. */
5483#include <stdlib.h>
5484
5485_ACEOF
5486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5487 $EGREP "free" >/dev/null 2>&1; then :
5488
5489else
5490 ac_cv_header_stdc=no
5491fi
5492rm -f conftest*
5493
5494fi
5495
5496if test $ac_cv_header_stdc = yes; then
5497 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5498 if test "$cross_compiling" = yes; then :
5499 :
5500else
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#include <ctype.h>
5504#include <stdlib.h>
5505#if ((' ' & 0x0FF) == 0x020)
5506# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5507# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5508#else
5509# define ISLOWER(c) \
5510 (('a' <= (c) && (c) <= 'i') \
5511 || ('j' <= (c) && (c) <= 'r') \
5512 || ('s' <= (c) && (c) <= 'z'))
5513# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5514#endif
5515
5516#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5517int
5518main ()
5519{
5520 int i;
5521 for (i = 0; i < 256; i++)
5522 if (XOR (islower (i), ISLOWER (i))
5523 || toupper (i) != TOUPPER (i))
5524 return 2;
5525 return 0;
5526}
5527_ACEOF
5528if ac_fn_c_try_run "$LINENO"; then :
5529
5530else
5531 ac_cv_header_stdc=no
5532fi
5533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5534 conftest.$ac_objext conftest.beam conftest.$ac_ext
5535fi
5536
5537fi
5538fi
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5540$as_echo "$ac_cv_header_stdc" >&6; }
5541if test $ac_cv_header_stdc = yes; then
5542
5543$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5544
5545fi
5546
5547# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5548for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5549 inttypes.h stdint.h unistd.h
5550do :
5551 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5552ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5553"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005554if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005555 cat >>confdefs.h <<_ACEOF
5556#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5557_ACEOF
5558
5559fi
5560
5561done
5562
5563
5564
5565 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 +02005566if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005567 MINIX=yes
5568else
5569 MINIX=
5570fi
5571
5572
5573 if test "$MINIX" = yes; then
5574
5575$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5576
5577
5578$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5579
5580
5581$as_echo "#define _MINIX 1" >>confdefs.h
5582
5583 fi
5584
5585
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5587$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005588if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005589 $as_echo_n "(cached) " >&6
5590else
5591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5592/* end confdefs.h. */
5593
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005594# define __EXTENSIONS__ 1
5595 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005596int
5597main ()
5598{
5599
5600 ;
5601 return 0;
5602}
5603_ACEOF
5604if ac_fn_c_try_compile "$LINENO"; then :
5605 ac_cv_safe_to_define___extensions__=yes
5606else
5607 ac_cv_safe_to_define___extensions__=no
5608fi
5609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5610fi
5611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5612$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5613 test $ac_cv_safe_to_define___extensions__ = yes &&
5614 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5615
5616 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5617
5618 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5619
5620 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5621
5622 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5623
5624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5627$as_echo_n "checking for the Android API level... " >&6; }
5628cat >> conftest.c <<EOF
5629#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005630android_api = __ANDROID_API__
5631arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632#else
5633#error not Android
5634#endif
5635EOF
5636
5637if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005638 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5639 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5641$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005642 if test -z "$ANDROID_API_LEVEL"; then
5643 echo 'Fatal: you must define __ANDROID_API__'
5644 exit 1
5645 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005646
5647cat >>confdefs.h <<_ACEOF
5648#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5649_ACEOF
5650
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005651
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5653$as_echo_n "checking for the Android arm ABI... " >&6; }
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5655$as_echo "$_arm_arch" >&6; }
5656 if test "$_arm_arch" = 7; then
5657 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5658 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5659 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660else
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5662$as_echo "not Android" >&6; }
5663fi
5664rm -f conftest.c conftest.out
5665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666# Check for unsupported systems
5667case $ac_sys_system/$ac_sys_release in
5668atheos*|Linux*/1*)
5669 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5670 echo See README for details.
5671 exit 1;;
5672esac
5673
5674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5676$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677
5678# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005679if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 withval=$with_suffix;
5681 case $withval in
5682 no) EXEEXT=;;
5683 yes) EXEEXT=.exe;;
5684 *) EXEEXT=$withval;;
5685 esac
5686fi
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5689$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
5691# Test whether we're running on a non-case-sensitive system, in which
5692# case we give a warning if no ext is given
5693
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5695$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696if test ! -d CaseSensitiveTestDir; then
5697mkdir CaseSensitiveTestDir
5698fi
5699
5700if test -d casesensitivetestdir
5701then
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5703$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 BUILDEXEEXT=.exe
5705else
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5707$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 BUILDEXEEXT=$EXEEXT
5709fi
5710rmdir CaseSensitiveTestDir
5711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712case $ac_sys_system in
5713hp*|HP*)
5714 case $CC in
5715 cc|*/cc) CC="$CC -Ae";;
5716 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717esac
5718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
Matthias Kloseb9621712010-04-24 17:59:49 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5721$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722if test -z "$LIBRARY"
5723then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005724 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5727$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
5729# LDLIBRARY is the name of the library to link against (as opposed to the
5730# name of the library into which to insert object files). BLDLIBRARY is also
5731# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5732# is blank as the main program is not linked directly against LDLIBRARY.
5733# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5734# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5735# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5736# DLLLIBRARY is the shared (i.e., DLL) library.
5737#
5738# RUNSHARED is used to run shared python without installed libraries
5739#
5740# INSTSONAME is the name of the shared library that will be use to install
5741# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005742#
5743# LDVERSION is the shared library version number, normally the Python version
5744# with the ABI build flags appended.
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747
5748
5749
5750
5751
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753LDLIBRARY="$LIBRARY"
5754BLDLIBRARY='$(LDLIBRARY)'
5755INSTSONAME='$(LDLIBRARY)'
5756DLLLIBRARY=''
5757LDLIBRARYDIR=''
5758RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005759LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760
5761# LINKCC is the command that links the python executable -- default is $(CC).
5762# If CXX is set, and if it is needed to link a main function that was
5763# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5764# python might then depend on the C++ runtime
5765# This is altered for AIX in order to build the export list before
5766# linking.
5767
Matthias Kloseb9621712010-04-24 17:59:49 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5769$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770if test -z "$LINKCC"
5771then
5772 LINKCC='$(PURIFY) $(MAINCC)'
5773 case $ac_sys_system in
5774 AIX*)
5775 exp_extra="\"\""
5776 if test $ac_sys_release -ge 5 -o \
5777 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5778 exp_extra="."
5779 fi
5780 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781 QNX*)
5782 # qcc must be used because the other compilers do not
5783 # support -N.
5784 LINKCC=qcc;;
5785 esac
5786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5788$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789
5790# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5791# make sure we default having it set to "no": this is used by
5792# distutils.unixccompiler to know if it should add --enable-new-dtags
5793# to linker command lines, and failing to detect GNU ld simply results
5794# in the same bahaviour as before.
5795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5797$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798ac_prog=ld
5799if test "$GCC" = yes; then
5800 ac_prog=`$CC -print-prog-name=ld`
5801fi
5802case `"$ac_prog" -V 2>&1 < /dev/null` in
5803 *GNU*)
5804 GNULD=yes;;
5805 *)
5806 GNULD=no;;
5807esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5809$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810
Matthias Kloseb9621712010-04-24 17:59:49 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5812$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005814if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 enableval=$enable_shared;
5816fi
5817
5818
5819if test -z "$enable_shared"
5820then
5821 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005822 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 enable_shared="yes";;
5824 *)
5825 enable_shared="no";;
5826 esac
5827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5829$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5832$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005835 enableval=$enable_profiling;
5836fi
5837
5838if test "x$enable_profiling" = xyes; then
5839 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005840 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842/* end confdefs.h. */
5843int main() { return 0; }
5844_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005845if ac_fn_c_try_link "$LINENO"; then :
5846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850rm -f core conftest.err conftest.$ac_objext \
5851 conftest$ac_exeext conftest.$ac_ext
5852 CC="$ac_save_cc"
5853else
5854 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5857$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
doko@ubuntu.comba015832012-06-30 16:52:05 +02005859if test "x$enable_profiling" = xyes; then
5860 BASECFLAGS="-pg $BASECFLAGS"
5861 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862fi
5863
Matthias Kloseb9621712010-04-24 17:59:49 +00005864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5865$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
5867# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5868# library that we build, but we do not want to link against it (we
5869# will find it with a -framework option). For this reason there is an
5870# extra variable BLDLIBRARY against which Python and the extension
5871# modules are linked, BLDLIBRARY. This is normally the same as
5872# LDLIBRARY, but empty for MacOSX framework builds.
5873if test "$enable_framework"
5874then
5875 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005876 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 BLDLIBRARY=''
5878else
5879 BLDLIBRARY='$(LDLIBRARY)'
5880fi
5881
5882# Other platforms follow
5883if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005884 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885
Matthias Kloseb9621712010-04-24 17:59:49 +00005886$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887
5888 case $ac_sys_system in
5889 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005890 LDLIBRARY='libpython$(LDVERSION).dll.a'
5891 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 ;;
5893 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005894 LDLIBRARY='libpython$(LDVERSION).so'
5895 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005898 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005899 then
5900 PY3LIBRARY=libpython3.so
5901 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005903 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).so'
5905 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005906 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005908 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005909 then
5910 PY3LIBRARY=libpython3.so
5911 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 hp*|HP*)
5914 case `uname -m` in
5915 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
5918 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
5921 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005923 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).dylib'
5927 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005928 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005930 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005932 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005933 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
5935 esac
5936else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005937 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 case $ac_sys_system in
5939 CYGWIN*)
5940 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 esac
5944fi
5945
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005946if test "$cross_compiling" = yes; then
5947 RUNSHARED=
5948fi
5949
Matthias Kloseb9621712010-04-24 17:59:49 +00005950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5951$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005954if test -n "$ac_tool_prefix"; then
5955 for ac_prog in ar aal
5956 do
5957 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5958set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5960$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005961if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963else
5964 if test -n "$AR"; then
5965 ac_cv_prog_AR="$AR" # Let the user override the test.
5966else
5967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968for as_dir in $PATH
5969do
5970 IFS=$as_save_IFS
5971 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005974 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 break 2
5977 fi
5978done
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980IFS=$as_save_IFS
5981
5982fi
5983fi
5984AR=$ac_cv_prog_AR
5985if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5987$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988else
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991fi
5992
5993
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005994 test -n "$AR" && break
5995 done
5996fi
5997if test -z "$AR"; then
5998 ac_ct_AR=$AR
5999 for ac_prog in ar aal
6000do
6001 # Extract the first word of "$ac_prog", so it can be a program name with args.
6002set dummy $ac_prog; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if ${ac_cv_prog_ac_ct_AR+:} false; then :
6006 $as_echo_n "(cached) " >&6
6007else
6008 if test -n "$ac_ct_AR"; then
6009 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6010else
6011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6012for as_dir in $PATH
6013do
6014 IFS=$as_save_IFS
6015 test -z "$as_dir" && as_dir=.
6016 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006018 ac_cv_prog_ac_ct_AR="$ac_prog"
6019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6020 break 2
6021 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006023 done
6024IFS=$as_save_IFS
6025
6026fi
6027fi
6028ac_ct_AR=$ac_cv_prog_ac_ct_AR
6029if test -n "$ac_ct_AR"; then
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6031$as_echo "$ac_ct_AR" >&6; }
6032else
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034$as_echo "no" >&6; }
6035fi
6036
6037
6038 test -n "$ac_ct_AR" && break
6039done
6040
6041 if test "x$ac_ct_AR" = x; then
6042 AR="ar"
6043 else
6044 case $cross_compiling:$ac_tool_warned in
6045yes:)
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6048ac_tool_warned=yes ;;
6049esac
6050 AR=$ac_ct_AR
6051 fi
6052fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053
6054
6055# tweak ARFLAGS only if the user didn't set it on the command line
6056
6057if test -z "$ARFLAGS"
6058then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006059 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060fi
6061
doko@ubuntu.com58844492012-06-30 18:25:32 +02006062if test -n "$ac_tool_prefix"; then
6063 for ac_prog in readelf
6064 do
6065 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6068$as_echo_n "checking for $ac_word... " >&6; }
6069if ${ac_cv_prog_READELF+:} false; then :
6070 $as_echo_n "(cached) " >&6
6071else
6072 if test -n "$READELF"; then
6073 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6074else
6075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH
6077do
6078 IFS=$as_save_IFS
6079 test -z "$as_dir" && as_dir=.
6080 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006082 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6084 break 2
6085 fi
6086done
6087 done
6088IFS=$as_save_IFS
6089
6090fi
6091fi
6092READELF=$ac_cv_prog_READELF
6093if test -n "$READELF"; then
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6095$as_echo "$READELF" >&6; }
6096else
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6098$as_echo "no" >&6; }
6099fi
6100
6101
6102 test -n "$READELF" && break
6103 done
6104fi
6105if test -z "$READELF"; then
6106 ac_ct_READELF=$READELF
6107 for ac_prog in readelf
6108do
6109 # Extract the first word of "$ac_prog", so it can be a program name with args.
6110set dummy $ac_prog; ac_word=$2
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6112$as_echo_n "checking for $ac_word... " >&6; }
6113if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6114 $as_echo_n "(cached) " >&6
6115else
6116 if test -n "$ac_ct_READELF"; then
6117 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6118else
6119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH
6121do
6122 IFS=$as_save_IFS
6123 test -z "$as_dir" && as_dir=.
6124 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006126 ac_cv_prog_ac_ct_READELF="$ac_prog"
6127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128 break 2
6129 fi
6130done
6131 done
6132IFS=$as_save_IFS
6133
6134fi
6135fi
6136ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6137if test -n "$ac_ct_READELF"; then
6138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6139$as_echo "$ac_ct_READELF" >&6; }
6140else
6141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146 test -n "$ac_ct_READELF" && break
6147done
6148
6149 if test "x$ac_ct_READELF" = x; then
6150 READELF=":"
6151 else
6152 case $cross_compiling:$ac_tool_warned in
6153yes:)
6154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6156ac_tool_warned=yes ;;
6157esac
6158 READELF=$ac_ct_READELF
6159 fi
6160fi
6161
6162if test "$cross_compiling" = yes; then
6163 case "$READELF" in
6164 readelf|:)
6165 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6166 ;;
6167 esac
6168fi
6169
6170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006173hp*|HP*)
6174 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175 if test -z "$INSTALL"
6176 then
6177 INSTALL="${srcdir}/install-sh -c"
6178 fi
6179esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180# Find a good install program. We prefer a C program (faster),
6181# so one script is as good as another. But avoid the broken or
6182# incompatible versions:
6183# SysV /etc/install, /usr/sbin/install
6184# SunOS /usr/etc/install
6185# IRIX /sbin/install
6186# AIX /bin/install
6187# AmigaOS /C/install, which installs bootblocks on floppy discs
6188# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6189# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6190# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6191# OS/2's system install, which has a completely different semantic
6192# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006193# Reject install programs that cannot install multiple files.
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6195$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006197if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199else
6200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6201for as_dir in $PATH
6202do
6203 IFS=$as_save_IFS
6204 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006205 # Account for people who put trailing slashes in PATH elements.
6206case $as_dir/ in #((
6207 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210 /usr/ucb/* ) ;;
6211 *)
6212 # OSF1 and SCO ODT 3.0 have their own names for install.
6213 # Don't use installbsd from OSF since it installs stuff as root
6214 # by default.
6215 for ac_prog in ginstall scoinst install; do
6216 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006217 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218 if test $ac_prog = install &&
6219 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6220 # AIX install. It has an incompatible calling convention.
6221 :
6222 elif test $ac_prog = install &&
6223 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6224 # program-specific install script used by HP pwplus--don't use.
6225 :
6226 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006227 rm -rf conftest.one conftest.two conftest.dir
6228 echo one > conftest.one
6229 echo two > conftest.two
6230 mkdir conftest.dir
6231 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6232 test -s conftest.one && test -s conftest.two &&
6233 test -s conftest.dir/conftest.one &&
6234 test -s conftest.dir/conftest.two
6235 then
6236 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6237 break 3
6238 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239 fi
6240 fi
6241 done
6242 done
6243 ;;
6244esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006245
6246 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247IFS=$as_save_IFS
6248
Matthias Kloseb9621712010-04-24 17:59:49 +00006249rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250
6251fi
6252 if test "${ac_cv_path_install+set}" = set; then
6253 INSTALL=$ac_cv_path_install
6254 else
6255 # As a last resort, use the slow shell script. Don't cache a
6256 # value for INSTALL within a source directory, because that will
6257 # break other packages using the cache if that directory is
6258 # removed, or if the value is a relative name.
6259 INSTALL=$ac_install_sh
6260 fi
6261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6263$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264
6265# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6266# It thinks the first close brace ends the variable substitution.
6267test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6268
6269test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6270
6271test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6272
Matthias Klose93a0ef12012-03-15 18:08:34 +01006273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6274$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6275if test -z "$MKDIR_P"; then
6276 if ${ac_cv_path_mkdir+:} false; then :
6277 $as_echo_n "(cached) " >&6
6278else
6279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6281do
6282 IFS=$as_save_IFS
6283 test -z "$as_dir" && as_dir=.
6284 for ac_prog in mkdir gmkdir; do
6285 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006286 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006287 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6288 'mkdir (GNU coreutils) '* | \
6289 'mkdir (coreutils) '* | \
6290 'mkdir (fileutils) '4.1*)
6291 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6292 break 3;;
6293 esac
6294 done
6295 done
6296 done
6297IFS=$as_save_IFS
6298
6299fi
6300
6301 test -d ./--version && rmdir ./--version
6302 if test "${ac_cv_path_mkdir+set}" = set; then
6303 MKDIR_P="$ac_cv_path_mkdir -p"
6304 else
6305 # As a last resort, use the slow shell script. Don't cache a
6306 # value for MKDIR_P within a source directory, because that will
6307 # break other packages using the cache if that directory is
6308 # removed, or if the value is a relative name.
6309 MKDIR_P="$ac_install_sh -d"
6310 fi
6311fi
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6313$as_echo "$MKDIR_P" >&6; }
6314
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315
6316# Not every filesystem supports hard links
6317
6318if test -z "$LN" ; then
6319 case $ac_sys_system in
6320 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 *) LN=ln;;
6322 esac
6323fi
6324
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006325# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006326
6327ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006328
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6331$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
6333# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006334if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 withval=$with_pydebug;
6336if test "$withval" != no
6337then
6338
Matthias Kloseb9621712010-04-24 17:59:49 +00006339$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6342$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006344 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006345else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347fi
6348else
Matthias Kloseb9621712010-04-24 17:59:49 +00006349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351fi
6352
6353
Victor Stinnerf4e47032019-04-25 00:56:28 +02006354# Check for --with-trace-refs
6355# --with-trace-refs
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6357$as_echo_n "checking for --with-trace-refs... " >&6; }
6358
6359# Check whether --with-trace-refs was given.
6360if test "${with_trace_refs+set}" = set; then :
6361 withval=$with_trace_refs;
6362else
6363 with_trace_refs=no
6364fi
6365
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6367$as_echo "$with_trace_refs" >&6; }
6368
6369if test "$with_trace_refs" = "yes"
6370then
6371
6372$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6373
6374fi
6375
6376# Check for --with-assertions.
6377# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006378assertions='false'
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6380$as_echo_n "checking for --with-assertions... " >&6; }
6381
6382# Check whether --with-assertions was given.
6383if test "${with_assertions+set}" = set; then :
6384 withval=$with_assertions;
6385if test "$withval" != no
6386then
6387 assertions='true'
6388fi
6389fi
6390
6391if test "$assertions" = 'true'; then
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6393$as_echo "yes" >&6; }
6394elif test "$Py_DEBUG" = 'true'; then
6395 assertions='true'
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6397$as_echo "implied by --with-pydebug" >&6; }
6398else
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
6401fi
6402
Brett Cannon63d98bc2016-09-06 17:12:40 -07006403# Enable optimization flags
6404
6405
6406Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6408$as_echo_n "checking for --enable-optimizations... " >&6; }
6409# Check whether --enable-optimizations was given.
6410if test "${enable_optimizations+set}" = set; then :
6411 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006412if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006413then
6414 Py_OPT='true'
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6416$as_echo "yes" >&6; };
6417else
6418 Py_OPT='false'
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; };
6421fi
6422else
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006428 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6429 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006430 # 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 +00006431 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006432 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006433 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006434 DEF_MAKE_RULE="build_all"
6435else
6436 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006437 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006438 DEF_MAKE_RULE="all"
6439fi
6440
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006441# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6442# normal names in the default $PATH (ie: Ubuntu). They exist under the
6443# non-suffixed name in their versioned llvm directory.
6444
6445llvm_bin_dir=''
6446llvm_path="${PATH}"
6447if test "${CC}" = "clang"
6448then
6449 clang_bin=`which clang`
6450 # Some systems install clang elsewhere as a symlink to the real path
6451 # which is where the related llvm tools are located.
6452 if test -L "${clang_bin}"
6453 then
6454 clang_dir=`dirname "${clang_bin}"`
6455 clang_bin=`readlink "${clang_bin}"`
6456 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6457 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6458 fi
6459fi
6460
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006461# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6463$as_echo_n "checking for --with-lto... " >&6; }
6464
6465# Check whether --with-lto was given.
6466if test "${with_lto+set}" = set; then :
6467 withval=$with_lto;
6468if test "$withval" != no
6469then
6470 Py_LTO='true'
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6472$as_echo "yes" >&6; };
6473else
6474 Py_LTO='false'
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; };
6477fi
6478else
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
6481fi
6482
6483if test "$Py_LTO" = 'true' ; then
6484 case $CC in
6485 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006486
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006488$as_echo_n "checking target system type... " >&6; }
6489if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006490 $as_echo_n "(cached) " >&6
6491else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006492 if test "x$target_alias" = x; then
6493 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006494else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006495 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6496 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6497fi
6498
6499fi
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6501$as_echo "$ac_cv_target" >&6; }
6502case $ac_cv_target in
6503*-*-*) ;;
6504*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6505esac
6506target=$ac_cv_target
6507ac_save_IFS=$IFS; IFS='-'
6508set x $ac_cv_target
6509shift
6510target_cpu=$1
6511target_vendor=$2
6512shift; shift
6513# Remember, the first character of IFS is used to create $*,
6514# except with old shells:
6515target_os=$*
6516IFS=$ac_save_IFS
6517case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6518
6519
6520# The aliases save the names the user supplied, while $host etc.
6521# will get canonicalized.
6522test -n "$target_alias" &&
6523 test "$program_prefix$program_suffix$program_transform_name" = \
6524 NONENONEs,x,x, &&
6525 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006526# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6527set dummy $target_alias-llvm-ar; ac_word=$2
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6529$as_echo_n "checking for $ac_word... " >&6; }
6530if ${ac_cv_path_LLVM_AR+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532else
6533 case $LLVM_AR in
6534 [\\/]* | ?:[\\/]*)
6535 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6536 ;;
6537 *)
6538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539for as_dir in ${llvm_path}
6540do
6541 IFS=$as_save_IFS
6542 test -z "$as_dir" && as_dir=.
6543 for ac_exec_ext in '' $ac_executable_extensions; do
6544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6545 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6547 break 2
6548 fi
6549done
6550 done
6551IFS=$as_save_IFS
6552
6553 ;;
6554esac
6555fi
6556LLVM_AR=$ac_cv_path_LLVM_AR
6557if test -n "$LLVM_AR"; then
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6559$as_echo "$LLVM_AR" >&6; }
6560else
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6562$as_echo "no" >&6; }
6563fi
6564
6565
6566if test -z "$ac_cv_path_LLVM_AR"; then
6567 if test "$build" = "$target"; then
6568 ac_pt_LLVM_AR=$LLVM_AR
6569 # Extract the first word of "llvm-ar", so it can be a program name with args.
6570set dummy llvm-ar; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575else
6576 case $ac_pt_LLVM_AR in
6577 [\\/]* | ?:[\\/]*)
6578 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6579 ;;
6580 *)
6581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in ${llvm_path}
6583do
6584 IFS=$as_save_IFS
6585 test -z "$as_dir" && as_dir=.
6586 for ac_exec_ext in '' $ac_executable_extensions; do
6587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6588 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590 break 2
6591 fi
6592done
6593 done
6594IFS=$as_save_IFS
6595
6596 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6597 ;;
6598esac
6599fi
6600ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6601if test -n "$ac_pt_LLVM_AR"; then
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6603$as_echo "$ac_pt_LLVM_AR" >&6; }
6604else
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
6607fi
6608
6609 LLVM_AR=$ac_pt_LLVM_AR
6610 else
6611 LLVM_AR="''"
6612 fi
6613else
6614 LLVM_AR="$ac_cv_path_LLVM_AR"
6615fi
6616
6617
6618 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6619 then
6620 LLVM_AR_FOUND="found"
6621 else
6622 LLVM_AR_FOUND="not-found"
6623 fi
6624 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6625 then
6626 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6627 if test -n "${found_llvm_ar}"
6628 then
6629 LLVM_AR='/usr/bin/xcrun llvm-ar'
6630 LLVM_AR_FOUND=found
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6632$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6633 fi
6634 fi
6635 if test $LLVM_AR_FOUND = not-found
6636 then
6637 LLVM_PROFR_ERR=yes
6638 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6639 else
6640 LLVM_AR_ERR=no
6641 fi
6642 AR="${LLVM_AR}"
6643 case $ac_sys_system in
6644 Darwin*)
6645 # Any changes made here should be reflected in the GCC+Darwin case below
6646 LTOFLAGS="-flto -Wl,-export_dynamic"
6647 ;;
6648 *)
6649 LTOFLAGS="-flto"
6650 ;;
6651 esac
6652 ;;
6653 *gcc*)
6654 case $ac_sys_system in
6655 Darwin*)
6656 LTOFLAGS="-flto -Wl,-export_dynamic"
6657 ;;
6658 *)
6659 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6660 ;;
6661 esac
6662 ;;
6663 esac
6664
6665 if test "$ac_cv_prog_cc_g" = "yes"
6666 then
6667 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6668 # to get debug symbols.
6669 LTOFLAGS="$LTOFLAGS -g"
6670 fi
6671
stratakisf92c7aa2018-12-04 15:54:01 +01006672 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006673 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006674fi
6675
6676# Enable PGO flags.
6677
6678
6679
6680
6681
6682
Gregory P. Smith799520c2016-09-07 16:10:00 -07006683# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6684set dummy $target_alias-llvm-profdata; ac_word=$2
6685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686$as_echo_n "checking for $ac_word... " >&6; }
6687if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6688 $as_echo_n "(cached) " >&6
6689else
6690 case $LLVM_PROFDATA in
6691 [\\/]* | ?:[\\/]*)
6692 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6693 ;;
6694 *)
6695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006697do
6698 IFS=$as_save_IFS
6699 test -z "$as_dir" && as_dir=.
6700 for ac_exec_ext in '' $ac_executable_extensions; do
6701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704 break 2
6705 fi
6706done
6707 done
6708IFS=$as_save_IFS
6709
Gregory P. Smith799520c2016-09-07 16:10:00 -07006710 ;;
6711esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006712fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006713LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6714if test -n "$LLVM_PROFDATA"; then
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6716$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006717else
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719$as_echo "no" >&6; }
6720fi
6721
6722
Gregory P. Smith799520c2016-09-07 16:10:00 -07006723if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6724 if test "$build" = "$target"; then
6725 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6726 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6727set dummy llvm-profdata; ac_word=$2
6728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6729$as_echo_n "checking for $ac_word... " >&6; }
6730if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6731 $as_echo_n "(cached) " >&6
6732else
6733 case $ac_pt_LLVM_PROFDATA in
6734 [\\/]* | ?:[\\/]*)
6735 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6736 ;;
6737 *)
6738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6739for as_dir in ${llvm_path}
6740do
6741 IFS=$as_save_IFS
6742 test -z "$as_dir" && as_dir=.
6743 for ac_exec_ext in '' $ac_executable_extensions; do
6744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6745 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6747 break 2
6748 fi
6749done
6750 done
6751IFS=$as_save_IFS
6752
6753 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6754 ;;
6755esac
6756fi
6757ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6758if test -n "$ac_pt_LLVM_PROFDATA"; then
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6760$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6761else
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6767 else
6768 LLVM_PROFDATA="''"
6769 fi
6770else
6771 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6772fi
6773
6774
6775if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6776then
6777 LLVM_PROF_FOUND="found"
6778else
6779 LLVM_PROF_FOUND="not-found"
6780fi
6781if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6782then
6783 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6784 if test -n "${found_llvm_profdata}"
6785 then
6786 # llvm-profdata isn't directly in $PATH in some cases.
6787 # https://apple.stackexchange.com/questions/197053/
6788 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6789 LLVM_PROF_FOUND=found
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6791$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6792 fi
6793fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006794LLVM_PROF_ERR=no
6795case $CC in
6796 *clang*)
6797 # Any changes made here should be reflected in the GCC+Darwin case below
6798 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6799 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6802 if test $LLVM_PROF_FOUND = not-found
6803 then
6804 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805 if test "${REQUIRE_PGO}" = "yes"
6806 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006807 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 -07006808 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 fi
6810 ;;
6811 *gcc*)
6812 case $ac_sys_system in
6813 Darwin*)
6814 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6815 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006816 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006817 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006818 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 then
6820 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006821 if test "${REQUIRE_PGO}" = "yes"
6822 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006823 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 -07006824 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825 fi
6826 ;;
6827 *)
6828 PGO_PROF_GEN_FLAG="-fprofile-generate"
6829 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6830 LLVM_PROF_MERGER="true"
6831 LLVM_PROF_FILE=""
6832 ;;
6833 esac
6834 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006835 *icc*)
6836 PGO_PROF_GEN_FLAG="-prof-gen"
6837 PGO_PROF_USE_FLAG="-prof-use"
6838 LLVM_PROF_MERGER="true"
6839 LLVM_PROF_FILE=""
6840 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006841esac
6842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6844# merged with this chunk of code?
6845
6846# Optimizer/debugger flags
6847# ------------------------
6848# (The following bit of code is complicated enough - please keep things
6849# indented properly. Just pretend you're editing Python code. ;-)
6850
6851# There are two parallel sets of case statements below, one that checks to
6852# see if OPT was set and one that does BASECFLAGS setting based upon
6853# compiler and platform. BASECFLAGS tweaks need to be made even if the
6854# user set OPT.
6855
Victor Stinner23a683a2019-04-12 21:27:37 +02006856case $CC in
6857 *clang*)
6858 cc_is_clang=1
6859 ;;
6860 *)
6861 if $CC --version 2>&1 | grep -q clang
6862 then
6863 cc_is_clang=1
6864 else
6865 cc_is_clang=
6866 fi
6867esac
6868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869# tweak OPT based on compiler and platform, only if the user didn't set
6870# it on the command line
6871
Victor Stinner9ed34a82017-05-02 22:35:58 +02006872
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006873if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874then
6875 case $GCC in
6876 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6878 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6879 WRAP="-fwrapv"
6880 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006881
Victor Stinner35f3d242017-04-21 12:35:24 +02006882 if test -n "${cc_is_clang}"
6883 then
6884 # Clang also needs -fwrapv
6885 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006886 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6887 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006888 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006889 fi
6890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 case $ac_cv_prog_cc_g in
6892 yes)
6893 if test "$Py_DEBUG" = 'true' ; then
6894 # Optimization messes up debuggers, so turn it off for
6895 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006896 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006897 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006898 else
Victor Stinner28205b22017-04-21 11:24:34 +02006899 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006900 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901 else
Victor Stinner28205b22017-04-21 11:24:34 +02006902 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 fi
6904 ;;
6905 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006906 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907 ;;
6908 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910 case $ac_sys_system in
6911 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6912 ;;
6913 esac
6914 ;;
6915
6916 *)
6917 OPT="-O"
6918 ;;
6919 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920fi
6921
6922
6923
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006924
stratakiscf10a752018-12-19 18:19:01 +01006925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926# The -arch flags for universal builds on OSX
6927UNIVERSAL_ARCH_FLAGS=
6928
6929
6930# tweak BASECFLAGS based on compiler and platform
6931case $GCC in
6932yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006933 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006934
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6936$as_echo_n "checking for -Wextra... " >&6; }
6937 ac_save_cc="$CC"
6938 CC="$CC -Wextra -Werror"
6939 if ${ac_cv_extra_warnings+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941else
6942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943/* end confdefs.h. */
6944
6945
6946int
6947main ()
6948{
6949
6950 ;
6951 return 0;
6952}
6953
6954_ACEOF
6955if ac_fn_c_try_compile "$LINENO"; then :
6956
6957 ac_cv_extra_warnings=yes
6958
6959else
6960
6961 ac_cv_extra_warnings=no
6962
6963fi
6964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6965fi
6966
6967 CC="$ac_save_cc"
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6969$as_echo "$ac_cv_extra_warnings" >&6; }
6970
6971 if test $ac_cv_extra_warnings = yes
6972 then
6973 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6974 fi
6975
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976 # Python doesn't violate C99 aliasing rules, but older versions of
6977 # GCC produce warnings for legal Python code. Enable
6978 # -fno-strict-aliasing on versions of GCC that support but produce
6979 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6981$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982 ac_save_cc="$CC"
6983 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006985 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006987else
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006990
Matthias Kloseb159a552010-04-25 21:00:44 +00006991
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006992int
6993main ()
6994{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006995
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006996 ;
6997 return 0;
6998}
Matthias Kloseb159a552010-04-25 21:00:44 +00006999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007001if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007002
7003 CC="$ac_save_cc -fstrict-aliasing"
7004 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007006/* end confdefs.h. */
7007
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007008 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009int
7010main ()
7011{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007012double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013 ;
7014 return 0;
7015}
Matthias Kloseb159a552010-04-25 21:00:44 +00007016
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007018if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007019
7020 ac_cv_no_strict_aliasing=no
7021
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022else
Matthias Kloseb159a552010-04-25 21:00:44 +00007023
7024 ac_cv_no_strict_aliasing=yes
7025
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007026fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007028
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029else
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
7031 ac_cv_no_strict_aliasing=no
7032
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007035fi
7036
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007037 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7040$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007042 then
7043 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7044 fi
7045
Zachary Ware5af85642015-12-21 12:09:17 -06007046 # ICC doesn't recognize the option, but only emits a warning
7047 ## XXX does it emit an unused result warning and can it be disabled?
7048 case "$CC" in
7049 *icc*)
7050 ac_cv_disable_unused_result_warning=no
7051 ;;
7052 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7054$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7055 ac_save_cc="$CC"
7056 CC="$CC -Wunused-result -Werror"
7057 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007058 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059 $as_echo_n "(cached) " >&6
7060else
7061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062/* end confdefs.h. */
7063
7064
7065int
7066main ()
7067{
7068
7069 ;
7070 return 0;
7071}
7072
7073_ACEOF
7074if ac_fn_c_try_compile "$LINENO"; then :
7075
7076 ac_cv_disable_unused_result_warning=yes
7077
7078else
7079
7080 ac_cv_disable_unused_result_warning=no
7081
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084fi
7085
7086 CFLAGS="$save_CFLAGS"
7087 CC="$ac_save_cc"
7088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7089$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007090 ;;
7091 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007092
7093 if test $ac_cv_disable_unused_result_warning = yes
7094 then
7095 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007096 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7097 fi
7098
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7100$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7101 ac_save_cc="$CC"
7102 CC="$CC -Wunused-parameter -Werror"
7103 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7104 $as_echo_n "(cached) " >&6
7105else
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h. */
7108
7109
7110int
7111main ()
7112{
7113
7114 ;
7115 return 0;
7116}
7117
7118_ACEOF
7119if ac_fn_c_try_compile "$LINENO"; then :
7120
7121 ac_cv_disable_unused_parameter_warning=yes
7122
7123else
7124
7125 ac_cv_disable_unused_parameter_warning=no
7126
7127fi
7128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129fi
7130
7131 CC="$ac_save_cc"
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7133$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7134
7135 if test $ac_cv_disable_unused_parameter_warning = yes
7136 then
7137 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7138 fi
7139
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7141$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7142 ac_save_cc="$CC"
7143 CC="$CC -Wmissing-field-initializers -Werror"
7144 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7145 $as_echo_n "(cached) " >&6
7146else
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148/* end confdefs.h. */
7149
7150
7151int
7152main ()
7153{
7154
7155 ;
7156 return 0;
7157}
7158
7159_ACEOF
7160if ac_fn_c_try_compile "$LINENO"; then :
7161
7162 ac_cv_disable_missing_field_initializers=yes
7163
7164else
7165
7166 ac_cv_disable_missing_field_initializers=no
7167
7168fi
7169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7170fi
7171
7172 CC="$ac_save_cc"
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7174$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7175
7176 if test $ac_cv_disable_missing_field_initializers = yes
7177 then
7178 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007179 fi
7180
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7182$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7183 ac_save_cc="$CC"
7184 CC="$CC -Wsign-compare"
7185 save_CFLAGS="$CFLAGS"
7186 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7187 $as_echo_n "(cached) " >&6
7188else
7189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7190/* end confdefs.h. */
7191
7192
7193int
7194main ()
7195{
7196
7197 ;
7198 return 0;
7199}
7200
7201_ACEOF
7202if ac_fn_c_try_compile "$LINENO"; then :
7203
7204 ac_cv_enable_sign_compare_warning=yes
7205
7206else
7207
7208 ac_cv_enable_sign_compare_warning=no
7209
7210fi
7211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7212fi
7213
7214 CFLAGS="$save_CFLAGS"
7215 CC="$ac_save_cc"
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7217$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7218
7219 if test $ac_cv_enable_sign_compare_warning = yes
7220 then
7221 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7222 fi
7223
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7225$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7226 ac_save_cc="$CC"
7227 CC="$CC -Wunreachable-code"
7228 save_CFLAGS="$CFLAGS"
7229 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7230 $as_echo_n "(cached) " >&6
7231else
7232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7233/* end confdefs.h. */
7234
7235
7236int
7237main ()
7238{
7239
7240 ;
7241 return 0;
7242}
7243
7244_ACEOF
7245if ac_fn_c_try_compile "$LINENO"; then :
7246
7247 ac_cv_enable_unreachable_code_warning=yes
7248
7249else
7250
7251 ac_cv_enable_unreachable_code_warning=no
7252
7253fi
7254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7255fi
7256
7257 CFLAGS="$save_CFLAGS"
7258 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007259
7260 # Don't enable unreachable code warning in debug mode, since it usually
7261 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007262 # Issue #24324: Unfortunately, the unreachable code warning does not work
7263 # correctly on gcc and has been silently removed from the compiler.
7264 # It is supported on clang but on OS X systems gcc may be an alias
7265 # for clang. Try to determine if the compiler is not really gcc and,
7266 # if so, only then enable the warning.
7267 if test $ac_cv_enable_unreachable_code_warning = yes && \
7268 test "$Py_DEBUG" != "true" && \
7269 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007270 then
7271 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007272 else
7273 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007274 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7276$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007277
INADA Naokie3364842018-06-05 20:40:53 +09007278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7279$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7280 ac_save_cc="$CC"
7281 CC="$CC -Werror -Wstrict-prototypes"
7282 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7283 $as_echo_n "(cached) " >&6
7284else
7285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7286/* end confdefs.h. */
7287
7288
7289int
7290main ()
7291{
7292
7293 ;
7294 return 0;
7295}
7296
7297_ACEOF
7298if ac_fn_c_try_compile "$LINENO"; then :
7299
7300 ac_cv_enable_strict_prototypes_warning=yes
7301
7302else
7303
7304 ac_cv_enable_strict_prototypes_warning=no
7305
7306fi
7307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7308fi
7309
7310 CC="$ac_save_cc"
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7312$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7313
7314 if test $ac_cv_enable_strict_prototypes_warning = yes
7315 then
7316 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7317 fi
7318
Victor Stinner193ee0a2017-02-06 14:24:00 +01007319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7320$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7321 ac_save_cc="$CC"
7322 CC="$CC -Werror=implicit-function-declaration"
7323 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7324 $as_echo_n "(cached) " >&6
7325else
7326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7327/* end confdefs.h. */
7328
7329
7330int
7331main ()
7332{
7333
7334 ;
7335 return 0;
7336}
7337
7338_ACEOF
7339if ac_fn_c_try_compile "$LINENO"; then :
7340
7341 ac_cv_enable_implicit_function_declaration_error=yes
7342
7343else
7344
7345 ac_cv_enable_implicit_function_declaration_error=no
7346
7347fi
7348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7349fi
7350
7351 CC="$ac_save_cc"
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7353$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7354
7355 if test $ac_cv_enable_implicit_function_declaration_error = yes
7356 then
7357 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7358 fi
7359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7361 # support. Without this, treatment of subnormals doesn't follow
7362 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007363 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364 alpha*)
7365 BASECFLAGS="$BASECFLAGS -mieee"
7366 ;;
7367 esac
7368
7369 case $ac_sys_system in
7370 SCO_SV*)
7371 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7372 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007373
Ned Deily87adb6e2013-10-18 21:09:56 -07007374 Darwin*)
7375 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7376 # used to be here, but non-Apple gcc doesn't accept them.
7377 if test "${CC}" = gcc
7378 then
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007380$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007381 case "${UNIVERSALSDK}" in
7382 */MacOSX10.4u.sdk)
7383 # Build using 10.4 SDK, force usage of gcc when the
7384 # compiler is gcc, otherwise the user will get very
7385 # confusing error messages when building on OSX 10.6
7386 CC=gcc-4.0
7387 CPP=cpp-4.0
7388 ;;
7389 esac
7390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007391$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007392 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393
Ned Deily87adb6e2013-10-18 21:09:56 -07007394 if test "${enable_universalsdk}"
7395 then
7396 case "$UNIVERSAL_ARCHS" in
7397 32-bit)
7398 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7399 LIPO_32BIT_FLAGS=""
7400 ARCH_RUN_32BIT=""
7401 ;;
7402 64-bit)
7403 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7404 LIPO_32BIT_FLAGS=""
7405 ARCH_RUN_32BIT="true"
7406 ;;
7407 all)
7408 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7409 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7410 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7411 ;;
7412 intel)
7413 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7414 LIPO_32BIT_FLAGS="-extract i386"
7415 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7416 ;;
7417 intel-32)
7418 UNIVERSAL_ARCH_FLAGS="-arch i386"
7419 LIPO_32BIT_FLAGS=""
7420 ARCH_RUN_32BIT=""
7421 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007422 intel-64)
7423 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7424 LIPO_32BIT_FLAGS=""
7425 ARCH_RUN_32BIT="true"
7426 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 3-way)
7428 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7429 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7430 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7431 ;;
7432 *)
7433 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7434 ;;
7435 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436
Ned Deily87adb6e2013-10-18 21:09:56 -07007437 if test "${UNIVERSALSDK}" != "/"
7438 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007439 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7440 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007442 else
7443 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7444 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 fi
7446 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447
Ned Deily87adb6e2013-10-18 21:09:56 -07007448 # Calculate an appropriate deployment target for this build:
7449 # The deployment target value is used explicitly to enable certain
7450 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007451 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007452 # component of the string returned by distutils.get_platform().
7453 #
7454 # Use the value from:
7455 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7456 # 2. the operating system version of the build machine if >= 10.6
7457 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7458 # below to pick either 10.3, 10.4, or 10.5 as the target.
7459 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460
Ned Deily87adb6e2013-10-18 21:09:56 -07007461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7462$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007463 cur_target_major=`sw_vers -productVersion | \
7464 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7465 cur_target_minor=`sw_vers -productVersion | \
7466 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7467 cur_target="${cur_target_major}.${cur_target_minor}"
7468 if test ${cur_target_major} -eq 10 && \
7469 test ${cur_target_minor} -ge 3 && \
7470 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007471 then
Ned Deily36820b62014-06-25 13:44:22 -07007472 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007473 cur_target=10.3
7474 if test ${enable_universalsdk}
7475 then
7476 case "$UNIVERSAL_ARCHS" in
7477 all|3-way|intel|64-bit)
7478 # These configurations were first supported in 10.5
7479 cur_target='10.5'
7480 ;;
7481 esac
7482 else
7483 if test `/usr/bin/arch` = "i386"
7484 then
7485 # 10.4 was the first release to support Intel archs
7486 cur_target="10.4"
7487 fi
7488 fi
7489 fi
7490 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007491
Ned Deily87adb6e2013-10-18 21:09:56 -07007492 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7493 # environment with a value that is the same as what we'll use
7494 # in the Makefile to ensure that we'll get the same compiler
7495 # environment during configure and build time.
7496 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7497 export MACOSX_DEPLOYMENT_TARGET
7498 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7500$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007501
Ned Deily87adb6e2013-10-18 21:09:56 -07007502 # end of Darwin* tests
7503 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 esac
7505 ;;
7506
7507*)
7508 case $ac_sys_system in
7509 OpenUNIX*|UnixWare*)
7510 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7511 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512 SCO_SV*)
7513 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7514 ;;
7515 esac
7516 ;;
7517esac
7518
Zachary Ware5af85642015-12-21 12:09:17 -06007519# ICC needs -fp-model strict or floats behave badly
7520case "$CC" in
7521*icc*)
7522 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7523 ;;
7524esac
7525
T. Woutersddbfa2c2017-05-23 01:30:49 +02007526if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527 :
7528else
7529 OPT="-DNDEBUG $OPT"
7530fi
7531
7532if test "$ac_arch_flags"
7533then
7534 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7535fi
7536
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537# On some compilers, pthreads are available without further options
7538# (e.g. MacOS X). On some of these systems, the compiler will not
7539# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7540# So we have to see first whether pthreads are available without
7541# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7543$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007544if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546else
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548 ac_cv_pthread_is_default=no
7549else
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551/* end confdefs.h. */
7552
Stefan Krah7dba5942012-11-22 22:49:11 +01007553#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554#include <pthread.h>
7555
7556void* routine(void* p){return NULL;}
7557
7558int main(){
7559 pthread_t p;
7560 if(pthread_create(&p,NULL,routine,NULL)!=0)
7561 return 1;
7562 (void)pthread_detach(p);
7563 return 0;
7564}
7565
7566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007567if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568
7569 ac_cv_pthread_is_default=yes
7570 ac_cv_kthread=no
7571 ac_cv_pthread=no
7572
7573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578fi
7579
7580
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581fi
7582
Matthias Kloseb9621712010-04-24 17:59:49 +00007583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7584$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585
7586
7587if test $ac_cv_pthread_is_default = yes
7588then
7589 ac_cv_kpthread=no
7590else
7591# -Kpthread, if available, provides the right #defines
7592# and linker options to make pthread_create available
7593# Some compilers won't report that they do not support -Kpthread,
7594# so we need to run a program to see whether it really made the
7595# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7597$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007598if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600else
7601 ac_save_cc="$CC"
7602CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007603if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604 ac_cv_kpthread=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 ac_cv_kpthread=yes
7625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7629 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630fi
7631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632CC="$ac_save_cc"
7633fi
7634
Matthias Kloseb9621712010-04-24 17:59:49 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7636$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637fi
7638
7639if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7640then
7641# -Kthread, if available, provides the right #defines
7642# and linker options to make pthread_create available
7643# Some compilers won't report that they do not support -Kthread,
7644# so we need to run a program to see whether it really made the
7645# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7647$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007648if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007650else
7651 ac_save_cc="$CC"
7652CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007653if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654 ac_cv_kthread=no
7655else
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657/* end confdefs.h. */
7658
Stefan Krah7dba5942012-11-22 22:49:11 +01007659#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660#include <pthread.h>
7661
7662void* routine(void* p){return NULL;}
7663
7664int main(){
7665 pthread_t p;
7666 if(pthread_create(&p,NULL,routine,NULL)!=0)
7667 return 1;
7668 (void)pthread_detach(p);
7669 return 0;
7670}
7671
7672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007673if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674 ac_cv_kthread=yes
7675else
Matthias Kloseb9621712010-04-24 17:59:49 +00007676 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680fi
7681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682CC="$ac_save_cc"
7683fi
7684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7686$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687fi
7688
7689if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7690then
7691# -pthread, if available, provides the right #defines
7692# and linker options to make pthread_create available
7693# Some compilers won't report that they do not support -pthread,
7694# so we need to run a program to see whether it really made the
7695# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7697$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007698if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700else
7701 ac_save_cc="$CC"
7702CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007703if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704 ac_cv_pthread=no
7705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708
Stefan Krah7dba5942012-11-22 22:49:11 +01007709#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710#include <pthread.h>
7711
7712void* routine(void* p){return NULL;}
7713
7714int main(){
7715 pthread_t p;
7716 if(pthread_create(&p,NULL,routine,NULL)!=0)
7717 return 1;
7718 (void)pthread_detach(p);
7719 return 0;
7720}
7721
7722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007723if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724 ac_cv_pthread=yes
7725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7729 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730fi
7731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732CC="$ac_save_cc"
7733fi
7734
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7736$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737fi
7738
7739# If we have set a CC compiler flag for thread support then
7740# check if it works for CXX, too.
7741ac_cv_cxx_thread=no
7742if test ! -z "$CXX"
7743then
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7745$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746ac_save_cxx="$CXX"
7747
7748if test "$ac_cv_kpthread" = "yes"
7749then
7750 CXX="$CXX -Kpthread"
7751 ac_cv_cxx_thread=yes
7752elif test "$ac_cv_kthread" = "yes"
7753then
7754 CXX="$CXX -Kthread"
7755 ac_cv_cxx_thread=yes
7756elif test "$ac_cv_pthread" = "yes"
7757then
7758 CXX="$CXX -pthread"
7759 ac_cv_cxx_thread=yes
7760fi
7761
7762if test $ac_cv_cxx_thread = yes
7763then
7764 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7765 $CXX -c conftest.$ac_ext 2>&5
7766 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7767 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7768 then
7769 ac_cv_cxx_thread=yes
7770 else
7771 ac_cv_cxx_thread=no
7772 fi
7773 rm -fr conftest*
7774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7776$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777fi
7778CXX="$ac_save_cxx"
7779
7780
7781# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7783$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786else
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788/* end confdefs.h. */
7789#include <stdlib.h>
7790#include <stdarg.h>
7791#include <string.h>
7792#include <float.h>
7793
7794int
7795main ()
7796{
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007802if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803 ac_cv_header_stdc=yes
7804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7808
7809if test $ac_cv_header_stdc = yes; then
7810 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812/* end confdefs.h. */
7813#include <string.h>
7814
7815_ACEOF
7816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 $EGREP "memchr" >/dev/null 2>&1; then :
7818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007819else
7820 ac_cv_header_stdc=no
7821fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007822rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823
7824fi
7825
7826if test $ac_cv_header_stdc = yes; then
7827 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829/* end confdefs.h. */
7830#include <stdlib.h>
7831
7832_ACEOF
7833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 $EGREP "free" >/dev/null 2>&1; then :
7835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007836else
7837 ac_cv_header_stdc=no
7838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007839rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840
7841fi
7842
7843if test $ac_cv_header_stdc = yes; then
7844 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846 :
7847else
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849/* end confdefs.h. */
7850#include <ctype.h>
7851#include <stdlib.h>
7852#if ((' ' & 0x0FF) == 0x020)
7853# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7854# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7855#else
7856# define ISLOWER(c) \
7857 (('a' <= (c) && (c) <= 'i') \
7858 || ('j' <= (c) && (c) <= 'r') \
7859 || ('s' <= (c) && (c) <= 'z'))
7860# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7861#endif
7862
7863#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7864int
7865main ()
7866{
7867 int i;
7868 for (i = 0; i < 256; i++)
7869 if (XOR (islower (i), ISLOWER (i))
7870 || toupper (i) != TOUPPER (i))
7871 return 2;
7872 return 0;
7873}
7874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007875if ac_fn_c_try_run "$LINENO"; then :
7876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882fi
7883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884fi
7885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7887$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888if test $ac_cv_header_stdc = yes; then
7889
Matthias Kloseb9621712010-04-24 17:59:49 +00007890$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891
7892fi
7893
stratakise768c862018-01-23 16:11:24 +01007894for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007895fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007896ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007897sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007898utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007899poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007900sys/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 +01007901sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007902sys/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 +01007903sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007904sys/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 -07007905libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007906linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007907sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007908do :
7909 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7910ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007911if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007912 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007913#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007914_ACEOF
7915
7916fi
7917
Guido van Rossum627b2d71993-12-24 10:39:16 +00007918done
7919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007920ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007921for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7924$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007925if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007927else
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007929/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007930#include <sys/types.h>
7931#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
Martin v. Löwis11437992002-04-12 09:54:03 +00007933int
7934main ()
7935{
7936if ((DIR *) 0)
7937return 0;
7938 ;
7939 return 0;
7940}
7941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007944else
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949eval ac_res=\$$as_ac_Header
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7951$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007952if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007954#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007955_ACEOF
7956
7957ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007959
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007960done
7961# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7962if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7964$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007965if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007967else
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972/* Override any GCC internal prototype to avoid an error.
7973 Use char because int might match the return type of a GCC
7974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975#ifdef __cplusplus
7976extern "C"
7977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007978char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007979int
7980main ()
7981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ;
7984 return 0;
7985}
7986_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987for ac_lib in '' dir; do
7988 if test -z "$ac_lib"; then
7989 ac_res="none required"
7990 else
7991 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997rm -f core conftest.err conftest.$ac_objext \
7998 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007999 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002done
Victor Stinnere0be4232011-10-25 13:06:09 +02008003if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005else
8006 ac_cv_search_opendir=no
8007fi
8008rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008009LIBS=$ac_func_search_save_LIBS
8010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8012$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008014if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
Michael W. Hudson54241132001-12-07 15:38:26 +00008019else
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8021$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008022if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008024else
8025 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029/* Override any GCC internal prototype to avoid an error.
8030 Use char because int might match the return type of a GCC
8031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032#ifdef __cplusplus
8033extern "C"
8034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008035char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 ;
8041 return 0;
8042}
8043_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044for ac_lib in '' x; do
8045 if test -z "$ac_lib"; then
8046 ac_res="none required"
8047 else
8048 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054rm -f core conftest.err conftest.$ac_objext \
8055 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008056 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059done
Victor Stinnere0be4232011-10-25 13:06:09 +02008060if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062else
8063 ac_cv_search_opendir=no
8064fi
8065rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008066LIBS=$ac_func_search_save_LIBS
8067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8069$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008074fi
8075
8076fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008077
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8079$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008080if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008085#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008086int
8087main ()
8088{
8089return makedev(0, 0);
8090 ;
8091 return 0;
8092}
8093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008094if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008095 ac_cv_header_sys_types_h_makedev=yes
8096else
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008099rm -f core conftest.err conftest.$ac_objext \
8100 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008101
8102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8104$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008105
8106if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008107ac_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 +02008108if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008111
8112fi
8113
8114
8115
8116 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 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 +02008118if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008121
8122fi
8123
8124
8125 fi
8126fi
8127
Michael W. Hudson54241132001-12-07 15:38:26 +00008128
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008129# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8130# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8131SAVE_CFLAGS=$CFLAGS
8132CFLAGS="-std=c99 $CFLAGS"
8133for ac_header in bluetooth/bluetooth.h
8134do :
8135 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8136if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8137 cat >>confdefs.h <<_ACEOF
8138#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8139_ACEOF
8140
8141fi
8142
8143done
8144
8145CFLAGS=$SAVE_CFLAGS
8146
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008147# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8148for ac_header in net/if.h
8149do :
8150 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8151#ifdef STDC_HEADERS
8152# include <stdlib.h>
8153# include <stddef.h>
8154#else
8155# ifdef HAVE_STDLIB_H
8156# include <stdlib.h>
8157# endif
8158#endif
8159#ifdef HAVE_SYS_SOCKET_H
8160# include <sys/socket.h>
8161#endif
8162
8163"
Victor Stinnere0be4232011-10-25 13:06:09 +02008164if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008165 cat >>confdefs.h <<_ACEOF
8166#define HAVE_NET_IF_H 1
8167_ACEOF
8168
8169fi
8170
8171done
8172
8173
Martin v. Löwis11017b12006-01-14 18:12:57 +00008174# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008175for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008176do :
8177 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 +00008178#ifdef HAVE_ASM_TYPES_H
8179#include <asm/types.h>
8180#endif
8181#ifdef HAVE_SYS_SOCKET_H
8182#include <sys/socket.h>
8183#endif
8184
Matthias Kloseb9621712010-04-24 17:59:49 +00008185"
Victor Stinnere0be4232011-10-25 13:06:09 +02008186if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008188#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008189_ACEOF
8190
8191fi
8192
8193done
8194
8195
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008196# On Linux, qrtr.h requires asm/types.h
8197for ac_header in linux/qrtr.h
8198do :
8199 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8200#ifdef HAVE_ASM_TYPES_H
8201#include <asm/types.h>
8202#endif
8203#ifdef HAVE_SYS_SOCKET_H
8204#include <sys/socket.h>
8205#endif
8206
8207"
8208if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8209 cat >>confdefs.h <<_ACEOF
8210#define HAVE_LINUX_QRTR_H 1
8211_ACEOF
8212
8213fi
8214
8215done
8216
8217
caaveryeffc12f2017-09-06 18:18:10 -04008218for ac_header in linux/vm_sockets.h
8219do :
8220 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8221#ifdef HAVE_SYS_SOCKET_H
8222#include <sys/socket.h>
8223#endif
8224
8225"
8226if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8227 cat >>confdefs.h <<_ACEOF
8228#define HAVE_LINUX_VM_SOCKETS_H 1
8229_ACEOF
8230
8231fi
8232
8233done
8234
8235
Charles-François Natali47413c12011-10-06 19:47:44 +02008236# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008237for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008238do :
8239 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8240ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8241#ifdef HAVE_SYS_SOCKET_H
8242#include <sys/socket.h>
8243#endif
8244
8245"
8246if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8247 cat >>confdefs.h <<_ACEOF
8248#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8249_ACEOF
8250
8251fi
8252
8253done
8254
8255
Guido van Rossum627b2d71993-12-24 10:39:16 +00008256# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008257was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8259$as_echo_n "checking for clock_t in time.h... " >&6; }
8260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008261/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008262#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
8264_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008267 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008268else
Martin v. Löwis11437992002-04-12 09:54:03 +00008269
8270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008272
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008273
Guido van Rossum627b2d71993-12-24 10:39:16 +00008274fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008275rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8278$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008279
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8281$as_echo_n "checking for makedev... " >&6; }
8282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008283/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008284
Jesus Cea740f53a2010-04-28 11:35:30 +00008285#if defined(MAJOR_IN_MKDEV)
8286#include <sys/mkdev.h>
8287#elif defined(MAJOR_IN_SYSMACROS)
8288#include <sys/sysmacros.h>
8289#else
8290#include <sys/types.h>
8291#endif
8292
Neal Norwitz11690112002-07-30 01:08:28 +00008293int
8294main ()
8295{
Jesus Cea740f53a2010-04-28 11:35:30 +00008296
8297 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008298 ;
8299 return 0;
8300}
Matthias Kloseb159a552010-04-25 21:00:44 +00008301
Neal Norwitz11690112002-07-30 01:08:28 +00008302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008303if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008304 ac_cv_has_makedev=yes
8305else
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308rm -f core conftest.err conftest.$ac_objext \
8309 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8311$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008312if test "$ac_cv_has_makedev" = "yes"; then
8313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008315
8316fi
8317
Christian Heimes985ecdc2013-11-20 11:46:18 +01008318# byte swapping
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8320$as_echo_n "checking for le64toh... " >&6; }
8321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8322/* end confdefs.h. */
8323
8324#ifdef HAVE_ENDIAN_H
8325#include <endian.h>
8326#elif defined(HAVE_SYS_ENDIAN_H)
8327#include <sys/endian.h>
8328#endif
8329
8330int
8331main ()
8332{
8333
8334 le64toh(1)
8335 ;
8336 return 0;
8337}
8338
8339_ACEOF
8340if ac_fn_c_try_link "$LINENO"; then :
8341 ac_cv_has_le64toh=yes
8342else
8343 ac_cv_has_le64toh=no
8344fi
8345rm -f core conftest.err conftest.$ac_objext \
8346 conftest$ac_exeext conftest.$ac_ext
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8348$as_echo "$ac_cv_has_le64toh" >&6; }
8349if test "$ac_cv_has_le64toh" = "yes"; then
8350
8351$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8352
8353fi
8354
Martin v. Löwis399a6892002-10-04 10:22:02 +00008355use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008356# Don't use largefile support for GNU/Hurd
8357case $ac_sys_system in GNU*)
8358 use_lfs=no
8359esac
8360
Martin v. Löwis399a6892002-10-04 10:22:02 +00008361if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008362# Two defines needed to enable largefile support on various platforms
8363# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008364case $ac_sys_system/$ac_sys_release in
8365AIX*)
8366
8367$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8368
8369 ;;
8370esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008373
8374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008376
Martin v. Löwis399a6892002-10-04 10:22:02 +00008377fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008378
Guido van Rossum84e7b241996-08-19 21:59:00 +00008379# Add some code to confdefs.h so that the test for off_t works on SCO
8380cat >> confdefs.h <<\EOF
8381#if defined(SCO_DS)
8382#undef _OFF_T
8383#endif
8384EOF
8385
Guido van Rossumef2255b2000-03-10 22:30:29 +00008386# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008387ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008388if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008390else
Martin v. Löwis11437992002-04-12 09:54:03 +00008391
8392cat >>confdefs.h <<_ACEOF
8393#define mode_t int
8394_ACEOF
8395
8396fi
8397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008399if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008401else
Martin v. Löwis11437992002-04-12 09:54:03 +00008402
8403cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008405_ACEOF
8406
8407fi
8408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413
8414cat >>confdefs.h <<_ACEOF
8415#define pid_t int
8416_ACEOF
8417
8418fi
8419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008422#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008423_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008426if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008428else
Martin v. Löwis11437992002-04-12 09:54:03 +00008429
8430cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008432_ACEOF
8433
8434fi
8435
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8437$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008438if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008440else
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008442/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008443#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448 ac_cv_type_uid_t=yes
8449else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450 ac_cv_type_uid_t=no
8451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008452rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8456$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008457if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
8461
Matthias Kloseb9621712010-04-24 17:59:49 +00008462$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463
8464fi
8465
Mark Dickinson983bc162012-12-02 12:11:38 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008468if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008471
8472fi
8473
Stefan Krah1919b7e2012-03-21 18:25:23 +01008474ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8475if test "x$ac_cv_type___uint128_t" = xyes; then :
8476
8477$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8478
8479fi
8480
Jack Jansendd19cf82001-12-06 22:36:17 +00008481
Michael W. Hudson54241132001-12-07 15:38:26 +00008482# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008483# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484# The cast to long int works around a bug in the HP C Compiler
8485# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8486# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8487# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8489$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008490if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008492else
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 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 +00008494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495else
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 if test "$ac_cv_type_int" = yes; then
8497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008499as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008500See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501 else
8502 ac_cv_sizeof_int=0
8503 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8508$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509
8510
8511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008513#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008514_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008515
8516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517# The cast to long int works around a bug in the HP C Compiler
8518# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8519# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8520# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8522$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008523if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008525else
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 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 +00008527
Martin v. Löwis11437992002-04-12 09:54:03 +00008528else
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 if test "$ac_cv_type_long" = yes; then
8530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008532as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008533See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534 else
8535 ac_cv_sizeof_long=0
8536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8541$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542
8543
8544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008546#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008547_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008548
8549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550# The cast to long int works around a bug in the HP C Compiler
8551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8553# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8555$as_echo_n "checking size of long long... " >&6; }
8556if ${ac_cv_sizeof_long_long+:} false; then :
8557 $as_echo_n "(cached) " >&6
8558else
8559 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8560
8561else
8562 if test "$ac_cv_type_long_long" = yes; then
8563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8565as_fn_error 77 "cannot compute sizeof (long long)
8566See \`config.log' for more details" "$LINENO" 5; }
8567 else
8568 ac_cv_sizeof_long_long=0
8569 fi
8570fi
8571
8572fi
8573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8574$as_echo "$ac_cv_sizeof_long_long" >&6; }
8575
8576
8577
8578cat >>confdefs.h <<_ACEOF
8579#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8580_ACEOF
8581
8582
8583# The cast to long int works around a bug in the HP C Compiler
8584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8586# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8588$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008589if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008591else
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 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 +00008593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594else
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 if test "$ac_cv_type_void_p" = yes; then
8596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008598as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008599See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600 else
8601 ac_cv_sizeof_void_p=0
8602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8607$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608
8609
8610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008612#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008613_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008614
8615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616# The cast to long int works around a bug in the HP C Compiler
8617# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8618# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8619# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8621$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008622if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008624else
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 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 +00008626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627else
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 if test "$ac_cv_type_short" = yes; then
8629 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008631as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008632See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 else
8634 ac_cv_sizeof_short=0
8635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8640$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641
8642
8643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008645#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008646_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008647
8648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649# The cast to long int works around a bug in the HP C Compiler
8650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8652# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8654$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008655if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008657else
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 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 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 if test "$ac_cv_type_float" = yes; then
8662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008664as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 else
8667 ac_cv_sizeof_float=0
8668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670
Martin v. Löwis11437992002-04-12 09:54:03 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8673$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674
8675
8676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008678#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008679_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008680
8681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682# The cast to long int works around a bug in the HP C Compiler
8683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8685# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8687$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008688if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008690else
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 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 +00008692
Martin v. Löwis11437992002-04-12 09:54:03 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 if test "$ac_cv_type_double" = yes; then
8695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008697as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008698See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699 else
8700 ac_cv_sizeof_double=0
8701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703
Martin v. Löwis11437992002-04-12 09:54:03 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8706$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707
8708
8709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008711#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008712_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008713
8714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715# The cast to long int works around a bug in the HP C Compiler
8716# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8717# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8718# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8720$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008721if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008723else
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 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 +00008725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726else
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 if test "$ac_cv_type_fpos_t" = yes; then
8728 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008730as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008731See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732 else
8733 ac_cv_sizeof_fpos_t=0
8734 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8739$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740
8741
8742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008744#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008745_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008746
Michael W. Hudson54241132001-12-07 15:38:26 +00008747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748# The cast to long int works around a bug in the HP C Compiler
8749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8753$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008754if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 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 +00008758
Martin v. Löwis18e16552006-02-15 17:27:45 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$ac_cv_type_size_t" = yes; then
8761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008763as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008764See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765 else
8766 ac_cv_sizeof_size_t=0
8767 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769
Martin v. Löwis18e16552006-02-15 17:27:45 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8772$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773
8774
8775
Martin v. Löwis18e16552006-02-15 17:27:45 +00008776cat >>confdefs.h <<_ACEOF
8777#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8778_ACEOF
8779
8780
Christian Heimes400adb02008-02-01 08:12:03 +00008781# The cast to long int works around a bug in the HP C Compiler
8782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8784# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8786$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008787if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 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 +00008791
Christian Heimes400adb02008-02-01 08:12:03 +00008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 if test "$ac_cv_type_pid_t" = yes; then
8794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008796as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008797See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008798 else
8799 ac_cv_sizeof_pid_t=0
8800 fi
8801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802
Christian Heimes400adb02008-02-01 08:12:03 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8805$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008806
8807
8808
8809cat >>confdefs.h <<_ACEOF
8810#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8811_ACEOF
8812
8813
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008814# The cast to long int works around a bug in the HP C Compiler
8815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8817# This bug is HP SR number 8606223364.
8818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8819$as_echo_n "checking size of uintptr_t... " >&6; }
8820if ${ac_cv_sizeof_uintptr_t+:} false; then :
8821 $as_echo_n "(cached) " >&6
8822else
8823 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8824
8825else
8826 if test "$ac_cv_type_uintptr_t" = yes; then
8827 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8829as_fn_error 77 "cannot compute sizeof (uintptr_t)
8830See \`config.log' for more details" "$LINENO" 5; }
8831 else
8832 ac_cv_sizeof_uintptr_t=0
8833 fi
8834fi
8835
8836fi
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8838$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8839
8840
8841
8842cat >>confdefs.h <<_ACEOF
8843#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8844_ACEOF
8845
8846
Michael W. Hudson54241132001-12-07 15:38:26 +00008847
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008848
Eitan Adler3055c942018-05-15 22:58:09 -07008849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8850$as_echo_n "checking for long double... " >&6; }
8851if ${ac_cv_type_long_double+:} false; then :
8852 $as_echo_n "(cached) " >&6
8853else
8854 if test "$GCC" = yes; then
8855 ac_cv_type_long_double=yes
8856 else
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8858/* end confdefs.h. */
8859/* The Stardent Vistra knows sizeof (long double), but does
8860 not support it. */
8861 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008862int
8863main ()
8864{
Eitan Adler3055c942018-05-15 22:58:09 -07008865static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8866 sizeof (double) <= sizeof (long double))];
8867test_array [0] = 0;
8868return test_array [0];
8869
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008870 ;
8871 return 0;
8872}
8873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008874if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008875 ac_cv_type_long_double=yes
8876else
8877 ac_cv_type_long_double=no
8878fi
8879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8880 fi
8881fi
8882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8883$as_echo "$ac_cv_type_long_double" >&6; }
8884 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887
Eitan Adler3055c942018-05-15 22:58:09 -07008888 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008889
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008890# The cast to long int works around a bug in the HP C Compiler
8891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8895$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008896if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 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 +00008900
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 if test "$ac_cv_type_long_double" = yes; then
8903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008905as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008906See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907 else
8908 ac_cv_sizeof_long_double=0
8909 fi
8910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008911
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8914$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008915
8916
8917
8918cat >>confdefs.h <<_ACEOF
8919#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8920_ACEOF
8921
8922
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924# The cast to long int works around a bug in the HP C Compiler
8925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8927# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8929$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008930if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008932else
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 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 +00008934
Thomas Woutersb2137042007-02-01 18:02:27 +00008935else
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 if test "$ac_cv_type__Bool" = yes; then
8937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008939as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008940See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941 else
8942 ac_cv_sizeof__Bool=0
8943 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008945
Thomas Woutersb2137042007-02-01 18:02:27 +00008946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8948$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949
8950
8951
Thomas Woutersb2137042007-02-01 18:02:27 +00008952cat >>confdefs.h <<_ACEOF
8953#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8954_ACEOF
8955
8956
Thomas Woutersb2137042007-02-01 18:02:27 +00008957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008958# The cast to long int works around a bug in the HP C Compiler
8959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8961# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8963$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008964if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008966else
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968#ifdef HAVE_SYS_TYPES_H
8969#include <sys/types.h>
8970#endif
8971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 if test "$ac_cv_type_off_t" = yes; then
8976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008978as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008979See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980 else
8981 ac_cv_sizeof_off_t=0
8982 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8987$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008989
8990
Martin v. Löwis11437992002-04-12 09:54:03 +00008991cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008992#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008994
Michael W. Hudson54241132001-12-07 15:38:26 +00008995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8998$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008999if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009000 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001
Matthias Kloseb9621712010-04-24 17:59:49 +00009002$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9005$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9008$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009fi
9010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011# The cast to long int works around a bug in the HP C Compiler
9012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9016$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009017if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021#ifdef HAVE_SYS_TYPES_H
9022#include <sys/types.h>
9023#endif
9024#ifdef HAVE_TIME_H
9025#include <time.h>
9026#endif
9027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 if test "$ac_cv_type_time_t" = yes; then
9032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009034as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009035See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036 else
9037 ac_cv_sizeof_time_t=0
9038 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009040
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9043$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045
9046
Martin v. Löwis11437992002-04-12 09:54:03 +00009047cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009048#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009050
Michael W. Hudson54241132001-12-07 15:38:26 +00009051
9052
Trent Mick635f6fb2000-08-23 21:33:05 +00009053# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009054ac_save_cc="$CC"
9055if test "$ac_cv_kpthread" = "yes"
9056then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009057elif test "$ac_cv_kthread" = "yes"
9058then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059elif test "$ac_cv_pthread" = "yes"
9060then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009061fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9064$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009065have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009068
9069 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070int
9071main ()
9072{
Guido van Rossum12580492000-09-24 16:47:19 +00009073pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 ;
9075 return 0;
9076}
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009079if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009080 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9084$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009085if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9089# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9091$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009092if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094else
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096#ifdef HAVE_PTHREAD_H
9097#include <pthread.h>
9098#endif
9099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102else
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 if test "$ac_cv_type_pthread_t" = yes; then
9104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009106as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009107See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108 else
9109 ac_cv_sizeof_pthread_t=0
9110 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009112
Trent Mick635f6fb2000-08-23 21:33:05 +00009113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9115$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009120#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009121_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123
Trent Mick635f6fb2000-08-23 21:33:05 +00009124fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009125
9126# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9127# This checking will be unnecessary after removing deprecated TLS API.
9128# The cast to long int works around a bug in the HP C Compiler
9129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9131# This bug is HP SR number 8606223364.
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9133$as_echo_n "checking size of pthread_key_t... " >&6; }
9134if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9135 $as_echo_n "(cached) " >&6
9136else
9137 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9138"; then :
9139
9140else
9141 if test "$ac_cv_type_pthread_key_t" = yes; then
9142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9144as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9145See \`config.log' for more details" "$LINENO" 5; }
9146 else
9147 ac_cv_sizeof_pthread_key_t=0
9148 fi
9149fi
9150
9151fi
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9153$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9154
9155
9156
9157cat >>confdefs.h <<_ACEOF
9158#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9159_ACEOF
9160
9161
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9163$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9164if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166/* end confdefs.h. */
9167#include <pthread.h>
9168int
9169main ()
9170{
9171pthread_key_t k; k * 1;
9172 ;
9173 return 0;
9174}
9175_ACEOF
9176if ac_fn_c_try_compile "$LINENO"; then :
9177 ac_pthread_key_t_is_arithmetic_type=yes
9178else
9179 ac_pthread_key_t_is_arithmetic_type=no
9180
9181fi
9182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9184$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9185 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9186
9187$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9188
9189 fi
9190else
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009194CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009195
Michael W. Hudson54241132001-12-07 15:38:26 +00009196
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009197case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009198 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009199 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9200 ;;
9201 Darwin/*)
9202 OTHER_LIBTOOL_OPT=""
9203 ;;
9204esac
9205
9206
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009207
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009208case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009209 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009210 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9211 if test "${enable_universalsdk}"; then
9212 :
9213 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009214 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009215 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009216 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009217 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009218 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009219 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009220 if test ${gcc_version} '<' 4.0
9221 then
9222 LIBTOOL_CRUFT="-lcc_dynamic"
9223 else
9224 LIBTOOL_CRUFT=""
9225 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009227 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009228else
Matthias Kloseb9621712010-04-24 17:59:49 +00009229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009231
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232 #include <unistd.h>
9233 int main(int argc, char*argv[])
9234 {
9235 if (sizeof(long) == 4) {
9236 return 0;
9237 } else {
9238 return 1;
9239 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009240 }
9241
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009244 ac_osx_32bit=yes
9245else
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009250fi
9251
9252
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009254 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255 i386)
9256 MACOSX_DEFAULT_ARCH="i386"
9257 ;;
9258 ppc)
9259 MACOSX_DEFAULT_ARCH="ppc"
9260 ;;
9261 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009262 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009263 ;;
9264 esac
9265 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009266 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267 i386)
9268 MACOSX_DEFAULT_ARCH="x86_64"
9269 ;;
9270 ppc)
9271 MACOSX_DEFAULT_ARCH="ppc64"
9272 ;;
9273 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009274 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009275 ;;
9276 esac
9277
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009278 fi
9279
9280 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009281 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9285$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009286if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009288 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009290 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291
Matthias Kloseb9621712010-04-24 17:59:49 +00009292$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9295$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009296 if test $enable_shared = "yes"
9297 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009298 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 +00009299 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009300else
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303fi
9304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9306$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009307case $ac_sys_system/$ac_sys_release in
9308 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9313$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009314 ;;
9315 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009318 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009319esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009320
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009322
Michael W. Hudson54241132001-12-07 15:38:26 +00009323
9324
9325
9326
Benjamin Peterson99f03762010-04-11 22:15:28 +00009327
Thomas Wouters477c8d52006-05-27 19:21:47 +00009328
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009329# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9330# -- usually .so, .sl on HP-UX, .dll on Cygwin
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9332$as_echo_n "checking the extension of shared libraries... " >&6; }
9333if test -z "$SHLIB_SUFFIX"; then
9334 case $ac_sys_system in
9335 hp*|HP*)
9336 case `uname -m` in
9337 ia64) SHLIB_SUFFIX=.so;;
9338 *) SHLIB_SUFFIX=.sl;;
9339 esac
9340 ;;
9341 CYGWIN*) SHLIB_SUFFIX=.dll;;
9342 *) SHLIB_SUFFIX=.so;;
9343 esac
9344fi
9345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9346$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009347
Guido van Rossum0a516c91994-09-12 10:58:40 +00009348# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009349# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009350# (Shared libraries in this instance are shared modules to be loaded into
9351# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9353$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354if test -z "$LDSHARED"
9355then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009356 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009357 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009358 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009359 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009360 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009362 if test "$GCC" = "yes" ; then
9363 LDSHARED='$(CC) -shared'
9364 LDCXXSHARED='$(CXX) -shared'
9365 else
9366 LDSHARED='$(CC) -G'
9367 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009368 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009369 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009370 if test "$GCC" = "yes" ; then
9371 LDSHARED='$(CC) -shared'
9372 LDCXXSHARED='$(CXX) -shared'
9373 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009374 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009375 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009376 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009377 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009378 LDSHARED='$(CC) -bundle'
9379 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009380 if test "$enable_framework" ; then
9381 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009382 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9383 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009384 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009385 else
9386 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009387 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009388 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009389 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009390 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009391 LDSHARED='$(CC) -bundle'
9392 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009395 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009397 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009398 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009399 # No framework, use the Python app as bundle-loader
9400 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009401 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009402 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009403 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009404 Darwin/*)
9405 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9406 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009407
Ned Deily36820b62014-06-25 13:44:22 -07009408 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9409 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9410 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9411 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9412 if test ${dep_target_major} -eq 10 && \
9413 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009414 then
Ned Deily36820b62014-06-25 13:44:22 -07009415 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED='$(CC) -bundle'
9417 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009418 if test "$enable_framework" ; then
9419 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009420 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9421 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009422 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009423 else
9424 # No framework, use the Python app as bundle-loader
9425 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9426 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009428 fi
Ned Deily36820b62014-06-25 13:44:22 -07009429 else
9430 # building for OS X 10.3 and later
9431 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9432 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9433 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009434 fi
9435 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009436 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009437 LDSHARED='$(CC) -shared'
9438 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009439 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009440 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009441 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009442 LDSHARED='$(CC) -shared'
9443 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009444 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009445 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009446 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009447 OpenBSD*)
9448 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9449 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009450 LDSHARED='$(CC) -shared $(CCSHARED)'
9451 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009452 else
9453 case `uname -r` in
9454 [01].* | 2.[0-7] | 2.[0-7].*)
9455 LDSHARED="ld -Bshareable ${LDFLAGS}"
9456 ;;
9457 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009458 LDSHARED='$(CC) -shared $(CCSHARED)'
9459 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009460 ;;
9461 esac
9462 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009463 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009464 LDSHARED='$(CC) -shared'
9465 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009466 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009467 if test "$GCC" = "yes" ; then
9468 LDSHARED='$(CC) -shared'
9469 LDCXXSHARED='$(CXX) -shared'
9470 else
9471 LDSHARED='$(CC) -G'
9472 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009473 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009474 SCO_SV*)
9475 LDSHARED='$(CC) -Wl,-G,-Bexport'
9476 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9477 CYGWIN*)
9478 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9479 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480 *) LDSHARED="ld";;
9481 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9484$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009485LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009486BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009487# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009488# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9490$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009491if test -z "$CCSHARED"
9492then
Guido van Rossum07397971997-04-29 21:49:50 +00009493 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009494 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009495 then CCSHARED="-fPIC";
9496 elif test `uname -p` = sparc;
9497 then CCSHARED="-xcode=pic32";
9498 else CCSHARED="-Kpic";
9499 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009500 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009501 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009502 else CCSHARED="+z";
9503 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009504 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009505 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009506 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009507 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009508 if test "$GCC" = "yes"
9509 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009510 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009511 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009512 SCO_SV*)
9513 if test "$GCC" = "yes"
9514 then CCSHARED="-fPIC"
9515 else CCSHARED="-Kpic -belf"
9516 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009517 VxWorks*)
9518 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9522$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009523# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009524# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9526$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527if test -z "$LINKFORSHARED"
9528then
Guido van Rossum07397971997-04-29 21:49:50 +00009529 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009530 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009531 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009532 LINKFORSHARED="-Wl,-E -Wl,+s";;
9533# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009534 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009535 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009536 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009538 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00009539 if test "$enable_framework"
9540 then
Jack Jansenda49e192005-01-07 13:08:22 +00009541 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009542 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009543 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009544 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009545 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009546 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009547 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009548 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9549 then
9550 LINKFORSHARED="-Wl,--export-dynamic"
9551 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009552 SunOS/5*) case $CC in
9553 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009554 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009555 then
9556 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009557 fi;;
9558 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009559 CYGWIN*)
9560 if test $enable_shared = "no"
9561 then
9562 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9563 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009564 QNX*)
9565 # -Wl,-E causes the symbols to be added to the dynamic
9566 # symbol table so that they can be found when a module
9567 # is loaded. -N 2048K causes the stack size to be set
9568 # to 2048 kilobytes so that the stack doesn't overflow
9569 # when running test_compile.py.
9570 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009571 VxWorks*)
9572 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009573 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9576$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009577
Michael W. Hudson54241132001-12-07 15:38:26 +00009578
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009579
Matthias Kloseb9621712010-04-24 17:59:49 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9581$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009582if test ! "$LIBRARY" = "$LDLIBRARY"
9583then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009584 case $ac_sys_system in
9585 CYGWIN*)
9586 # Cygwin needs CCSHARED when building extension DLLs
9587 # but not when building the interpreter DLL.
9588 CFLAGSFORSHARED='';;
9589 *)
9590 CFLAGSFORSHARED='$(CCSHARED)'
9591 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9594$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009595
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9597# library (with --enable-shared).
9598# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009599# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9600# if it is not required, since it creates a dependency of the shared library
9601# to LIBS. This, in turn, means that applications linking the shared libpython
9602# don't need to link LIBS explicitly. The default should be only changed
9603# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009604
Matthias Kloseb9621712010-04-24 17:59:49 +00009605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9606$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009607case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009608 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009609 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009610esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9612$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009613
9614
Guido van Rossum627b2d71993-12-24 10:39:16 +00009615# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9617$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009618if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009619 $as_echo_n "(cached) " >&6
9620else
9621 ac_check_lib_save_LIBS=$LIBS
9622LIBS="-lsendfile $LIBS"
9623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9624/* end confdefs.h. */
9625
9626/* Override any GCC internal prototype to avoid an error.
9627 Use char because int might match the return type of a GCC
9628 builtin and then its argument prototype would still apply. */
9629#ifdef __cplusplus
9630extern "C"
9631#endif
9632char sendfile ();
9633int
9634main ()
9635{
9636return sendfile ();
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641if ac_fn_c_try_link "$LINENO"; then :
9642 ac_cv_lib_sendfile_sendfile=yes
9643else
9644 ac_cv_lib_sendfile_sendfile=no
9645fi
9646rm -f core conftest.err conftest.$ac_objext \
9647 conftest$ac_exeext conftest.$ac_ext
9648LIBS=$ac_check_lib_save_LIBS
9649fi
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9651$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009652if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009653 cat >>confdefs.h <<_ACEOF
9654#define HAVE_LIBSENDFILE 1
9655_ACEOF
9656
9657 LIBS="-lsendfile $LIBS"
9658
9659fi
9660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9662$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009663if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009665else
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009667LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
9673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009677char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009688else
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009691rm -f core conftest.err conftest.$ac_objext \
9692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009693LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9696$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009697if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 cat >>confdefs.h <<_ACEOF
9699#define HAVE_LIBDL 1
9700_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009701
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009702 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009704fi
9705 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9707$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009708if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009710else
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009712LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716/* Override any GCC internal prototype to avoid an error.
9717 Use char because int might match the return type of a GCC
9718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719#ifdef __cplusplus
9720extern "C"
9721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009722char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009723int
9724main ()
9725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ;
9728 return 0;
9729}
9730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009733else
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009736rm -f core conftest.err conftest.$ac_objext \
9737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9741$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009742if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 cat >>confdefs.h <<_ACEOF
9744#define HAVE_LIBDLD 1
9745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009747 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009749fi
9750 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009751
Michael Felt0d3ccb42017-12-30 22:39:20 +01009752# checks for uuid.h location
9753for ac_header in uuid/uuid.h uuid.h
9754do :
9755 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9756ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9757if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9758 cat >>confdefs.h <<_ACEOF
9759#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9760_ACEOF
9761
9762fi
9763
9764done
9765
9766
Berker Peksag9a10ff42017-11-08 23:09:16 +03009767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9768$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9770/* end confdefs.h. */
9771#include <uuid/uuid.h>
9772int
9773main ()
9774{
9775
9776#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009777void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009778#endif
9779
9780 ;
9781 return 0;
9782}
9783_ACEOF
9784if ac_fn_c_try_compile "$LINENO"; then :
9785
9786$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9787
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9789$as_echo "yes" >&6; }
9790else
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792$as_echo "no" >&6; }
9793
9794fi
9795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9796
Michael Felt0d3ccb42017-12-30 22:39:20 +01009797# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009798# FreeBSD and OpenBSD provides support as well
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9800$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9802/* end confdefs.h. */
9803#include <uuid.h>
9804int
9805main ()
9806{
9807
9808#ifndef uuid_create
9809void *x = uuid_create
9810#endif
9811
9812 ;
9813 return 0;
9814}
9815_ACEOF
9816if ac_fn_c_try_compile "$LINENO"; then :
9817
9818$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9819
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9821$as_echo "yes" >&6; }
9822else
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
9825
9826fi
9827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9828
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009829# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9830# stream in big-endian byte-order
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9832$as_echo_n "checking for uuid_enc_be... " >&6; }
9833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9834/* end confdefs.h. */
9835#include <uuid.h>
9836int
9837main ()
9838{
9839
9840#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009841void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009842#endif
9843
9844 ;
9845 return 0;
9846}
9847_ACEOF
9848if ac_fn_c_try_compile "$LINENO"; then :
9849
9850$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9851
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9853$as_echo "yes" >&6; }
9854else
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9856$as_echo "no" >&6; }
9857
9858fi
9859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9860
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009861# 'Real Time' functions on Solaris
9862# posix4 on Solaris 2.6
9863# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009865$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009866if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009868else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009869 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873/* Override any GCC internal prototype to avoid an error.
9874 Use char because int might match the return type of a GCC
9875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009876#ifdef __cplusplus
9877extern "C"
9878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009879char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009880int
9881main ()
9882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 ;
9885 return 0;
9886}
9887_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888for ac_lib in '' pthread rt posix4; do
9889 if test -z "$ac_lib"; then
9890 ac_res="none required"
9891 else
9892 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009893 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core conftest.err conftest.$ac_objext \
9899 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009900 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009901 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903done
Victor Stinnere0be4232011-10-25 13:06:09 +02009904if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906else
9907 ac_cv_search_sem_init=no
9908fi
9909rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009910LIBS=$ac_func_search_save_LIBS
9911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9913$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009915if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009917
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009918fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009919
Martin v. Löwis519adae2003-09-20 10:47:47 +00009920
Martin v. Löwis19d17342003-06-14 21:03:05 +00009921# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9923$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009924if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009926else
9927 ac_check_lib_save_LIBS=$LIBS
9928LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009930/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932/* Override any GCC internal prototype to avoid an error.
9933 Use char because int might match the return type of a GCC
9934 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009935#ifdef __cplusplus
9936extern "C"
9937#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009938char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009939int
9940main ()
9941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943 ;
9944 return 0;
9945}
9946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009947if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009948 ac_cv_lib_intl_textdomain=yes
9949else
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952rm -f core conftest.err conftest.$ac_objext \
9953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009954LIBS=$ac_check_lib_save_LIBS
9955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9957$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009958if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009961
Brett Cannonc6d936e2009-06-07 20:09:53 +00009962 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009963fi
9964
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009965
9966# checks for system dependent C++ extensions support
9967case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9969$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009971/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009972
Georg Brandl59e87bd2011-02-15 19:48:59 +00009973 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009974int
9975main ()
9976{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009977loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 ;
9979 return 0;
9980}
Matthias Kloseb159a552010-04-25 21:00:44 +00009981
Martin v. Löwis11437992002-04-12 09:54:03 +00009982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009984
Matthias Kloseb159a552010-04-25 21:00:44 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009987
Matthias Kloseb159a552010-04-25 21:00:44 +00009988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009989$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009990
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009991else
Matthias Kloseb159a552010-04-25 21:00:44 +00009992
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009994$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009995
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009997rm -f core conftest.err conftest.$ac_objext \
9998 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009999 *) ;;
10000esac
10001
Christian Heimes985ecdc2013-11-20 11:46:18 +010010002# check for systems that require aligned memory access
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10004$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010005if ${ac_cv_aligned_required+:} false; then :
10006 $as_echo_n "(cached) " >&6
10007else
10008 if test "$cross_compiling" = yes; then :
10009 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010010else
10011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10012/* end confdefs.h. */
10013
10014int main()
10015{
10016 char s[16];
10017 int i, *p1, *p2;
10018 for (i=0; i < 16; i++)
10019 s[i] = i;
10020 p1 = (int*)(s+1);
10021 p2 = (int*)(s+2);
10022 if (*p1 == *p2)
10023 return 1;
10024 return 0;
10025}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010026_ACEOF
10027if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010028 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010029else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010030 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010031fi
10032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10033 conftest.$ac_objext conftest.beam conftest.$ac_ext
10034fi
10035
10036
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010037fi
10038
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10040$as_echo "$ac_cv_aligned_required" >&6; }
10041if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010042
10043$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10044
10045fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010046
10047# str, bytes and memoryview hash algorithm
10048
10049
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10051$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10052
10053# Check whether --with-hash_algorithm was given.
10054if test "${with_hash_algorithm+set}" = set; then :
10055 withval=$with_hash_algorithm;
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10057$as_echo "$withval" >&6; }
10058case "$withval" in
10059 siphash24)
10060 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10061
10062 ;;
10063 fnv)
10064 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10065
10066 ;;
10067 *)
10068 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10069 ;;
10070esac
10071
10072else
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10074$as_echo "default" >&6; }
10075fi
10076
10077
Charles-François Natalid30b0222014-05-08 23:08:51 +010010078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10079$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10080
10081# Check whether --with-address_sanitizer was given.
10082if test "${with_address_sanitizer+set}" = set; then :
10083 withval=$with_address_sanitizer;
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10085$as_echo "$withval" >&6; }
10086BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10087LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010088# ASan works by controlling memory allocation, our own malloc interferes.
10089with_pymalloc="no"
10090
10091else
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
10094fi
10095
10096
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10098$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10099
10100# Check whether --with-memory_sanitizer was given.
10101if test "${with_memory_sanitizer+set}" = set; then :
10102 withval=$with_memory_sanitizer;
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10104$as_echo "$withval" >&6; }
10105BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10106LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10107# MSan works by controlling memory allocation, our own malloc interferes.
10108with_pymalloc="no"
10109
10110else
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10112$as_echo "no" >&6; }
10113fi
10114
10115
10116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10117$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10118
10119# Check whether --with-undefined_behavior_sanitizer was given.
10120if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10121 withval=$with_undefined_behavior_sanitizer;
10122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10123$as_echo "$withval" >&6; }
10124BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10125LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010126
10127else
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
10130fi
10131
10132
Guido van Rossum70c7f481998-03-26 18:44:10 +000010133# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10135$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010136if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010140LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144/* Override any GCC internal prototype to avoid an error.
10145 Use char because int might match the return type of a GCC
10146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147#ifdef __cplusplus
10148extern "C"
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 ;
10156 return 0;
10157}
10158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164rm -f core conftest.err conftest.$ac_objext \
10165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10169$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010171 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010172fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010173 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10175$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010176if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010178else
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010180LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184/* Override any GCC internal prototype to avoid an error.
10185 Use char because int might match the return type of a GCC
10186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187#ifdef __cplusplus
10188extern "C"
10189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010190char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010191int
10192main ()
10193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ;
10196 return 0;
10197}
10198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010201else
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204rm -f core conftest.err conftest.$ac_objext \
10205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010206LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10209$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010210if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010211 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010212fi
10213 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10216$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010219if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10222$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010223LIBS="$withval $LIBS"
10224
10225else
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228fi
10229
Guido van Rossum7f43da71994-08-01 12:15:30 +000010230
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010231
10232
10233
10234
10235
10236
Victor Stinner23a683a2019-04-12 21:27:37 +020010237
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010238if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10239 if test -n "$ac_tool_prefix"; then
10240 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10241set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243$as_echo_n "checking for $ac_word... " >&6; }
10244if ${ac_cv_path_PKG_CONFIG+:} false; then :
10245 $as_echo_n "(cached) " >&6
10246else
10247 case $PKG_CONFIG in
10248 [\\/]* | ?:[\\/]*)
10249 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10250 ;;
10251 *)
10252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253for as_dir in $PATH
10254do
10255 IFS=$as_save_IFS
10256 test -z "$as_dir" && as_dir=.
10257 for ac_exec_ext in '' $ac_executable_extensions; do
10258 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261 break 2
10262 fi
10263done
10264 done
10265IFS=$as_save_IFS
10266
10267 ;;
10268esac
10269fi
10270PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10271if test -n "$PKG_CONFIG"; then
10272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10273$as_echo "$PKG_CONFIG" >&6; }
10274else
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277fi
10278
10279
10280fi
10281if test -z "$ac_cv_path_PKG_CONFIG"; then
10282 ac_pt_PKG_CONFIG=$PKG_CONFIG
10283 # Extract the first word of "pkg-config", so it can be a program name with args.
10284set dummy pkg-config; ac_word=$2
10285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10286$as_echo_n "checking for $ac_word... " >&6; }
10287if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10288 $as_echo_n "(cached) " >&6
10289else
10290 case $ac_pt_PKG_CONFIG in
10291 [\\/]* | ?:[\\/]*)
10292 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10293 ;;
10294 *)
10295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10296for as_dir in $PATH
10297do
10298 IFS=$as_save_IFS
10299 test -z "$as_dir" && as_dir=.
10300 for ac_exec_ext in '' $ac_executable_extensions; do
10301 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10302 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10304 break 2
10305 fi
10306done
10307 done
10308IFS=$as_save_IFS
10309
10310 ;;
10311esac
10312fi
10313ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10314if test -n "$ac_pt_PKG_CONFIG"; then
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10316$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10317else
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
10320fi
10321
10322 if test "x$ac_pt_PKG_CONFIG" = x; then
10323 PKG_CONFIG=""
10324 else
10325 case $cross_compiling:$ac_tool_warned in
10326yes:)
10327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10329ac_tool_warned=yes ;;
10330esac
10331 PKG_CONFIG=$ac_pt_PKG_CONFIG
10332 fi
10333else
10334 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10335fi
10336
10337fi
10338if test -n "$PKG_CONFIG"; then
10339 _pkg_min_version=0.9.0
10340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10341$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10342 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10344$as_echo "yes" >&6; }
10345 else
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348 PKG_CONFIG=""
10349 fi
10350fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010351
10352# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10354$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010355
10356# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010357if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010358 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010359else
10360 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010361fi
10362
10363
Matthias Kloseb9621712010-04-24 17:59:49 +000010364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10365$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010366
10367# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10369$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010370
10371# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010372if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010373 withval=$with_system_ffi;
10374fi
10375
10376
Zachary Waref40d4dd2016-09-17 01:25:24 -050010377if test "$ac_sys_system" = "Darwin"
10378then
10379 case "$with_system_ffi" in
10380 "")
10381 with_system_ffi="no"
10382 ;;
10383 yes|no)
10384 ;;
10385 *)
10386 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10387 ;;
10388 esac
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10390$as_echo "$with_system_ffi" >&6; }
10391else
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10393$as_echo "yes" >&6; }
10394 if test "$with_system_ffi" != ""
10395 then
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10397$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10398 fi
10399 with_system_ffi="yes"
10400fi
Zachary Ware935043d2016-09-09 17:01:21 -070010401
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010402if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010403 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10404else
10405 LIBFFI_INCLUDEDIR=""
10406fi
10407
10408
Stefan Krah60187b52012-03-23 19:06:27 +010010409# Check for use of the system libmpdec library
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10411$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10412
10413# Check whether --with-system_libmpdec was given.
10414if test "${with_system_libmpdec+set}" = set; then :
10415 withval=$with_system_libmpdec;
10416else
10417 with_system_libmpdec="no"
10418fi
10419
10420
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10422$as_echo "$with_system_libmpdec" >&6; }
10423
Benjamin Peterson076ed002010-10-31 17:11:02 +000010424# Check for support for loadable sqlite extensions
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10426$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10427# Check whether --enable-loadable-sqlite-extensions was given.
10428if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10429 enableval=$enable_loadable_sqlite_extensions;
10430else
10431 enable_loadable_sqlite_extensions="no"
10432fi
10433
10434
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10436$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10437
Ned Deilyd819b932013-09-06 01:07:05 -070010438# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10439
10440
10441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10442$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10443
10444# Check whether --with-tcltk-includes was given.
10445if test "${with_tcltk_includes+set}" = set; then :
10446 withval=$with_tcltk_includes;
10447else
10448 with_tcltk_includes="default"
10449fi
10450
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10452$as_echo "$with_tcltk_includes" >&6; }
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10454$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10455
10456# Check whether --with-tcltk-libs was given.
10457if test "${with_tcltk_libs+set}" = set; then :
10458 withval=$with_tcltk_libs;
10459else
10460 with_tcltk_libs="default"
10461fi
10462
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10464$as_echo "$with_tcltk_libs" >&6; }
10465if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10466then
10467 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10468 then
10469 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10470 fi
10471 TCLTK_INCLUDES=""
10472 TCLTK_LIBS=""
10473else
10474 TCLTK_INCLUDES="$with_tcltk_includes"
10475 TCLTK_LIBS="$with_tcltk_libs"
10476fi
10477
Matthias Klose55708cc2009-04-30 08:06:49 +000010478# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10480$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010481
10482# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010483if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010484 withval=$with_dbmliborder;
10485if test x$with_dbmliborder = xyes
10486then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010487as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010488else
10489 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10490 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10491 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010492 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010493 fi
10494 done
10495fi
10496fi
10497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10499$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010500
Martin v. Löwis11437992002-04-12 09:54:03 +000010501# Templates for things AC_DEFINEd more than once.
10502# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010503
10504
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010505if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010506then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010507 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010509
10510 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010511elif test "$ac_cv_kpthread" = "yes"
10512then
10513 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010514 if test "$ac_cv_cxx_thread" = "yes"; then
10515 CXX="$CXX -Kpthread"
10516 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010517 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010518elif test "$ac_cv_kthread" = "yes"
10519then
10520 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010521 if test "$ac_cv_cxx_thread" = "yes"; then
10522 CXX="$CXX -Kthread"
10523 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010524 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525elif test "$ac_cv_pthread" = "yes"
10526then
10527 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010528 if test "$ac_cv_cxx_thread" = "yes"; then
10529 CXX="$CXX -pthread"
10530 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010532else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010533 if test ! -z "$withval" -a -d "$withval"
10534 then LDFLAGS="$LDFLAGS -L$withval"
10535 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010536
10537 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010538 # define _POSIX_THREADS in unistd.h. Some apparently don't
10539 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10541$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010544
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010545#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010546#ifdef _POSIX_THREADS
10547yes
10548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010549
10550_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553 unistd_defines_pthreads=yes
10554else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010555 unistd_defines_pthreads=no
10556fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010557rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010558
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10560$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010563
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010564 # Just looking for pthread_create in libpthread is not enough:
10565 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10566 # So we really have to include pthread.h, and then link.
10567 _libs=$LIBS
10568 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10570$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010572/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010573
10574#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010575#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010576
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010577void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010578int
10579main ()
10580{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010581
10582pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 ;
10584 return 0;
10585}
10586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10590$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010591 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010592
Guido van Rossum02a1c402000-02-25 19:26:31 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010595 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010597if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010598
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010599 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010600
Guido van Rossumad678af1998-10-02 14:42:15 +000010601else
Guido van Rossumad678af1998-10-02 14:42:15 +000010602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10604$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010605if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010607else
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010609LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010613/* Override any GCC internal prototype to avoid an error.
10614 Use char because int might match the return type of a GCC
10615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010616#ifdef __cplusplus
10617extern "C"
10618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010619char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010620int
10621main ()
10622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010629 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010633rm -f core conftest.err conftest.$ac_objext \
10634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010635LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10638$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010639if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010640
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010641 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010642 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010643
Greg Steinadf63d62000-07-05 10:38:09 +000010644else
Greg Steinadf63d62000-07-05 10:38:09 +000010645
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10647$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010648if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010652LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656/* Override any GCC internal prototype to avoid an error.
10657 Use char because int might match the return type of a GCC
10658 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010659#ifdef __cplusplus
10660extern "C"
10661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010662char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010663int
10664main ()
10665{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 ;
10668 return 0;
10669}
10670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010673else
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010676rm -f core conftest.err conftest.$ac_objext \
10677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010678LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10681$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010682if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010683
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010684 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010685 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010686
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010687else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10690$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010691if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010693else
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010695LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699/* Override any GCC internal prototype to avoid an error.
10700 Use char because int might match the return type of a GCC
10701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010702#ifdef __cplusplus
10703extern "C"
10704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010705char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010706int
10707main ()
10708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ;
10711 return 0;
10712}
10713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010716else
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010719rm -f core conftest.err conftest.$ac_objext \
10720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10724$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010725if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010726
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010727 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010728 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010729
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010730else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010731
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10733$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010734if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010736else
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010738LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742/* Override any GCC internal prototype to avoid an error.
10743 Use char because int might match the return type of a GCC
10744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010745#ifdef __cplusplus
10746extern "C"
10747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010748char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010749int
10750main ()
10751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 ;
10754 return 0;
10755}
10756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010759else
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010762rm -f core conftest.err conftest.$ac_objext \
10763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010764LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10767$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010768if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010769
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010770 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010771 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010772
Guido van Rossumb93a8621998-05-07 13:27:32 +000010773else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010774
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010775 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10776
Guido van Rossum2d38f911996-06-26 19:47:01 +000010777fi
10778
Guido van Rossum627b2d71993-12-24 10:39:16 +000010779
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010780fi
10781
Guido van Rossum0be3e491997-05-22 20:33:33 +000010782fi
10783
Guido van Rossum49545951997-12-02 19:28:29 +000010784fi
10785
Guido van Rossumb93a8621998-05-07 13:27:32 +000010786fi
10787
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010789rm -f core conftest.err conftest.$ac_objext \
10790 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10793$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010794if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796else
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010798LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010802/* Override any GCC internal prototype to avoid an error.
10803 Use char because int might match the return type of a GCC
10804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010805#ifdef __cplusplus
10806extern "C"
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010809int
10810main ()
10811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ;
10814 return 0;
10815}
10816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010817if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010819else
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010822rm -f core conftest.err conftest.$ac_objext \
10823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010824LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10827$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010828if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010829
Martin v. Löwis130fb172001-07-19 11:00:41 +000010830 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010831
Guido van Rossum627b2d71993-12-24 10:39:16 +000010832fi
10833
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010834
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010835fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010836
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010837if test "$posix_threads" = "yes"; then
10838 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841
10842 fi
10843
10844 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10845 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010846 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010847$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010848
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849 ;;
10850 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852
10853 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010854 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010855$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010856
10857 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010858 esac
10859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10861$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010862 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864else
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010866 ac_cv_pthread_system_supported=no
10867else
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010870
10871 #include <stdio.h>
10872 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873 void *foo(void *parm) {
10874 return NULL;
10875 }
10876 main() {
10877 pthread_attr_t attr;
10878 pthread_t id;
10879 if (pthread_attr_init(&attr)) exit(-1);
10880 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10881 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10882 exit(0);
10883 }
10884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010886 ac_cv_pthread_system_supported=yes
10887else
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010892fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894
Guido van Rossum627b2d71993-12-24 10:39:16 +000010895fi
10896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10898$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010899 if test "$ac_cv_pthread_system_supported" = "yes"; then
10900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010902
10903 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 for ac_func in pthread_sigmask
10905do :
10906 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010907if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010908 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010910_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010911 case $ac_sys_system in
10912 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010915
10916 ;;
10917 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918fi
10919done
10920
pdoxe14679c2017-10-05 00:01:56 -070010921 for ac_func in pthread_getcpuclockid
10922do :
10923 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10924if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10925 cat >>confdefs.h <<_ACEOF
10926#define HAVE_PTHREAD_GETCPUCLOCKID 1
10927_ACEOF
10928
10929fi
10930done
10931
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010932fi
10933
10934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10938$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010940if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945 ipv6=no
10946 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10948$as_echo "yes" >&6; }
10949 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950
10951 ipv6=yes
10952 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954else
Martin v. Löwis11437992002-04-12 09:54:03 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010957/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958 /* AF_INET6 available check */
10959#include <sys/types.h>
10960#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010961int
10962main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010964int domain = AF_INET6;
10965 ;
10966 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967}
Martin v. Löwis11437992002-04-12 09:54:03 +000010968_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010969if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10972$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010975else
Matthias Kloseb159a552010-04-25 21:00:44 +000010976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010980
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010984if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10986$as_echo_n "checking if RFC2553 API is available... " >&6; }
10987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010989
10990 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010991#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010992int
10993main ()
10994{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010995struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010996 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 ;
10998 return 0;
10999}
Matthias Kloseb159a552010-04-25 21:00:44 +000011000
Martin v. Löwis11437992002-04-12 09:54:03 +000011001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011003
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011006 ipv6=yes
11007
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011008else
Matthias Kloseb159a552010-04-25 21:00:44 +000011009
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011012 ipv6=no
11013
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011016fi
11017
11018if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011020
11021fi
11022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023fi
11024
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025
11026ipv6type=unknown
11027ipv6lib=none
11028ipv6trylibc=no
11029
11030if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11032$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011033 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11034 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035 case $i in
11036 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011038/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040#include <netinet/in.h>
11041#ifdef IPV6_INRIA_VERSION
11042yes
11043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011044_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011047 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011049rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050
11051 ;;
11052 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011054/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056#include <netinet/in.h>
11057#ifdef __KAME__
11058yes
11059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011062 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063 ipv6type=$i;
11064 ipv6lib=inet6
11065 ipv6libdir=/usr/local/v6/lib
11066 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011068rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069
11070 ;;
11071 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011073/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011074
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075#include <features.h>
11076#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11077yes
11078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011079_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011082 ipv6type=$i;
11083 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011084fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011085rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086
11087 ;;
11088 linux-inet6)
11089 if test -d /usr/inet6; then
11090 ipv6type=$i
11091 ipv6lib=inet6
11092 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011093 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094 fi
11095 ;;
11096 solaris)
11097 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011098 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099 ipv6type=$i
11100 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101 fi
11102 fi
11103 ;;
11104 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011107
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108#include <sys/param.h>
11109#ifdef _TOSHIBA_INET6
11110yes
11111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011112_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115 ipv6type=$i;
11116 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011117 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011119rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120
11121 ;;
11122 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126#include </usr/local/v6/include/sys/v6config.h>
11127#ifdef __V6D__
11128yes
11129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133 ipv6type=$i;
11134 ipv6lib=v6;
11135 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011136 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011138rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139
11140 ;;
11141 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011143/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011144
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145#include <sys/param.h>
11146#ifdef _ZETA_MINAMI_INET6
11147yes
11148#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152 ipv6type=$i;
11153 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011154 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011156rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157
11158 ;;
11159 esac
11160 if test "$ipv6type" != "unknown"; then
11161 break
11162 fi
11163 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11165$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011166fi
11167
11168if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11169 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11170 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11171 echo "using lib$ipv6lib"
11172 else
11173 if test $ipv6trylibc = "yes"; then
11174 echo "using libc"
11175 else
11176 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11177 echo "You need to fetch lib$ipv6lib.a from appropriate"
11178 echo 'ipv6 kit and compile beforehand.'
11179 exit 1
11180 fi
11181 fi
11182fi
11183
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11185$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11187/* end confdefs.h. */
11188 /* CAN_RAW_FD_FRAMES available check */
11189#include <linux/can/raw.h>
11190int
11191main ()
11192{
11193int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11194 ;
11195 return 0;
11196}
11197_ACEOF
11198if ac_fn_c_try_compile "$LINENO"; then :
11199
11200
11201$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11202
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11204$as_echo "yes" >&6; }
11205
11206else
11207
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11209$as_echo "no" >&6; }
11210
11211fi
11212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11213
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011214# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11216$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011218# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220 withval=$with_doc_strings;
11221fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011222
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011223
11224if test -z "$with_doc_strings"
11225then with_doc_strings="yes"
11226fi
11227if test "$with_doc_strings" != "no"
11228then
11229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011231
11232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11234$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011235
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011236# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11238$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011240# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011241if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242 withval=$with_pymalloc;
11243fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011244
Neil Schemenauera35c6882001-02-27 04:45:05 +000011245
Neil Schemenauer16c22972002-03-22 15:34:49 +000011246if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011247then
11248 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011249fi
11250if test "$with_pymalloc" != "no"
11251then
Martin v. Löwis11437992002-04-12 09:54:03 +000011252
Matthias Kloseb9621712010-04-24 17:59:49 +000011253$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011254
11255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11257$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011258
Nick Coghlan6ea41862017-06-11 13:16:15 +100011259# Check for --with-c-locale-coercion
11260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11261$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11262
11263# Check whether --with-c-locale-coercion was given.
11264if test "${with_c_locale_coercion+set}" = set; then :
11265 withval=$with_c_locale_coercion;
11266fi
11267
11268
11269if test -z "$with_c_locale_coercion"
11270then
11271 with_c_locale_coercion="yes"
11272fi
11273if test "$with_c_locale_coercion" != "no"
11274then
11275
11276$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11277
11278fi
11279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11280$as_echo "$with_c_locale_coercion" >&6; }
11281
Benjamin Peterson05159c42009-12-03 03:01:27 +000011282# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11284$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011285
11286# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011287if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011288 withval=$with_valgrind;
11289else
11290 with_valgrind=no
11291fi
11292
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11294$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 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 +020011297if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011300
11301else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011302 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011303
11304fi
11305
11306
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011307 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011308fi
11309
Łukasz Langaa785c872016-09-09 17:37:37 -070011310# Check for DTrace support
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11312$as_echo_n "checking for --with-dtrace... " >&6; }
11313
11314# Check whether --with-dtrace was given.
11315if test "${with_dtrace+set}" = set; then :
11316 withval=$with_dtrace;
11317else
11318 with_dtrace=no
11319fi
11320
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11322$as_echo "$with_dtrace" >&6; }
11323
11324
11325
11326
11327
11328DTRACE=
11329DFLAGS=
11330DTRACE_HEADERS=
11331DTRACE_OBJS=
11332
11333if test "$with_dtrace" = "yes"
11334then
11335 # Extract the first word of "dtrace", so it can be a program name with args.
11336set dummy dtrace; ac_word=$2
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11338$as_echo_n "checking for $ac_word... " >&6; }
11339if ${ac_cv_path_DTRACE+:} false; then :
11340 $as_echo_n "(cached) " >&6
11341else
11342 case $DTRACE in
11343 [\\/]* | ?:[\\/]*)
11344 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11345 ;;
11346 *)
11347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11348for as_dir in $PATH
11349do
11350 IFS=$as_save_IFS
11351 test -z "$as_dir" && as_dir=.
11352 for ac_exec_ext in '' $ac_executable_extensions; do
11353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11354 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11356 break 2
11357 fi
11358done
11359 done
11360IFS=$as_save_IFS
11361
11362 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11363 ;;
11364esac
11365fi
11366DTRACE=$ac_cv_path_DTRACE
11367if test -n "$DTRACE"; then
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11369$as_echo "$DTRACE" >&6; }
11370else
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373fi
11374
11375
11376 if test "$DTRACE" = "not found"; then
11377 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11378 fi
11379
11380$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11381
11382 DTRACE_HEADERS="Include/pydtrace_probes.h"
11383
11384 # On OS X, DTrace providers do not need to be explicitly compiled and
11385 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11386 # generation flag '-G'. We check for presence of this flag, rather than
11387 # hardcoding support by OS, in the interest of robustness.
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11389$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11390if ${ac_cv_dtrace_link+:} false; then :
11391 $as_echo_n "(cached) " >&6
11392else
11393 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011394 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011395 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11396 ac_cv_dtrace_link=yes
11397
11398fi
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11400$as_echo "$ac_cv_dtrace_link" >&6; }
11401 if test "$ac_cv_dtrace_link" = "yes"; then
11402 DTRACE_OBJS="Python/pydtrace.o"
11403 fi
11404fi
11405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011406# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011407
Guido van Rossum98935bf2001-09-05 19:13:16 +000011408DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011409
Guido van Rossume97ee181999-12-20 21:27:22 +000011410# the dlopen() function means we might want to use dynload_shlib.o. some
11411# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011412for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011413do :
11414 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011415if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011418_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011419
Guido van Rossume97ee181999-12-20 21:27:22 +000011420fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011421done
Guido van Rossume97ee181999-12-20 21:27:22 +000011422
Michael W. Hudson54241132001-12-07 15:38:26 +000011423
Guido van Rossume97ee181999-12-20 21:27:22 +000011424# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11425# loading of modules.
11426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11428$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011429if test -z "$DYNLOADFILE"
11430then
11431 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011432 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11433 if test "$ac_cv_func_dlopen" = yes
11434 then DYNLOADFILE="dynload_shlib.o"
11435 else DYNLOADFILE="dynload_aix.o"
11436 fi
11437 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011438 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011439 *)
11440 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11441 # out any dynamic loading
11442 if test "$ac_cv_func_dlopen" = yes
11443 then DYNLOADFILE="dynload_shlib.o"
11444 else DYNLOADFILE="dynload_stub.o"
11445 fi
11446 ;;
11447 esac
11448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11450$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011451if test "$DYNLOADFILE" != "dynload_stub.o"
11452then
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011455
11456fi
11457
Neil Schemenauer4e425612001-06-19 15:44:15 +000011458# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11459
Michael W. Hudson54241132001-12-07 15:38:26 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11462$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011463if test -z "$MACHDEP_OBJS"
11464then
Jack Jansene578a632001-08-15 01:27:14 +000011465 MACHDEP_OBJS=$extra_machdep_objs
11466else
11467 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011468fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011469if test -z "$MACHDEP_OBJS"; then
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11471$as_echo "none" >&6; }
11472else
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11474$as_echo "$MACHDEP_OBJS" >&6; }
11475fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011476
Guido van Rossum627b2d71993-12-24 10:39:16 +000011477# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011478for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
David Carlier51aa35e2019-05-23 04:32:44 +000011479 clock confstr ctermid dup3 execv explicit_bzero explicit_memset faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011480 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011481 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011482 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011483 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011484 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011485 if_nameindex \
Inada Naokibee31ce2019-05-30 16:35:41 +090011486 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011487 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011488 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011489 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011490 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11491 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011492 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011493 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011494 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011495 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11496 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011497 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011498 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011499 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011500 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011501 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011502do :
11503 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11504ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011505if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011507#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011508_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011510fi
11511done
11512
Michael W. Hudson54241132001-12-07 15:38:26 +000011513
Benjamin Peterson40caa052018-09-12 15:52:40 -070011514# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11515# links. Some libc implementations have a stub lchmod implementation that always
11516# returns an error.
11517if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011518 for ac_func in lchmod
11519do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011520 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11521if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011522 cat >>confdefs.h <<_ACEOF
11523#define HAVE_LCHMOD 1
11524_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011525
11526fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011527done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011528
11529fi
11530
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011531ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11532 #include <dirent.h>
11533"
11534if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11535
11536$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11537
11538fi
11539
11540
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011541# For some functions, having a definition is not sufficient, since
11542# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11544$as_echo_n "checking for chroot... " >&6; }
11545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011546/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011547#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011548int
11549main ()
11550{
11551void *x=chroot
11552 ;
11553 return 0;
11554}
11555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557
Matthias Kloseb9621712010-04-24 17:59:49 +000011558$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559
Matthias Kloseb159a552010-04-25 21:00:44 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011561$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011562else
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11564$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011565
11566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11569$as_echo_n "checking for link... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573int
11574main ()
11575{
11576void *x=link
11577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584
Matthias Kloseb159a552010-04-25 21:00:44 +000011585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11589$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011590
11591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11594$as_echo_n "checking for symlink... " >&6; }
11595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598int
11599main ()
11600{
11601void *x=symlink
11602 ;
11603 return 0;
11604}
11605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609
Matthias Kloseb159a552010-04-25 21:00:44 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011615
11616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11619$as_echo_n "checking for fchdir... " >&6; }
11620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011621/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011622#include <unistd.h>
11623int
11624main ()
11625{
11626void *x=fchdir
11627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011634
Matthias Kloseb159a552010-04-25 21:00:44 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011640
11641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11644$as_echo_n "checking for fsync... " >&6; }
11645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647#include <unistd.h>
11648int
11649main ()
11650{
11651void *x=fsync
11652 ;
11653 return 0;
11654}
11655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011659
Matthias Kloseb159a552010-04-25 21:00:44 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011662else
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11664$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011665
11666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11669$as_echo_n "checking for fdatasync... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011671/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011672#include <unistd.h>
11673int
11674main ()
11675{
11676void *x=fdatasync
11677 ;
11678 return 0;
11679}
11680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011684
Matthias Kloseb159a552010-04-25 21:00:44 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011690
11691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11694$as_echo_n "checking for epoll... " >&6; }
11695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011696/* end confdefs.h. */
11697#include <sys/epoll.h>
11698int
11699main ()
11700{
11701void *x=epoll_create
11702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011709
Matthias Kloseb159a552010-04-25 21:00:44 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11714$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011715
11716fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11719$as_echo_n "checking for epoll_create1... " >&6; }
11720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721/* end confdefs.h. */
11722#include <sys/epoll.h>
11723int
11724main ()
11725{
11726void *x=epoll_create1
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731if ac_fn_c_try_compile "$LINENO"; then :
11732
11733$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11734
11735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11736$as_echo "yes" >&6; }
11737else
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
11740
11741fi
11742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11744$as_echo_n "checking for kqueue... " >&6; }
11745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011746/* end confdefs.h. */
11747
11748#include <sys/types.h>
11749#include <sys/event.h>
11750
11751int
11752main ()
11753{
11754int x=kqueue()
11755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011759if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011762
Matthias Kloseb159a552010-04-25 21:00:44 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11767$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011768
11769fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11772$as_echo_n "checking for prlimit... " >&6; }
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11774/* end confdefs.h. */
11775
11776#include <sys/time.h>
11777#include <sys/resource.h>
11778
11779int
11780main ()
11781{
11782void *x=prlimit
11783 ;
11784 return 0;
11785}
11786_ACEOF
11787if ac_fn_c_try_compile "$LINENO"; then :
11788
11789$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11790
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11792$as_echo "yes" >&6; }
11793else
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11795$as_echo "no" >&6; }
11796
11797fi
11798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11799
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11801$as_echo_n "checking for memfd_create... " >&6; }
11802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11803/* end confdefs.h. */
11804
11805#ifdef HAVE_SYS_MMAN_H
11806#include <sys/mman.h>
11807#endif
11808#ifdef HAVE_SYS_MEMFD_H
11809#include <sys/memfd.h>
11810#endif
11811
11812int
11813main ()
11814{
11815void *x=memfd_create
11816 ;
11817 return 0;
11818}
11819_ACEOF
11820if ac_fn_c_try_compile "$LINENO"; then :
11821
11822$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11823
11824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11825$as_echo "yes" >&6; }
11826else
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11828$as_echo "no" >&6; }
11829
11830fi
11831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11832
Martin v. Löwisd5843682002-11-21 20:41:28 +000011833# On some systems (eg. FreeBSD 5), we would find a definition of the
11834# functions ctermid_r, setgroups in the library, but no prototype
11835# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11836# address to avoid compiler warnings and potential miscompilations
11837# because of the missing prototypes.
11838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11840$as_echo_n "checking for ctermid_r... " >&6; }
11841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011842/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011843
Martin v. Löwisd5843682002-11-21 20:41:28 +000011844#include <stdio.h>
11845
Martin v. Löwisd5843682002-11-21 20:41:28 +000011846int
11847main ()
11848{
11849void* p = ctermid_r
11850 ;
11851 return 0;
11852}
11853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011857
Matthias Kloseb159a552010-04-25 21:00:44 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011859$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11862$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011863
11864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11868$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011870 $as_echo_n "(cached) " >&6
11871else
11872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011873/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011874#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011875int
11876main ()
11877{
11878void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011879
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011880 ;
11881 return 0;
11882}
11883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011884if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011885 ac_cv_flock_decl=yes
11886else
11887 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011888
11889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011891
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011892fi
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11894$as_echo "$ac_cv_flock_decl" >&6; }
11895if test "x${ac_cv_flock_decl}" = xyes; then
11896 for ac_func in flock
11897do :
11898 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011899if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011900 cat >>confdefs.h <<_ACEOF
11901#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011902_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011903
Antoine Pitroua3000072010-09-07 14:52:42 +000011904else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011906$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011907if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011908 $as_echo_n "(cached) " >&6
11909else
11910 ac_check_lib_save_LIBS=$LIBS
11911LIBS="-lbsd $LIBS"
11912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
11914
11915/* Override any GCC internal prototype to avoid an error.
11916 Use char because int might match the return type of a GCC
11917 builtin and then its argument prototype would still apply. */
11918#ifdef __cplusplus
11919extern "C"
11920#endif
11921char flock ();
11922int
11923main ()
11924{
11925return flock ();
11926 ;
11927 return 0;
11928}
11929_ACEOF
11930if ac_fn_c_try_link "$LINENO"; then :
11931 ac_cv_lib_bsd_flock=yes
11932else
11933 ac_cv_lib_bsd_flock=no
11934fi
11935rm -f core conftest.err conftest.$ac_objext \
11936 conftest$ac_exeext conftest.$ac_ext
11937LIBS=$ac_check_lib_save_LIBS
11938fi
11939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11940$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011941if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011942 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011943
11944
11945$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11946
11947
11948fi
11949
11950
11951fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011952done
11953
Antoine Pitroua3000072010-09-07 14:52:42 +000011954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11957$as_echo_n "checking for getpagesize... " >&6; }
11958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011959/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011960
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011961#include <unistd.h>
11962
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011963int
11964main ()
11965{
11966void* p = getpagesize
11967 ;
11968 return 0;
11969}
11970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011974
Matthias Kloseb159a552010-04-25 21:00:44 +000011975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011976$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011977else
Matthias Kloseb9621712010-04-24 17:59:49 +000011978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011980
11981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011983
Victor Stinner984890f2011-11-24 13:53:38 +010011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11985$as_echo_n "checking for broken unsetenv... " >&6; }
11986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11987/* end confdefs.h. */
11988
11989#include <stdlib.h>
11990
11991int
11992main ()
11993{
11994int res = unsetenv("DUMMY")
11995 ;
11996 return 0;
11997}
11998_ACEOF
11999if ac_fn_c_try_compile "$LINENO"; then :
12000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12001$as_echo "no" >&6; }
12002else
12003
12004$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12005
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12007$as_echo "yes" >&6; }
12008
12009fi
12010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12011
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012012for ac_prog in true
12013do
12014 # Extract the first word of "$ac_prog", so it can be a program name with args.
12015set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012018if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012020else
12021 if test -n "$TRUE"; then
12022 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12023else
12024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12025for as_dir in $PATH
12026do
12027 IFS=$as_save_IFS
12028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012031 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 $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 +000012033 break 2
12034 fi
12035done
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012037IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012038
12039fi
12040fi
12041TRUE=$ac_cv_prog_TRUE
12042if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12044$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012045else
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12047$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012048fi
12049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012050
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012051 test -n "$TRUE" && break
12052done
12053test -n "$TRUE" || TRUE="/bin/true"
12054
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12057$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060else
12061 ac_check_lib_save_LIBS=$LIBS
12062LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012066/* Override any GCC internal prototype to avoid an error.
12067 Use char because int might match the return type of a GCC
12068 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069#ifdef __cplusplus
12070extern "C"
12071#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012072char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073int
12074main ()
12075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012076return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077 ;
12078 return 0;
12079}
12080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012082 ac_cv_lib_c_inet_aton=yes
12083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086rm -f core conftest.err conftest.$ac_objext \
12087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088LIBS=$ac_check_lib_save_LIBS
12089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12091$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012093 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12096$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012097if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012099else
12100 ac_check_lib_save_LIBS=$LIBS
12101LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012103/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105/* Override any GCC internal prototype to avoid an error.
12106 Use char because int might match the return type of a GCC
12107 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108#ifdef __cplusplus
12109extern "C"
12110#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012111char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012112int
12113main ()
12114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116 ;
12117 return 0;
12118}
12119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012121 ac_cv_lib_resolv_inet_aton=yes
12122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125rm -f core conftest.err conftest.$ac_objext \
12126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012127LIBS=$ac_check_lib_save_LIBS
12128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12130$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012131if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012132 cat >>confdefs.h <<_ACEOF
12133#define HAVE_LIBRESOLV 1
12134_ACEOF
12135
12136 LIBS="-lresolv $LIBS"
12137
12138fi
12139
12140
12141fi
12142
12143
Christian Heimesd0764e22007-12-04 15:00:33 +000012144# On Tru64, chflags seems to be present, but calling it will
12145# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12147$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012152 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012155/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012156
Christian Heimesd0764e22007-12-04 15:00:33 +000012157#include <sys/stat.h>
12158#include <unistd.h>
12159int main(int argc, char*argv[])
12160{
12161 if(chflags(argv[0], 0) != 0)
12162 return 1;
12163 return 0;
12164}
Ned Deily3eb67d52011-06-28 00:00:28 -070012165
Christian Heimesd0764e22007-12-04 15:00:33 +000012166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012168 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012174fi
12175
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12179$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012180if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012183 ac_cv_have_chflags="yes"
12184else
12185 ac_cv_have_chflags="no"
12186fi
12187
12188fi
12189if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012192
12193fi
12194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12196$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012199else
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012201 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012204/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012205
Christian Heimesd0764e22007-12-04 15:00:33 +000012206#include <sys/stat.h>
12207#include <unistd.h>
12208int main(int argc, char*argv[])
12209{
12210 if(lchflags(argv[0], 0) != 0)
12211 return 1;
12212 return 0;
12213}
Ned Deily3eb67d52011-06-28 00:00:28 -070012214
Christian Heimesd0764e22007-12-04 15:00:33 +000012215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012216if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012217 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012223fi
12224
12225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12228$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012229if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012232 ac_cv_have_lchflags="yes"
12233else
12234 ac_cv_have_lchflags="no"
12235fi
12236
12237fi
12238if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012241
12242fi
12243
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012244case $ac_sys_system/$ac_sys_release in
12245Darwin/*)
12246 _CUR_CFLAGS="${CFLAGS}"
12247 _CUR_LDFLAGS="${LDFLAGS}"
12248 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12249 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12250 ;;
12251esac
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12254$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012257else
12258 ac_check_lib_save_LIBS=$LIBS
12259LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012261/* end confdefs.h. */
12262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263/* Override any GCC internal prototype to avoid an error.
12264 Use char because int might match the return type of a GCC
12265 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012266#ifdef __cplusplus
12267extern "C"
12268#endif
12269char inflateCopy ();
12270int
12271main ()
12272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012279 ac_cv_lib_z_inflateCopy=yes
12280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283rm -f core conftest.err conftest.$ac_objext \
12284 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012285LIBS=$ac_check_lib_save_LIBS
12286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12288$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012289if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012292
12293fi
12294
12295
12296case $ac_sys_system/$ac_sys_release in
12297Darwin/*)
12298 CFLAGS="${_CUR_CFLAGS}"
12299 LDFLAGS="${_CUR_LDFLAGS}"
12300 ;;
12301esac
12302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12304$as_echo_n "checking for hstrerror... " >&6; }
12305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012307
Martin v. Löwise9416172003-05-03 10:12:45 +000012308#include <netdb.h>
12309
Martin v. Löwise9416172003-05-03 10:12:45 +000012310int
12311main ()
12312{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012313void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012314 ;
12315 return 0;
12316}
12317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012318if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012319
Matthias Kloseb9621712010-04-24 17:59:49 +000012320$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012321
Matthias Kloseb159a552010-04-25 21:00:44 +000012322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012324else
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12326$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012327
12328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012329rm -f core conftest.err conftest.$ac_objext \
12330 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12333$as_echo_n "checking for inet_aton... " >&6; }
12334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012335/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012336
Martin v. Löwis86d66262006-02-17 08:40:11 +000012337#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012338#include <sys/socket.h>
12339#include <netinet/in.h>
12340#include <arpa/inet.h>
12341
Martin v. Löwise9416172003-05-03 10:12:45 +000012342int
12343main ()
12344{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012345void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012346 ;
12347 return 0;
12348}
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012353
Matthias Kloseb159a552010-04-25 21:00:44 +000012354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012355$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012356else
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12358$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012359
12360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012361rm -f core conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12365$as_echo_n "checking for inet_pton... " >&6; }
12366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012367/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012368
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012369#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012370#include <sys/socket.h>
12371#include <netinet/in.h>
12372#include <arpa/inet.h>
12373
Martin v. Löwise9416172003-05-03 10:12:45 +000012374int
12375main ()
12376{
12377void* p = inet_pton
12378 ;
12379 return 0;
12380}
12381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012385
Matthias Kloseb159a552010-04-25 21:00:44 +000012386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012387$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012388else
Matthias Kloseb9621712010-04-24 17:59:49 +000012389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12390$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012391
12392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012394
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012395# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12397$as_echo_n "checking for setgroups... " >&6; }
12398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012400
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012401#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012402#ifdef HAVE_GRP_H
12403#include <grp.h>
12404#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012405
Martin v. Löwisd5843682002-11-21 20:41:28 +000012406int
12407main ()
12408{
12409void* p = setgroups
12410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012417
Matthias Kloseb159a552010-04-25 21:00:44 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012419$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012420else
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012423
12424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012426
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012427# check for openpty and forkpty
12428
12429for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012430do :
12431 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012432if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012435_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012437else
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12439$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012440if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012442else
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448/* Override any GCC internal prototype to avoid an error.
12449 Use char because int might match the return type of a GCC
12450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012451#ifdef __cplusplus
12452extern "C"
12453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012454char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012455int
12456main ()
12457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 ;
12460 return 0;
12461}
12462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012465else
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012468rm -f core conftest.err conftest.$ac_objext \
12469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012470LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12473$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012474if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012476 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012477else
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12479$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012480if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012482else
12483 ac_check_lib_save_LIBS=$LIBS
12484LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012486/* end confdefs.h. */
12487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488/* Override any GCC internal prototype to avoid an error.
12489 Use char because int might match the return type of a GCC
12490 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012491#ifdef __cplusplus
12492extern "C"
12493#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012494char openpty ();
12495int
12496main ()
12497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012499 ;
12500 return 0;
12501}
12502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012504 ac_cv_lib_bsd_openpty=yes
12505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012508rm -f core conftest.err conftest.$ac_objext \
12509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012510LIBS=$ac_check_lib_save_LIBS
12511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12513$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012514if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012516 LIBS="$LIBS -lbsd"
12517fi
12518
12519
12520fi
12521
Fred Drake8cef4cf2000-06-28 16:40:38 +000012522
12523fi
12524done
12525
12526for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012527do :
12528 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012529if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012532_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012533
Fred Drake8cef4cf2000-06-28 16:40:38 +000012534else
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12536$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012537if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012539else
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012541LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545/* Override any GCC internal prototype to avoid an error.
12546 Use char because int might match the return type of a GCC
12547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012548#ifdef __cplusplus
12549extern "C"
12550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012551char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012552int
12553main ()
12554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012556 ;
12557 return 0;
12558}
12559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012562else
Matthias Kloseb9621712010-04-24 17:59:49 +000012563 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012565rm -f core conftest.err conftest.$ac_objext \
12566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012567LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12570$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012571if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012573 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12576$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012577if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012579else
12580 ac_check_lib_save_LIBS=$LIBS
12581LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012583/* end confdefs.h. */
12584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585/* Override any GCC internal prototype to avoid an error.
12586 Use char because int might match the return type of a GCC
12587 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012588#ifdef __cplusplus
12589extern "C"
12590#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012591char forkpty ();
12592int
12593main ()
12594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012596 ;
12597 return 0;
12598}
12599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012600if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012601 ac_cv_lib_bsd_forkpty=yes
12602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605rm -f core conftest.err conftest.$ac_objext \
12606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012607LIBS=$ac_check_lib_save_LIBS
12608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12610$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012611if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012613 LIBS="$LIBS -lbsd"
12614fi
12615
12616
12617fi
12618
Fred Drake8cef4cf2000-06-28 16:40:38 +000012619
12620fi
12621done
12622
Jack Jansendd19cf82001-12-06 22:36:17 +000012623
Michael W. Hudson54241132001-12-07 15:38:26 +000012624# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012625for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012626do :
12627 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12628ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012629if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012632_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012635done
12636
Michael W. Hudson54241132001-12-07 15:38:26 +000012637
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012638ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012639if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012640 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012641
Martin v. Löwis1142de32002-03-29 16:28:31 +000012642else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012644 *" dup2.$ac_objext "* ) ;;
12645 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012647esac
12648
Martin v. Löwis1142de32002-03-29 16:28:31 +000012649fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012650
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012651ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012652if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012653 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12654
12655else
12656 case " $LIBOBJS " in
12657 *" strdup.$ac_objext "* ) ;;
12658 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12659 ;;
12660esac
12661
12662fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012663
12664
12665for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012666do :
12667 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012668if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012670#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012673/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012675int
12676main ()
12677{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012678getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 ;
12680 return 0;
12681}
12682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Matthias Kloseb9621712010-04-24 17:59:49 +000012685$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012686
Guido van Rossum627b2d71993-12-24 10:39:16 +000012687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012689
Guido van Rossum627b2d71993-12-24 10:39:16 +000012690fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012691done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012692
Jack Jansen150753c2003-03-29 22:07:47 +000012693for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012694do :
12695 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012696if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012697 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012698#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012702#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012703int
12704main ()
12705{
12706setpgrp(0,0);
12707 ;
12708 return 0;
12709}
12710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012714
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012717
12718fi
12719done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012720
Thomas Wouters3a584202000-08-05 23:28:51 +000012721for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012722do :
12723 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012724if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012729/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012731int
12732main ()
12733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_compile "$LINENO"; then :
12740
Guido van Rossum627b2d71993-12-24 10:39:16 +000012741else
Skip Montanaro6dead952003-09-25 14:50:04 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012744
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Guido van Rossum627b2d71993-12-24 10:39:16 +000012746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012750done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751
Michael W. Hudson54241132001-12-07 15:38:26 +000012752
Gregory P. Smith387512c2018-12-30 15:42:32 -080012753# We search for both crypt and crypt_r as one or the other may be defined
12754# This gets us our -lcrypt in LIBS when required on the target platform.
12755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12756$as_echo_n "checking for library containing crypt... " >&6; }
12757if ${ac_cv_search_crypt+:} false; then :
12758 $as_echo_n "(cached) " >&6
12759else
12760 ac_func_search_save_LIBS=$LIBS
12761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762/* end confdefs.h. */
12763
12764/* Override any GCC internal prototype to avoid an error.
12765 Use char because int might match the return type of a GCC
12766 builtin and then its argument prototype would still apply. */
12767#ifdef __cplusplus
12768extern "C"
12769#endif
12770char crypt ();
12771int
12772main ()
12773{
12774return crypt ();
12775 ;
12776 return 0;
12777}
12778_ACEOF
12779for ac_lib in '' crypt; do
12780 if test -z "$ac_lib"; then
12781 ac_res="none required"
12782 else
12783 ac_res=-l$ac_lib
12784 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12785 fi
12786 if ac_fn_c_try_link "$LINENO"; then :
12787 ac_cv_search_crypt=$ac_res
12788fi
12789rm -f core conftest.err conftest.$ac_objext \
12790 conftest$ac_exeext
12791 if ${ac_cv_search_crypt+:} false; then :
12792 break
12793fi
12794done
12795if ${ac_cv_search_crypt+:} false; then :
12796
12797else
12798 ac_cv_search_crypt=no
12799fi
12800rm conftest.$ac_ext
12801LIBS=$ac_func_search_save_LIBS
12802fi
12803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12804$as_echo "$ac_cv_search_crypt" >&6; }
12805ac_res=$ac_cv_search_crypt
12806if test "$ac_res" != no; then :
12807 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12808
12809fi
12810
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12812$as_echo_n "checking for library containing crypt_r... " >&6; }
12813if ${ac_cv_search_crypt_r+:} false; then :
12814 $as_echo_n "(cached) " >&6
12815else
12816 ac_func_search_save_LIBS=$LIBS
12817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12818/* end confdefs.h. */
12819
12820/* Override any GCC internal prototype to avoid an error.
12821 Use char because int might match the return type of a GCC
12822 builtin and then its argument prototype would still apply. */
12823#ifdef __cplusplus
12824extern "C"
12825#endif
12826char crypt_r ();
12827int
12828main ()
12829{
12830return crypt_r ();
12831 ;
12832 return 0;
12833}
12834_ACEOF
12835for ac_lib in '' crypt; do
12836 if test -z "$ac_lib"; then
12837 ac_res="none required"
12838 else
12839 ac_res=-l$ac_lib
12840 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12841 fi
12842 if ac_fn_c_try_link "$LINENO"; then :
12843 ac_cv_search_crypt_r=$ac_res
12844fi
12845rm -f core conftest.err conftest.$ac_objext \
12846 conftest$ac_exeext
12847 if ${ac_cv_search_crypt_r+:} false; then :
12848 break
12849fi
12850done
12851if ${ac_cv_search_crypt_r+:} false; then :
12852
12853else
12854 ac_cv_search_crypt_r=no
12855fi
12856rm conftest.$ac_ext
12857LIBS=$ac_func_search_save_LIBS
12858fi
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12860$as_echo "$ac_cv_search_crypt_r" >&6; }
12861ac_res=$ac_cv_search_crypt_r
12862if test "$ac_res" != no; then :
12863 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12864
12865fi
12866
12867
12868ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12869if test "x$ac_cv_func_crypt_r" = xyes; then :
12870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12871/* end confdefs.h. */
12872
12873#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12874#include <crypt.h>
12875
12876int
12877main ()
12878{
12879
12880struct crypt_data d;
12881char *r = crypt_r("", "", &d);
12882
12883 ;
12884 return 0;
12885}
12886_ACEOF
12887if ac_fn_c_try_compile "$LINENO"; then :
12888
12889$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12890
12891fi
12892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12893
12894fi
12895
12896
Victor Stinnere0be4232011-10-25 13:06:09 +020012897for ac_func in clock_gettime
12898do :
12899 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12900if test "x$ac_cv_func_clock_gettime" = xyes; then :
12901 cat >>confdefs.h <<_ACEOF
12902#define HAVE_CLOCK_GETTIME 1
12903_ACEOF
12904
12905else
12906
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12908$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12909if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12910 $as_echo_n "(cached) " >&6
12911else
12912 ac_check_lib_save_LIBS=$LIBS
12913LIBS="-lrt $LIBS"
12914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12915/* end confdefs.h. */
12916
12917/* Override any GCC internal prototype to avoid an error.
12918 Use char because int might match the return type of a GCC
12919 builtin and then its argument prototype would still apply. */
12920#ifdef __cplusplus
12921extern "C"
12922#endif
12923char clock_gettime ();
12924int
12925main ()
12926{
12927return clock_gettime ();
12928 ;
12929 return 0;
12930}
12931_ACEOF
12932if ac_fn_c_try_link "$LINENO"; then :
12933 ac_cv_lib_rt_clock_gettime=yes
12934else
12935 ac_cv_lib_rt_clock_gettime=no
12936fi
12937rm -f core conftest.err conftest.$ac_objext \
12938 conftest$ac_exeext conftest.$ac_ext
12939LIBS=$ac_check_lib_save_LIBS
12940fi
12941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12942$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12943if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12944
Victor Stinner7efb8332014-08-29 15:41:08 +020012945 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012946 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12947
12948
12949$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12950
12951
12952fi
12953
12954
12955fi
12956done
12957
12958
12959for ac_func in clock_getres
12960do :
12961 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12962if test "x$ac_cv_func_clock_getres" = xyes; then :
12963 cat >>confdefs.h <<_ACEOF
12964#define HAVE_CLOCK_GETRES 1
12965_ACEOF
12966
12967else
12968
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12970$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12971if ${ac_cv_lib_rt_clock_getres+:} false; then :
12972 $as_echo_n "(cached) " >&6
12973else
12974 ac_check_lib_save_LIBS=$LIBS
12975LIBS="-lrt $LIBS"
12976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977/* end confdefs.h. */
12978
12979/* Override any GCC internal prototype to avoid an error.
12980 Use char because int might match the return type of a GCC
12981 builtin and then its argument prototype would still apply. */
12982#ifdef __cplusplus
12983extern "C"
12984#endif
12985char clock_getres ();
12986int
12987main ()
12988{
12989return clock_getres ();
12990 ;
12991 return 0;
12992}
12993_ACEOF
12994if ac_fn_c_try_link "$LINENO"; then :
12995 ac_cv_lib_rt_clock_getres=yes
12996else
12997 ac_cv_lib_rt_clock_getres=no
12998fi
12999rm -f core conftest.err conftest.$ac_objext \
13000 conftest$ac_exeext conftest.$ac_ext
13001LIBS=$ac_check_lib_save_LIBS
13002fi
13003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13004$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13005if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13006
13007 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13008
13009
13010fi
13011
13012
13013fi
13014done
13015
13016
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013017for ac_func in clock_settime
13018do :
13019 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13020if test "x$ac_cv_func_clock_settime" = xyes; then :
13021 cat >>confdefs.h <<_ACEOF
13022#define HAVE_CLOCK_SETTIME 1
13023_ACEOF
13024
13025else
13026
13027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13028$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13029if ${ac_cv_lib_rt_clock_settime+:} false; then :
13030 $as_echo_n "(cached) " >&6
13031else
13032 ac_check_lib_save_LIBS=$LIBS
13033LIBS="-lrt $LIBS"
13034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13035/* end confdefs.h. */
13036
13037/* Override any GCC internal prototype to avoid an error.
13038 Use char because int might match the return type of a GCC
13039 builtin and then its argument prototype would still apply. */
13040#ifdef __cplusplus
13041extern "C"
13042#endif
13043char clock_settime ();
13044int
13045main ()
13046{
13047return clock_settime ();
13048 ;
13049 return 0;
13050}
13051_ACEOF
13052if ac_fn_c_try_link "$LINENO"; then :
13053 ac_cv_lib_rt_clock_settime=yes
13054else
13055 ac_cv_lib_rt_clock_settime=no
13056fi
13057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
13059LIBS=$ac_check_lib_save_LIBS
13060fi
13061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13062$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13063if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13064
13065 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13066
13067
13068fi
13069
13070
13071fi
13072done
13073
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13076$as_echo_n "checking for major... " >&6; }
13077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013078/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013079
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013080#if defined(MAJOR_IN_MKDEV)
13081#include <sys/mkdev.h>
13082#elif defined(MAJOR_IN_SYSMACROS)
13083#include <sys/sysmacros.h>
13084#else
13085#include <sys/types.h>
13086#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013087
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013088int
13089main ()
13090{
13091
13092 makedev(major(0),minor(0));
13093
13094 ;
13095 return 0;
13096}
13097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013098if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013099
13100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13104$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013105
13106else
Skip Montanaro6dead952003-09-25 14:50:04 +000013107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13109$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013110
13111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013112rm -f core conftest.err conftest.$ac_objext \
13113 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013114
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013115# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013116# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13118$as_echo_n "checking for getaddrinfo... " >&6; }
13119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013120/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013121
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013122#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013123#include <sys/socket.h>
13124#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013125#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126
Martin v. Löwis11437992002-04-12 09:54:03 +000013127int
13128main ()
13129{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013130getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 ;
13132 return 0;
13133}
13134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013135if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136 have_getaddrinfo=yes
13137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013140rm -f core conftest.err conftest.$ac_objext \
13141 conftest$ac_exeext conftest.$ac_ext
13142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13143$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013144if test $have_getaddrinfo = yes
13145then
Matthias Kloseb9621712010-04-24 17:59:49 +000013146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13147$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013148 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013152
13153if test "${enable_ipv6+set}" = set; then
13154 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13155else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013157fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158else
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013160/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013161
Stefan Krah19c21392012-11-22 23:47:32 +010013162#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013163#include <sys/types.h>
13164#include <netdb.h>
13165#include <string.h>
13166#include <sys/socket.h>
13167#include <netinet/in.h>
13168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170{
13171 int passive, gaierr, inet4 = 0, inet6 = 0;
13172 struct addrinfo hints, *ai, *aitop;
13173 char straddr[INET6_ADDRSTRLEN], strport[16];
13174
13175 for (passive = 0; passive <= 1; passive++) {
13176 memset(&hints, 0, sizeof(hints));
13177 hints.ai_family = AF_UNSPEC;
13178 hints.ai_flags = passive ? AI_PASSIVE : 0;
13179 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013180 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13182 (void)gai_strerror(gaierr);
13183 goto bad;
13184 }
13185 for (ai = aitop; ai; ai = ai->ai_next) {
13186 if (ai->ai_addr == NULL ||
13187 ai->ai_addrlen == 0 ||
13188 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13189 straddr, sizeof(straddr), strport, sizeof(strport),
13190 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13191 goto bad;
13192 }
13193 switch (ai->ai_family) {
13194 case AF_INET:
13195 if (strcmp(strport, "54321") != 0) {
13196 goto bad;
13197 }
13198 if (passive) {
13199 if (strcmp(straddr, "0.0.0.0") != 0) {
13200 goto bad;
13201 }
13202 } else {
13203 if (strcmp(straddr, "127.0.0.1") != 0) {
13204 goto bad;
13205 }
13206 }
13207 inet4++;
13208 break;
13209 case AF_INET6:
13210 if (strcmp(strport, "54321") != 0) {
13211 goto bad;
13212 }
13213 if (passive) {
13214 if (strcmp(straddr, "::") != 0) {
13215 goto bad;
13216 }
13217 } else {
13218 if (strcmp(straddr, "::1") != 0) {
13219 goto bad;
13220 }
13221 }
13222 inet6++;
13223 break;
13224 case AF_UNSPEC:
13225 goto bad;
13226 break;
13227 default:
13228 /* another family support? */
13229 break;
13230 }
13231 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013232 freeaddrinfo(aitop);
13233 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234 }
13235
13236 if (!(inet4 == 0 || inet4 == 2))
13237 goto bad;
13238 if (!(inet6 == 0 || inet6 == 2))
13239 goto bad;
13240
13241 if (aitop)
13242 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013243 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244
13245 bad:
13246 if (aitop)
13247 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249}
13250
Martin v. Löwis11437992002-04-12 09:54:03 +000013251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013252if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254else
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013262
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13266$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13267
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013268if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269then
13270 if test $ipv6 = yes
13271 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272 echo 'Fatal: You must get working getaddrinfo() function.'
13273 echo ' or you can specify "--disable-ipv6"'.
13274 exit 1
13275 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013276else
Martin v. Löwis11437992002-04-12 09:54:03 +000013277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013279
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013280fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013281
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013282for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013283do :
13284 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013285if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013287#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013288_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013290fi
13291done
13292
Michael W. Hudson54241132001-12-07 15:38:26 +000013293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13296$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013301/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302#include <sys/types.h>
13303#include <sys/time.h>
13304#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Martin v. Löwis11437992002-04-12 09:54:03 +000013306int
13307main ()
13308{
13309if ((struct tm *) 0)
13310return 0;
13311 ;
13312 return 0;
13313}
13314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13323$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013324if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327
13328fi
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13331$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013336/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013337#include <sys/types.h>
13338#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340int
13341main ()
13342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343struct tm tm;
13344 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ;
13347 return 0;
13348}
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351 ac_cv_struct_tm=time.h
13352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13358$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013359if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362
13363fi
13364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365ac_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 +000013366#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
Matthias Kloseb9621712010-04-24 17:59:49 +000013368"
Victor Stinnere0be4232011-10-25 13:06:09 +020013369if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013370
13371cat >>confdefs.h <<_ACEOF
13372#define HAVE_STRUCT_TM_TM_ZONE 1
13373_ACEOF
13374
13375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13384"
Victor Stinnere0be4232011-10-25 13:06:09 +020013385if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387else
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389fi
13390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013392#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393_ACEOF
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13396$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013402#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403#if !HAVE_DECL_TZNAME
13404extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407int
13408main ()
13409{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013416 ac_cv_var_tzname=yes
13417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013420rm -f core conftest.err conftest.$ac_objext \
13421 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13424$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013425 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429 fi
13430fi
13431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432ac_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 +020013433if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
13435cat >>confdefs.h <<_ACEOF
13436#define HAVE_STRUCT_STAT_ST_RDEV 1
13437_ACEOF
13438
13439
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013440fi
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442ac_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 +020013443if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445cat >>confdefs.h <<_ACEOF
13446#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13447_ACEOF
13448
13449
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013450fi
13451
Matthias Kloseb9621712010-04-24 17:59:49 +000013452ac_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 +020013453if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013454
13455cat >>confdefs.h <<_ACEOF
13456#define HAVE_STRUCT_STAT_ST_FLAGS 1
13457_ACEOF
13458
13459
13460fi
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462ac_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 +020013463if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013464
13465cat >>confdefs.h <<_ACEOF
13466#define HAVE_STRUCT_STAT_ST_GEN 1
13467_ACEOF
13468
13469
13470fi
13471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472ac_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 +020013473if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013474
13475cat >>confdefs.h <<_ACEOF
13476#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13477_ACEOF
13478
13479
13480fi
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482ac_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 +020013483if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485cat >>confdefs.h <<_ACEOF
13486#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13487_ACEOF
13488
13489
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013490fi
13491
Stefan Krah267b6392016-04-26 01:09:18 +020013492ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13493 #include <sys/types.h>
13494 #include <pwd.h>
13495
13496"
13497if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13498
13499cat >>confdefs.h <<_ACEOF
13500#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13501_ACEOF
13502
13503
13504fi
13505ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13506 #include <sys/types.h>
13507 #include <pwd.h>
13508
13509"
13510if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13511
13512cat >>confdefs.h <<_ACEOF
13513#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13514_ACEOF
13515
13516
13517fi
13518
Zachary Ware6a6967e2016-10-01 00:47:27 -050013519# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13520ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13521"
13522if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13523
13524cat >>confdefs.h <<_ACEOF
13525#define HAVE_SIGINFO_T_SI_BAND 1
13526_ACEOF
13527
13528
13529fi
13530
Michael W. Hudson54241132001-12-07 15:38:26 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13533$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013534if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536else
Matthias Kloseb159a552010-04-25 21:00:44 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013539/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013540#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013541int
13542main ()
13543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ;
13546 return 0;
13547}
13548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013550 ac_cv_header_time_altzone=yes
13551else
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556fi
13557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13559$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013560if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563
13564fi
13565
Guido van Rossumda88dad1995-01-26 00:46:29 +000013566was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13568$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013570/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013571
13572#include <sys/types.h>
13573#include <sys/select.h>
13574#include <sys/time.h>
13575
Martin v. Löwis11437992002-04-12 09:54:03 +000013576int
13577main ()
13578{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579;
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 ;
13581 return 0;
13582}
13583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013588
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013589 was_it_defined=yes
13590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13594$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13597$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013598if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013602/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013603#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013604int
13605main ()
13606{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013607struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ;
13609 return 0;
13610}
13611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013613 ac_cv_struct_addrinfo=yes
13614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13618fi
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13621$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013622if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013625
13626fi
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13629$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013630if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013634/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635
13636# include <sys/types.h>
13637# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013638int
13639main ()
13640{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 ;
13643 return 0;
13644}
13645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013647 ac_cv_struct_sockaddr_storage=yes
13648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13652fi
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13655$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013656if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013659
13660fi
13661
Christian Heimesdffa3942016-09-05 23:54:41 +020013662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13663$as_echo_n "checking for sockaddr_alg... " >&6; }
13664if ${ac_cv_struct_sockaddr_alg+:} false; then :
13665 $as_echo_n "(cached) " >&6
13666else
13667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13668/* end confdefs.h. */
13669
13670# include <sys/types.h>
13671# include <sys/socket.h>
13672# include <linux/if_alg.h>
13673int
13674main ()
13675{
13676struct sockaddr_alg s
13677 ;
13678 return 0;
13679}
13680_ACEOF
13681if ac_fn_c_try_compile "$LINENO"; then :
13682 ac_cv_struct_sockaddr_alg=yes
13683else
13684 ac_cv_struct_sockaddr_alg=no
13685fi
13686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687fi
13688
13689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13690$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13691if test $ac_cv_struct_sockaddr_alg = yes; then
13692
13693$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13694
13695fi
13696
Guido van Rossum627b2d71993-12-24 10:39:16 +000013697# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13700$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013701if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013706$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013707int
13708main ()
13709{
13710static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013711test_array [0] = 0;
13712return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
13714 ;
13715 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013716}
Martin v. Löwis11437992002-04-12 09:54:03 +000013717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013719 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13726$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729
13730fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13733$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013734if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013738/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739
Martin v. Löwis11437992002-04-12 09:54:03 +000013740int
13741main ()
13742{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013743
Martin v. Löwis11437992002-04-12 09:54:03 +000013744#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013745 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013747 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749 char const *const *pcpcc;
13750 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 /* NEC SVR4.0.2 mips cc rejects this. */
13752 struct point {int x, y;};
13753 static struct point const zero = {0,0};
13754 /* AIX XL C 1.02.0.0 rejects this.
13755 It does not let you subtract one const X* pointer from another in
13756 an arm of an if-expression whose if-part is not a constant
13757 expression */
13758 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013761 ++pcpcc;
13762 ppc = (char**) pcpcc;
13763 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013764 { /* SCO 3.2v4 cc rejects this sort of thing. */
13765 char tx;
13766 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 }
13772 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13773 int x[] = {25, 17};
13774 const int *foo = &x[0];
13775 ++foo;
13776 }
13777 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13778 typedef const int *iptr;
13779 iptr p = 0;
13780 ++p;
13781 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013782 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013784 struct s { int j; const int *ap[3]; } bx;
13785 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 }
13787 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13788 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013792#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ;
13795 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796}
Martin v. Löwis11437992002-04-12 09:54:03 +000013797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013798if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799 ac_cv_c_const=yes
13800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13806$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013807if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810
13811fi
13812
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Guido van Rossumda88dad1995-01-26 00:46:29 +000013814works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13816$as_echo_n "checking for working signed char... " >&6; }
13817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013818/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013819
Martin v. Löwis11437992002-04-12 09:54:03 +000013820int
13821main ()
13822{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013823signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 ;
13825 return 0;
13826}
13827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013829 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013830else
Skip Montanaro6dead952003-09-25 14:50:04 +000013831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013833
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013834
Guido van Rossum7f43da71994-08-01 12:15:30 +000013835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13838$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839
Guido van Rossumda88dad1995-01-26 00:46:29 +000013840have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13842$as_echo_n "checking for prototypes... " >&6; }
13843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013844/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013845int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013846int
13847main ()
13848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 ;
13851 return 0;
13852}
13853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Matthias Kloseb159a552010-04-25 21:00:44 +000013858 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13862$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863
Guido van Rossumda88dad1995-01-26 00:46:29 +000013864works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13866$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013868/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013869
13870#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013871int foo(int x, ...) {
13872 va_list va;
13873 va_start(va, x);
13874 va_arg(va, int);
13875 va_arg(va, char *);
13876 va_arg(va, double);
13877 return 0;
13878}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880int
13881main ()
13882{
Guido van Rossum90eea071996-08-30 20:58:57 +000013883return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 ;
13885 return 0;
13886}
13887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013888if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
13890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013893 works=yes
13894
Guido van Rossum627b2d71993-12-24 10:39:16 +000013895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13898$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013899
Martin v. Löwisd6320502004-08-12 13:45:08 +000013900# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13902$as_echo_n "checking for socketpair... " >&6; }
13903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013904/* end confdefs.h. */
13905
13906#include <sys/types.h>
13907#include <sys/socket.h>
13908
13909int
13910main ()
13911{
13912void *x=socketpair
13913 ;
13914 return 0;
13915}
13916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013920
Matthias Kloseb159a552010-04-25 21:00:44 +000013921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013922$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13925$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013926
13927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013929
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013930# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13932$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013934/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935#include <sys/types.h>
13936#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013937int
13938main ()
13939{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013940struct sockaddr x;
13941x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 ;
13943 return 0;
13944}
13945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013946if ac_fn_c_try_compile "$LINENO"; then :
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13948$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013951
13952else
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13954$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013955
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013958
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013959# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
13961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013963if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13968$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013969 OLD_CFLAGS=$CFLAGS
13970 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013972/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013973
13974# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Martin v. Löwis11437992002-04-12 09:54:03 +000013976int
13977main ()
13978{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979
13980 char *name;
13981 struct hostent *he, *res;
13982 char buffer[2048];
13983 int buflen = 2048;
13984 int h_errnop;
13985
13986 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
13988 ;
13989 return 0;
13990}
13991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013992if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013995
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14000$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014002else
Skip Montanaro6dead952003-09-25 14:50:04 +000014003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14005$as_echo "no" >&6; }
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14007$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014009/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013int
14014main ()
14015{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016
14017 char *name;
14018 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014019 char buffer[2048];
14020 int buflen = 2048;
14021 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014022
Matthias Kloseb159a552010-04-25 21:00:44 +000014023 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
14025 ;
14026 return 0;
14027}
14028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
Matthias Kloseb159a552010-04-25 21:00:44 +000014034$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14037$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039else
Skip Montanaro6dead952003-09-25 14:50:04 +000014040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14042$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14044$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14046/* end confdefs.h. */
14047
14048# include <netdb.h>
14049
14050int
14051main ()
14052{
14053
14054 char *name;
14055 struct hostent *he;
14056 struct hostent_data data;
14057
14058 (void) gethostbyname_r(name, he, &data);
14059
14060 ;
14061 return 0;
14062}
14063_ACEOF
14064if ac_fn_c_try_compile "$LINENO"; then :
14065
14066 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14067
14068
14069$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14070
14071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14072$as_echo "yes" >&6; }
14073
14074else
14075
14076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14077$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014084
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087 CFLAGS=$OLD_CFLAGS
14088
14089else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 for ac_func in gethostbyname
14092do :
14093 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014094if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014096#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014097_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014098
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014099fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014100done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101
Michael W. Hudson54241132001-12-07 15:38:26 +000014102
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014103fi
14104
Michael W. Hudson54241132001-12-07 15:38:26 +000014105
14106
14107
14108
14109
14110
Guido van Rossum627b2d71993-12-24 10:39:16 +000014111# checks for system services
14112# (none yet)
14113
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014115ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014116if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014117
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14120$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014121if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123else
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014125LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129/* Override any GCC internal prototype to avoid an error.
14130 Use char because int might match the return type of a GCC
14131 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014132#ifdef __cplusplus
14133extern "C"
14134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014135char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014136int
14137main ()
14138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 ;
14141 return 0;
14142}
14143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014144if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014146else
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014149rm -f core conftest.err conftest.$ac_objext \
14150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014151LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14154$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 cat >>confdefs.h <<_ACEOF
14157#define HAVE_LIBIEEE 1
14158_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014159
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014160 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161
Guido van Rossum627b2d71993-12-24 10:39:16 +000014162fi
14163
Michael W. Hudson54241132001-12-07 15:38:26 +000014164
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165fi
14166
Michael W. Hudson54241132001-12-07 15:38:26 +000014167
Guido van Rossum7f43da71994-08-01 12:15:30 +000014168# check for --with-libm=...
14169
Guido van Rossum563e7081996-09-10 18:20:48 +000014170case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014171Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014172*) LIBM=-lm
14173esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14175$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014178if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014180if test "$withval" = no
14181then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14183$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014184elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014185then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14187$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014188else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014189fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014190else
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14192$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193fi
14194
Guido van Rossum7f43da71994-08-01 12:15:30 +000014195
14196# check for --with-libc=...
14197
Matthias Kloseb9621712010-04-24 17:59:49 +000014198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14199$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014202if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014204if test "$withval" = no
14205then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14207$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014208elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014209then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14211$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014212else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014213fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14216$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217fi
14218
Guido van Rossum7f43da71994-08-01 12:15:30 +000014219
Stefan Krah1919b7e2012-03-21 18:25:23 +010014220# **************************************
14221# * Check for gcc x64 inline assembler *
14222# **************************************
14223
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14225$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14227/* end confdefs.h. */
14228
14229int
14230main ()
14231{
14232
14233 __asm__ __volatile__ ("movq %rcx, %rax");
14234
14235 ;
14236 return 0;
14237}
14238_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014239if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014240 have_gcc_asm_for_x64=yes
14241else
14242 have_gcc_asm_for_x64=no
14243fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014244rm -f core conftest.err conftest.$ac_objext \
14245 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14247$as_echo "$have_gcc_asm_for_x64" >&6; }
14248if test "$have_gcc_asm_for_x64" = yes
14249then
14250
14251$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14252
14253fi
14254
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014255# **************************************************
14256# * Check for various properties of floating point *
14257# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014258
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14260$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14261if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014263else
14264
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014265
14266ax_cv_c_float_words_bigendian=unknown
14267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014268/* end confdefs.h. */
14269
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270
14271double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14272
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014273
14274_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014275if ac_fn_c_try_compile "$LINENO"; then :
14276
14277
14278if grep noonsees conftest.$ac_objext >/dev/null ; then
14279 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014280fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014281if grep seesnoon conftest.$ac_objext >/dev/null ; then
14282 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14283 ax_cv_c_float_words_bigendian=no
14284 else
14285 ax_cv_c_float_words_bigendian=unknown
14286 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014287fi
14288
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014289
14290fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014292fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14294$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014295
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014296case $ax_cv_c_float_words_bigendian in
14297 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014299$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14300 ;;
14301 no)
14302 ;;
14303 *)
14304 as_fn_error $? "
14305
14306Unknown float word ordering. You need to manually preset
14307ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14308
14309 " "$LINENO" 5 ;;
14310esac
14311
14312
14313if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014314then
14315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014317
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014318elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014319then
14320
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014321$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14322
14323else
14324 # Some ARM platforms use a mixed-endian representation for doubles.
14325 # While Python doesn't currently have full support for these platforms
14326 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14327 # conversions work.
14328 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14329 # or little, then it must be this?
14330
Matthias Kloseb9621712010-04-24 17:59:49 +000014331$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014332
14333fi
14334
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014335# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014336# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014337# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014338# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014339# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014340# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014341
14342# This inline assembler syntax may also work for suncc and icc,
14343# so we try it on all platforms.
14344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14346$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014348/* end confdefs.h. */
14349
14350int
14351main ()
14352{
14353
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014354 unsigned short cw;
14355 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14356 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014357
14358 ;
14359 return 0;
14360}
14361_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014362if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014363 have_gcc_asm_for_x87=yes
14364else
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014366fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014367rm -f core conftest.err conftest.$ac_objext \
14368 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14370$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014371if test "$have_gcc_asm_for_x87" = yes
14372then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014375
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014376fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14379$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14381/* end confdefs.h. */
14382
14383int
14384main ()
14385{
14386
14387 unsigned int fpcr;
14388 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14389 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14390
14391 ;
14392 return 0;
14393}
14394_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014395if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014396 have_gcc_asm_for_mc68881=yes
14397else
14398 have_gcc_asm_for_mc68881=no
14399fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014400rm -f core conftest.err conftest.$ac_objext \
14401 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14403$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14404if test "$have_gcc_asm_for_mc68881" = yes
14405then
14406
14407$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14408
14409fi
14410
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014411# Detect whether system arithmetic is subject to x87-style double
14412# rounding issues. The result of this test has little meaning on non
14413# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14414# mode is round-to-nearest and double rounding issues are present, and
14415# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14417$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014418# $BASECFLAGS may affect the result
14419ac_save_cc="$CC"
14420CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014421if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014422 ac_cv_x87_double_rounding=no
14423else
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014425/* end confdefs.h. */
14426
14427#include <stdlib.h>
14428#include <math.h>
14429int main() {
14430 volatile double x, y, z;
14431 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14432 x = 0.99999999999999989; /* 1-2**-53 */
14433 y = 1./x;
14434 if (y != 1.)
14435 exit(0);
14436 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14437 x = 1e16;
14438 y = 2.99999;
14439 z = x + y;
14440 if (z != 1e16+4.)
14441 exit(0);
14442 /* both tests show evidence of double rounding */
14443 exit(1);
14444}
14445
14446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014447if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014448 ac_cv_x87_double_rounding=no
14449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014454fi
14455
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014456CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14458$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014459if test "$ac_cv_x87_double_rounding" = yes
14460then
14461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014463
14464fi
14465
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014466# ************************************
14467# * Check for mathematical functions *
14468# ************************************
14469
14470LIBS_SAVE=$LIBS
14471LIBS="$LIBS $LIBM"
14472
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014473for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14474do :
14475 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14476ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014477if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014478 cat >>confdefs.h <<_ACEOF
14479#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14480_ACEOF
14481
14482fi
14483done
14484
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014485for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014486do :
14487 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14488ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014489if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014490 cat >>confdefs.h <<_ACEOF
14491#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14492_ACEOF
14493
14494fi
14495done
14496
14497ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14498"
Victor Stinnere0be4232011-10-25 13:06:09 +020014499if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014500 ac_have_decl=1
14501else
14502 ac_have_decl=0
14503fi
14504
14505cat >>confdefs.h <<_ACEOF
14506#define HAVE_DECL_ISINF $ac_have_decl
14507_ACEOF
14508ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14509"
Victor Stinnere0be4232011-10-25 13:06:09 +020014510if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014511 ac_have_decl=1
14512else
14513 ac_have_decl=0
14514fi
14515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_DECL_ISNAN $ac_have_decl
14518_ACEOF
14519ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14520"
Victor Stinnere0be4232011-10-25 13:06:09 +020014521if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014522 ac_have_decl=1
14523else
14524 ac_have_decl=0
14525fi
14526
14527cat >>confdefs.h <<_ACEOF
14528#define HAVE_DECL_ISFINITE $ac_have_decl
14529_ACEOF
14530
14531
Mark Dickinsona614f042009-11-28 12:48:43 +000014532# For multiprocessing module, check that sem_open
14533# actually works. For FreeBSD versions <= 7.2,
14534# the kernel module that provides POSIX semaphores
14535# isn't loaded by default, so an attempt to call
14536# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14538$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014539if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014541else
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014543 ac_cv_posix_semaphores_enabled=yes
14544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014546/* end confdefs.h. */
14547
14548#include <unistd.h>
14549#include <fcntl.h>
14550#include <stdio.h>
14551#include <semaphore.h>
14552#include <sys/stat.h>
14553
14554int main(void) {
14555 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14556 if (a == SEM_FAILED) {
14557 perror("sem_open");
14558 return 1;
14559 }
14560 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014561 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014562 return 0;
14563}
14564
14565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014566if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014567 ac_cv_posix_semaphores_enabled=yes
14568else
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014573fi
14574
14575
Mark Dickinsona614f042009-11-28 12:48:43 +000014576fi
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14579$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014580if test $ac_cv_posix_semaphores_enabled = no
14581then
14582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014584
14585fi
14586
Mark Dickinson10683072009-04-18 21:18:19 +000014587# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14589$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014590if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014592else
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014594 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014597/* end confdefs.h. */
14598
14599#include <unistd.h>
14600#include <fcntl.h>
14601#include <stdio.h>
14602#include <semaphore.h>
14603#include <sys/stat.h>
14604
14605int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014606 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014607 int count;
14608 int res;
14609 if(a==SEM_FAILED){
14610 perror("sem_open");
14611 return 1;
14612
14613 }
14614 res = sem_getvalue(a, &count);
14615 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014616 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014617 return res==-1 ? 1 : 0;
14618}
14619
Mark Dickinson10683072009-04-18 21:18:19 +000014620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014621if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014622 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014623else
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014625fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014628fi
14629
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014630
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014631fi
14632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14634$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014635if test $ac_cv_broken_sem_getvalue = yes
14636then
14637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014639
14640fi
14641
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014642ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14643"
14644if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14645 ac_have_decl=1
14646else
14647 ac_have_decl=0
14648fi
14649
14650cat >>confdefs.h <<_ACEOF
14651#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14652_ACEOF
14653ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14654"
14655if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14656 ac_have_decl=1
14657else
14658 ac_have_decl=0
14659fi
14660
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_DECL_RTLD_NOW $ac_have_decl
14663_ACEOF
14664ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14665"
14666if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14667 ac_have_decl=1
14668else
14669 ac_have_decl=0
14670fi
14671
14672cat >>confdefs.h <<_ACEOF
14673#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14674_ACEOF
14675ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14676"
14677if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14678 ac_have_decl=1
14679else
14680 ac_have_decl=0
14681fi
14682
14683cat >>confdefs.h <<_ACEOF
14684#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14685_ACEOF
14686ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14687"
14688if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14689 ac_have_decl=1
14690else
14691 ac_have_decl=0
14692fi
14693
14694cat >>confdefs.h <<_ACEOF
14695#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14696_ACEOF
14697ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14698"
14699if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14700 ac_have_decl=1
14701else
14702 ac_have_decl=0
14703fi
14704
14705cat >>confdefs.h <<_ACEOF
14706#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14707_ACEOF
14708ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14709"
14710if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14711 ac_have_decl=1
14712else
14713 ac_have_decl=0
14714fi
14715
14716cat >>confdefs.h <<_ACEOF
14717#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14718_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014719ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14720"
14721if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14722 ac_have_decl=1
14723else
14724 ac_have_decl=0
14725fi
14726
14727cat >>confdefs.h <<_ACEOF
14728#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14729_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014730
14731
Mark Dickinsonbd792642009-03-18 20:06:12 +000014732# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14734$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014735# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014736if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014737 enableval=$enable_big_digits; case $enable_big_digits in
14738yes)
14739 enable_big_digits=30 ;;
14740no)
14741 enable_big_digits=15 ;;
1474215|30)
14743 ;;
14744*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014745 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 +000014746esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14748$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014749
14750cat >>confdefs.h <<_ACEOF
14751#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14752_ACEOF
14753
14754
14755else
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14757$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014758fi
14759
14760
Guido van Rossumef2255b2000-03-10 22:30:29 +000014761# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014762ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014763if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014764
14765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014767
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014768 wchar_h="yes"
14769
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770else
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014772
14773fi
14774
Michael W. Hudson54241132001-12-07 15:38:26 +000014775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014777# determine wchar_t size
14778if test "$wchar_h" = yes
14779then
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14783# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14785$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014786if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014788else
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14790"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 if test "$ac_cv_type_wchar_t" = yes; then
14794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014796as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014797See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798 else
14799 ac_cv_sizeof_wchar_t=0
14800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014802
Martin v. Löwis11437992002-04-12 09:54:03 +000014803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14805$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806
14807
14808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014810#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014811_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014812
Michael W. Hudson54241132001-12-07 15:38:26 +000014813
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014814fi
14815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14817$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014818have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014820/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014821
14822#include <tcl.h>
14823#if TCL_UTF_MAX != 6
14824# error "NOT UCS4_TCL"
14825#endif
14826int
14827main ()
14828{
14829
14830 ;
14831 return 0;
14832}
14833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014835
14836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014838
14839 have_ucs4_tcl=yes
14840
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14844$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014845
Skip Montanaro6dead952003-09-25 14:50:04 +000014846# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014847if test "$wchar_h" = yes
14848then
14849 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14851$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014852 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014854else
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014857 ac_cv_wchar_t_signed=yes
14858else
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014860/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014861
14862 #include <wchar.h>
14863 int main()
14864 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014865 /* Success: exit code 0 */
14866 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014867 }
14868
14869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014870if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014871 ac_cv_wchar_t_signed=yes
14872else
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14876 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014877fi
14878
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014879fi
14880
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14882$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883fi
14884
Michael Osipov3738fad2018-08-24 18:17:19 +020014885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14886$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014887# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014888if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014889 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014890then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014893
Michael Osipov3738fad2018-08-24 18:17:19 +020014894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14895$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014896else
Michael Osipov3738fad2018-08-24 18:17:19 +020014897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14898$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014899fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014900
14901# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14903$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014904if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014906else
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 ac_cv_c_bigendian=unknown
14908 # See if we're dealing with a universal compiler.
14909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910/* end confdefs.h. */
14911#ifndef __APPLE_CC__
14912 not a universal capable compiler
14913 #endif
14914 typedef int dummy;
14915
Skip Montanaro6dead952003-09-25 14:50:04 +000014916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014917if ac_fn_c_try_compile "$LINENO"; then :
14918
14919 # Check for potential -arch flags. It is not universal unless
14920 # there are at least two -arch flags with different values.
14921 ac_arch=
14922 ac_prev=
14923 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14924 if test -n "$ac_prev"; then
14925 case $ac_word in
14926 i?86 | x86_64 | ppc | ppc64)
14927 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14928 ac_arch=$ac_word
14929 else
14930 ac_cv_c_bigendian=universal
14931 break
14932 fi
14933 ;;
14934 esac
14935 ac_prev=
14936 elif test "x$ac_word" = "x-arch"; then
14937 ac_prev=arch
14938 fi
14939 done
14940fi
14941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14942 if test $ac_cv_c_bigendian = unknown; then
14943 # See if sys/param.h defines the BYTE_ORDER macro.
14944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014946#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014948
Martin v. Löwis11437992002-04-12 09:54:03 +000014949int
14950main ()
14951{
Matthias Kloseb9621712010-04-24 17:59:49 +000014952#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14953 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14954 && LITTLE_ENDIAN)
14955 bogus endian macros
14956 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014957
14958 ;
14959 return 0;
14960}
14961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014962if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014963 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014965/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014966#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014968
Martin v. Löwis11437992002-04-12 09:54:03 +000014969int
14970main ()
14971{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014972#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 not big endian
14974 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014975
14976 ;
14977 return 0;
14978}
14979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014980if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014981 ac_cv_c_bigendian=yes
14982else
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014986fi
14987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14988 fi
14989 if test $ac_cv_c_bigendian = unknown; then
14990 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014992/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014993#include <limits.h>
14994
Martin v. Löwis11437992002-04-12 09:54:03 +000014995int
14996main ()
14997{
Matthias Kloseb9621712010-04-24 17:59:49 +000014998#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14999 bogus endian macros
15000 #endif
15001
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ;
15003 return 0;
15004}
15005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015006if ac_fn_c_try_compile "$LINENO"; then :
15007 # It does; now see whether it defined to _BIG_ENDIAN or not.
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009/* end confdefs.h. */
15010#include <limits.h>
15011
15012int
15013main ()
15014{
15015#ifndef _BIG_ENDIAN
15016 not big endian
15017 #endif
15018
15019 ;
15020 return 0;
15021}
15022_ACEOF
15023if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15029fi
15030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15031 fi
15032 if test $ac_cv_c_bigendian = unknown; then
15033 # Compile a test program.
15034 if test "$cross_compiling" = yes; then :
15035 # Try to guess by grepping values from an object file.
15036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15037/* end confdefs.h. */
15038short int ascii_mm[] =
15039 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15040 short int ascii_ii[] =
15041 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15042 int use_ascii (int i) {
15043 return ascii_mm[i] + ascii_ii[i];
15044 }
15045 short int ebcdic_ii[] =
15046 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15047 short int ebcdic_mm[] =
15048 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15049 int use_ebcdic (int i) {
15050 return ebcdic_mm[i] + ebcdic_ii[i];
15051 }
15052 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053
Matthias Kloseb9621712010-04-24 17:59:49 +000015054int
15055main ()
15056{
15057return use_ascii (foo) == use_ebcdic (foo);
15058 ;
15059 return 0;
15060}
15061_ACEOF
15062if ac_fn_c_try_compile "$LINENO"; then :
15063 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15064 ac_cv_c_bigendian=yes
15065 fi
15066 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15067 if test "$ac_cv_c_bigendian" = unknown; then
15068 ac_cv_c_bigendian=no
15069 else
15070 # finding both strings is unlikely to happen, but who knows?
15071 ac_cv_c_bigendian=unknown
15072 fi
15073 fi
15074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015076else
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015078/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015080int
15081main ()
15082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 /* Are we little or big endian? From Harbison&Steele. */
15085 union
15086 {
15087 long int l;
15088 char c[sizeof (long int)];
15089 } u;
15090 u.l = 1;
15091 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092
15093 ;
15094 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015095}
Martin v. Löwis11437992002-04-12 09:54:03 +000015096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015097if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098 ac_cv_c_bigendian=no
15099else
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15109$as_echo "$ac_cv_c_bigendian" >&6; }
15110 case $ac_cv_c_bigendian in #(
15111 yes)
15112 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15113;; #(
15114 no)
15115 ;; #(
15116 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015117
Matthias Kloseb9621712010-04-24 17:59:49 +000015118$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015119
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 ;; #(
15121 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015122 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015123 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125
Michael W. Hudson54241132001-12-07 15:38:26 +000015126
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015127# ABI version string for Python extension modules. This appears between the
15128# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15129# from the following attributes which affect the ABI of this Python build (in
15130# this order):
15131#
15132# * The Python implementation (always 'cpython-' for us)
15133# * The major and minor version numbers
15134# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015135#
15136# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015137# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15138# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015139#
15140# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15141# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015142
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15144$as_echo_n "checking ABIFLAGS... " >&6; }
15145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15146$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15148$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015149SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15151$as_echo "$SOABI" >&6; }
15152
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015153# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15154if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015155 # Similar to SOABI but remove "d" flag from ABIFLAGS
15156
15157 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15158
15159cat >>confdefs.h <<_ACEOF
15160#define ALT_SOABI "${ALT_SOABI}"
15161_ACEOF
15162
15163fi
15164
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015165
15166case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015167 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015168 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15169 *)
15170 EXT_SUFFIX=${SHLIB_SUFFIX};;
15171esac
15172
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15174$as_echo_n "checking LDVERSION... " >&6; }
15175LDVERSION='$(VERSION)$(ABIFLAGS)'
15176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15177$as_echo "$LDVERSION" >&6; }
15178
E. M. Brayc994c8f2019-05-24 17:33:47 +020015179# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015180
E. M. Brayb1fc4172019-05-24 18:39:39 +020015181if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015182 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015183else
15184 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015185fi
15186
doko@python.org87421192013-01-26 11:39:31 +010015187
doko@ubuntu.com55532312016-06-14 08:55:19 +020015188if test x$PLATFORM_TRIPLET = x; then
15189 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15190else
15191 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15192fi
doko@python.org87421192013-01-26 11:39:31 +010015193
15194
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015195# Check whether right shifting a negative integer extends the sign bit
15196# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15198$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015199if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015200 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015201else
Martin v. Löwis11437992002-04-12 09:54:03 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015204 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015205else
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015207/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015208
15209int main()
15210{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015211 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015212}
15213
Martin v. Löwis11437992002-04-12 09:54:03 +000015214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015215if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015216 ac_cv_rshift_extends_sign=yes
15217else
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015222fi
15223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224fi
15225
Matthias Kloseb9621712010-04-24 17:59:49 +000015226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15227$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015228if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015229then
Martin v. Löwis11437992002-04-12 09:54:03 +000015230
Matthias Kloseb9621712010-04-24 17:59:49 +000015231$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015232
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015233fi
15234
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015235# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15237$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015238if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015240else
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015243/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015244#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015245int
15246main ()
15247{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015248
15249 FILE *f = fopen("/dev/null", "r");
15250 flockfile(f);
15251 getc_unlocked(f);
15252 funlockfile(f);
15253
Martin v. Löwis11437992002-04-12 09:54:03 +000015254 ;
15255 return 0;
15256}
15257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015258if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015259 ac_cv_have_getc_unlocked=yes
15260else
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 ac_cv_have_getc_unlocked=no
15262fi
15263rm -f core conftest.err conftest.$ac_objext \
15264 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15268$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015269if test "$ac_cv_have_getc_unlocked" = yes
15270then
Martin v. Löwis11437992002-04-12 09:54:03 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015273
15274fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015275
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015276# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015277# save the value of LIBS so we don't actually link Python with readline
15278LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015279
Gregory P. Smith18820942008-09-07 06:24:49 +000015280# On some systems we need to link readline to a termcap compatible
15281# library. NOTE: Keep the precedence of listed libraries synchronised
15282# with setup.py.
15283py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15285$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015286for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015287 if test -z "$py_libtermcap"; then
15288 READLINE_LIBS="-lreadline"
15289 else
15290 READLINE_LIBS="-lreadline -l$py_libtermcap"
15291 fi
15292 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015294/* end confdefs.h. */
15295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296/* Override any GCC internal prototype to avoid an error.
15297 Use char because int might match the return type of a GCC
15298 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015299#ifdef __cplusplus
15300extern "C"
15301#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015302char readline ();
15303int
15304main ()
15305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015307 ;
15308 return 0;
15309}
15310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015311if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015312 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015314rm -f core conftest.err conftest.$ac_objext \
15315 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015316 if test $py_cv_lib_readline = yes; then
15317 break
15318 fi
15319done
15320# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15321#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015322if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15324$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015325else
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15327$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015328
Matthias Kloseb9621712010-04-24 17:59:49 +000015329$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015330
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015331fi
15332
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015333# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015335/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015336#include <readline/readline.h>
15337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015338if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015339 have_readline=yes
15340else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015341 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015342
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015343fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015344rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015345if test $have_readline = yes
15346then
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015348/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015349#include <readline/readline.h>
15350
15351_ACEOF
15352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015356
15357fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015358rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015361/* end confdefs.h. */
15362#include <readline/readline.h>
15363
15364_ACEOF
15365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015369
15370fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015371rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015372
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015373fi
15374
Martin v. Löwis0daad592001-09-30 21:09:59 +000015375# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15377$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015378if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015380else
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015382LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386/* Override any GCC internal prototype to avoid an error.
15387 Use char because int might match the return type of a GCC
15388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015389#ifdef __cplusplus
15390extern "C"
15391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015392char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015393int
15394main ()
15395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ;
15398 return 0;
15399}
15400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015403else
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015406rm -f core conftest.err conftest.$ac_objext \
15407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015408LIBS=$ac_check_lib_save_LIBS
15409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15411$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015412if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015413
Matthias Kloseb9621712010-04-24 17:59:49 +000015414$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015415
Martin v. Löwis0daad592001-09-30 21:09:59 +000015416fi
15417
Michael W. Hudson54241132001-12-07 15:38:26 +000015418
Thomas Wouters89d996e2007-09-08 17:39:28 +000015419# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15421$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015422if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015424else
15425 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015426LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015428/* end confdefs.h. */
15429
15430/* Override any GCC internal prototype to avoid an error.
15431 Use char because int might match the return type of a GCC
15432 builtin and then its argument prototype would still apply. */
15433#ifdef __cplusplus
15434extern "C"
15435#endif
15436char rl_completion_display_matches_hook ();
15437int
15438main ()
15439{
15440return rl_completion_display_matches_hook ();
15441 ;
15442 return 0;
15443}
15444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015445if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015446 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15447else
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015450rm -f core conftest.err conftest.$ac_objext \
15451 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015452LIBS=$ac_check_lib_save_LIBS
15453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15455$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015456if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015459
15460fi
15461
15462
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015463# also in 4.0, but not in editline
15464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15465$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15466if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15467 $as_echo_n "(cached) " >&6
15468else
15469 ac_check_lib_save_LIBS=$LIBS
15470LIBS="-lreadline $READLINE_LIBS $LIBS"
15471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15472/* end confdefs.h. */
15473
15474/* Override any GCC internal prototype to avoid an error.
15475 Use char because int might match the return type of a GCC
15476 builtin and then its argument prototype would still apply. */
15477#ifdef __cplusplus
15478extern "C"
15479#endif
15480char rl_resize_terminal ();
15481int
15482main ()
15483{
15484return rl_resize_terminal ();
15485 ;
15486 return 0;
15487}
15488_ACEOF
15489if ac_fn_c_try_link "$LINENO"; then :
15490 ac_cv_lib_readline_rl_resize_terminal=yes
15491else
15492 ac_cv_lib_readline_rl_resize_terminal=no
15493fi
15494rm -f core conftest.err conftest.$ac_objext \
15495 conftest$ac_exeext conftest.$ac_ext
15496LIBS=$ac_check_lib_save_LIBS
15497fi
15498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15499$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15500if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15501
15502$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15503
15504fi
15505
15506
Martin v. Löwis0daad592001-09-30 21:09:59 +000015507# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15509$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015510if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015514LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518/* Override any GCC internal prototype to avoid an error.
15519 Use char because int might match the return type of a GCC
15520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015521#ifdef __cplusplus
15522extern "C"
15523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015524char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015525int
15526main ()
15527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 ;
15530 return 0;
15531}
15532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015535else
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015538rm -f core conftest.err conftest.$ac_objext \
15539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015540LIBS=$ac_check_lib_save_LIBS
15541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15543$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015544if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015547
Guido van Rossum353ae582001-07-10 16:45:32 +000015548fi
15549
Jack Jansendd19cf82001-12-06 22:36:17 +000015550
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015551# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015553/* end confdefs.h. */
15554#include <readline/readline.h>
15555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015556if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015557 have_readline=yes
15558else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015559 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015560
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015561fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015562rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015563if test $have_readline = yes
15564then
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015566/* end confdefs.h. */
15567#include <readline/readline.h>
15568
15569_ACEOF
15570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015574
15575fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015576rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015577
15578fi
15579
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15581$as_echo_n "checking for append_history in -lreadline... " >&6; }
15582if ${ac_cv_lib_readline_append_history+:} false; then :
15583 $as_echo_n "(cached) " >&6
15584else
15585 ac_check_lib_save_LIBS=$LIBS
15586LIBS="-lreadline $READLINE_LIBS $LIBS"
15587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15588/* end confdefs.h. */
15589
15590/* Override any GCC internal prototype to avoid an error.
15591 Use char because int might match the return type of a GCC
15592 builtin and then its argument prototype would still apply. */
15593#ifdef __cplusplus
15594extern "C"
15595#endif
15596char append_history ();
15597int
15598main ()
15599{
15600return append_history ();
15601 ;
15602 return 0;
15603}
15604_ACEOF
15605if ac_fn_c_try_link "$LINENO"; then :
15606 ac_cv_lib_readline_append_history=yes
15607else
15608 ac_cv_lib_readline_append_history=no
15609fi
15610rm -f core conftest.err conftest.$ac_objext \
15611 conftest$ac_exeext conftest.$ac_ext
15612LIBS=$ac_check_lib_save_LIBS
15613fi
15614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15615$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15616if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15617
15618$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15619
15620fi
15621
15622
Martin v. Löwis82bca632006-02-10 20:49:30 +000015623# End of readline checks: restore LIBS
15624LIBS=$LIBS_no_readline
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15627$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015628if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015630else
Martin v. Löwis11437992002-04-12 09:54:03 +000015631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015633 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015634else
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015637
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015638#include <stdlib.h>
15639#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015640int main()
15641{
15642 int val1 = nice(1);
15643 if (val1 != -1 && val1 == nice(2))
15644 exit(0);
15645 exit(1);
15646}
15647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015649if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015650 ac_cv_broken_nice=yes
15651else
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015656fi
15657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658fi
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15661$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015662if test "$ac_cv_broken_nice" = yes
15663then
Martin v. Löwis11437992002-04-12 09:54:03 +000015664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015666
15667fi
15668
Matthias Kloseb9621712010-04-24 17:59:49 +000015669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15670$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015671if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015672 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015673else
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015675 ac_cv_broken_poll=no
15676else
Matthias Kloseb9621712010-04-24 17:59:49 +000015677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015678/* end confdefs.h. */
15679
15680#include <poll.h>
15681
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015682int main()
15683{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015684 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015685 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015686
15687 close (42);
15688
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015689 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015690 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015691 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015692 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015693 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015694 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015695 return 1;
15696}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015697
15698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015699if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015700 ac_cv_broken_poll=yes
15701else
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015708fi
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15711$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015712if test "$ac_cv_broken_poll" = yes
15713then
15714
Matthias Kloseb9621712010-04-24 17:59:49 +000015715$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015716
15717fi
15718
Martin v. Löwis1d459062005-03-14 21:23:33 +000015719# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15721$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015722if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015723 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724else
15725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015727 ac_cv_working_tzset=no
15728else
Matthias Kloseb9621712010-04-24 17:59:49 +000015729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015730/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015731
15732#include <stdlib.h>
15733#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015734#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015735
15736#if HAVE_TZNAME
15737extern char *tzname[];
15738#endif
15739
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015740int main()
15741{
Brett Cannon18367812003-09-19 00:59:16 +000015742 /* Note that we need to ensure that not only does tzset(3)
15743 do 'something' with localtime, but it works as documented
15744 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015745 This includes making sure that tzname is set properly if
15746 tm->tm_zone does not exist since it is the alternative way
15747 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015748
15749 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015750 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015751 */
15752
Martin v. Löwis1d459062005-03-14 21:23:33 +000015753 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015754 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15755
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015756 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015757 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015758 if (localtime(&groundhogday)->tm_hour != 0)
15759 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015760#if HAVE_TZNAME
15761 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15762 if (strcmp(tzname[0], "UTC") ||
15763 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15764 exit(1);
15765#endif
Brett Cannon18367812003-09-19 00:59:16 +000015766
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015767 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015768 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015769 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015770 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015771#if HAVE_TZNAME
15772 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15773 exit(1);
15774#endif
Brett Cannon18367812003-09-19 00:59:16 +000015775
15776 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15777 tzset();
15778 if (localtime(&groundhogday)->tm_hour != 11)
15779 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015780#if HAVE_TZNAME
15781 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15782 exit(1);
15783#endif
15784
15785#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015786 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15787 exit(1);
15788 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15789 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015790#endif
Brett Cannon18367812003-09-19 00:59:16 +000015791
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015792 exit(0);
15793}
15794
15795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015796if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015797 ac_cv_working_tzset=yes
15798else
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015803fi
15804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805fi
15806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15808$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015809if test "$ac_cv_working_tzset" = yes
15810then
15811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015813
15814fi
15815
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015816# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15818$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015819if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015821else
Matthias Kloseb9621712010-04-24 17:59:49 +000015822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015823/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015824#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015825int
15826main ()
15827{
15828
15829struct stat st;
15830st.st_mtim.tv_nsec = 1;
15831
15832 ;
15833 return 0;
15834}
15835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015836if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015837 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015838else
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15842fi
15843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15845$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015846if test "$ac_cv_stat_tv_nsec" = yes
15847then
15848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015850
15851fi
15852
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015853# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15855$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015856if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015858else
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015860/* end confdefs.h. */
15861#include <sys/stat.h>
15862int
15863main ()
15864{
15865
15866struct stat st;
15867st.st_mtimespec.tv_nsec = 1;
15868
15869 ;
15870 return 0;
15871}
15872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015873if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015874 ac_cv_stat_tv_nsec2=yes
15875else
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15879fi
15880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15882$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015883if test "$ac_cv_stat_tv_nsec2" = yes
15884then
15885
Matthias Kloseb9621712010-04-24 17:59:49 +000015886$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015887
15888fi
15889
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015890# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015891ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015892if test "$cross_compiling" = no; then
15893 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15894fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015895
15896for ac_header in curses.h ncurses.h
15897do :
15898 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15899ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15900if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15901 cat >>confdefs.h <<_ACEOF
15902#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15903_ACEOF
15904
15905fi
15906
15907done
15908
15909
15910# On Solaris, term.h requires curses.h
15911for ac_header in term.h
15912do :
15913 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15914#ifdef HAVE_CURSES_H
15915#include <curses.h>
15916#endif
15917
15918"
15919if test "x$ac_cv_header_term_h" = xyes; then :
15920 cat >>confdefs.h <<_ACEOF
15921#define HAVE_TERM_H 1
15922_ACEOF
15923
15924fi
15925
15926done
15927
15928
Jack Jansen666b1e72001-10-31 12:11:48 +000015929# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15931$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015932if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015934else
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015937#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015938int
15939main ()
15940{
Jack Jansen666b1e72001-10-31 12:11:48 +000015941
15942 int rtn;
15943 rtn = mvwdelch(0,0,0);
15944
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 ;
15946 return 0;
15947}
15948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015949if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015950 ac_cv_mvwdelch_is_expression=yes
15951else
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15955fi
15956
Matthias Kloseb9621712010-04-24 17:59:49 +000015957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15958$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015959
15960if test "$ac_cv_mvwdelch_is_expression" = yes
15961then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015964
15965fi
15966
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015967# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15968# structs since version 5.7. If the macro is defined as zero before including
15969# [n]curses.h, ncurses will expose fields of the structs regardless of the
15970# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15972$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015973if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015975else
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015977/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015978
15979 #define NCURSES_OPAQUE 0
15980 #include <curses.h>
15981
Martin v. Löwis11437992002-04-12 09:54:03 +000015982int
15983main ()
15984{
Jack Jansen666b1e72001-10-31 12:11:48 +000015985
15986 WINDOW *w;
15987 w->_flags = 0;
15988
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 ;
15990 return 0;
15991}
15992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015993if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015994 ac_cv_window_has_flags=yes
15995else
Matthias Kloseb9621712010-04-24 17:59:49 +000015996 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15999fi
16000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16002$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016003
Jack Jansen666b1e72001-10-31 12:11:48 +000016004
16005if test "$ac_cv_window_has_flags" = yes
16006then
Martin v. Löwis11437992002-04-12 09:54:03 +000016007
Matthias Kloseb9621712010-04-24 17:59:49 +000016008$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016009
16010fi
16011
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16013$as_echo_n "checking for is_pad... " >&6; }
16014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16015/* end confdefs.h. */
16016#include <curses.h>
16017int
16018main ()
16019{
16020
16021#ifndef is_pad
16022void *x=is_pad
16023#endif
16024
16025 ;
16026 return 0;
16027}
16028_ACEOF
16029if ac_fn_c_try_compile "$LINENO"; then :
16030
16031$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16032
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16034$as_echo "yes" >&6; }
16035else
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16037$as_echo "no" >&6; }
16038
16039fi
16040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16043$as_echo_n "checking for is_term_resized... " >&6; }
16044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016045/* end confdefs.h. */
16046#include <curses.h>
16047int
16048main ()
16049{
16050void *x=is_term_resized
16051 ;
16052 return 0;
16053}
16054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016056
Matthias Kloseb9621712010-04-24 17:59:49 +000016057$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016058
Matthias Kloseb159a552010-04-25 21:00:44 +000016059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016060$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016061else
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16063$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016064
16065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16069$as_echo_n "checking for resize_term... " >&6; }
16070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016071/* end confdefs.h. */
16072#include <curses.h>
16073int
16074main ()
16075{
16076void *x=resize_term
16077 ;
16078 return 0;
16079}
16080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016081if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016084
Matthias Kloseb159a552010-04-25 21:00:44 +000016085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016086$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016087else
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16089$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016090
16091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16095$as_echo_n "checking for resizeterm... " >&6; }
16096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016097/* end confdefs.h. */
16098#include <curses.h>
16099int
16100main ()
16101{
16102void *x=resizeterm
16103 ;
16104 return 0;
16105}
16106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016107if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016110
Matthias Kloseb159a552010-04-25 21:00:44 +000016111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016112$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016113else
Matthias Kloseb9621712010-04-24 17:59:49 +000016114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16115$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016116
16117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016119
16120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16121$as_echo_n "checking for immedok... " >&6; }
16122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16123/* end confdefs.h. */
16124#include <curses.h>
16125int
16126main ()
16127{
16128
16129#ifndef immedok
16130void *x=immedok
16131#endif
16132
16133 ;
16134 return 0;
16135}
16136_ACEOF
16137if ac_fn_c_try_compile "$LINENO"; then :
16138
16139$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16140
16141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16142$as_echo "yes" >&6; }
16143else
16144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16145$as_echo "no" >&6; }
16146
16147fi
16148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16149
16150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16151$as_echo_n "checking for syncok... " >&6; }
16152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16153/* end confdefs.h. */
16154#include <curses.h>
16155int
16156main ()
16157{
16158
16159#ifndef syncok
16160void *x=syncok
16161#endif
16162
16163 ;
16164 return 0;
16165}
16166_ACEOF
16167if ac_fn_c_try_compile "$LINENO"; then :
16168
16169$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16170
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16172$as_echo "yes" >&6; }
16173else
16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16175$as_echo "no" >&6; }
16176
16177fi
16178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16179
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16181$as_echo_n "checking for wchgat... " >&6; }
16182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16183/* end confdefs.h. */
16184#include <curses.h>
16185int
16186main ()
16187{
16188
16189#ifndef wchgat
16190void *x=wchgat
16191#endif
16192
16193 ;
16194 return 0;
16195}
16196_ACEOF
16197if ac_fn_c_try_compile "$LINENO"; then :
16198
16199$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16200
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16202$as_echo "yes" >&6; }
16203else
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16205$as_echo "no" >&6; }
16206
16207fi
16208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16209
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16211$as_echo_n "checking for filter... " >&6; }
16212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16213/* end confdefs.h. */
16214#include <curses.h>
16215int
16216main ()
16217{
16218
16219#ifndef filter
16220void *x=filter
16221#endif
16222
16223 ;
16224 return 0;
16225}
16226_ACEOF
16227if ac_fn_c_try_compile "$LINENO"; then :
16228
16229$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16230
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16232$as_echo "yes" >&6; }
16233else
16234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16235$as_echo "no" >&6; }
16236
16237fi
16238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16239
16240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16241$as_echo_n "checking for has_key... " >&6; }
16242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16243/* end confdefs.h. */
16244#include <curses.h>
16245int
16246main ()
16247{
16248
16249#ifndef has_key
16250void *x=has_key
16251#endif
16252
16253 ;
16254 return 0;
16255}
16256_ACEOF
16257if ac_fn_c_try_compile "$LINENO"; then :
16258
16259$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16260
16261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16262$as_echo "yes" >&6; }
16263else
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16265$as_echo "no" >&6; }
16266
16267fi
16268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16269
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16271$as_echo_n "checking for typeahead... " >&6; }
16272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273/* end confdefs.h. */
16274#include <curses.h>
16275int
16276main ()
16277{
16278
16279#ifndef typeahead
16280void *x=typeahead
16281#endif
16282
16283 ;
16284 return 0;
16285}
16286_ACEOF
16287if ac_fn_c_try_compile "$LINENO"; then :
16288
16289$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16290
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16292$as_echo "yes" >&6; }
16293else
16294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16295$as_echo "no" >&6; }
16296
16297fi
16298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16299
16300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16301$as_echo_n "checking for use_env... " >&6; }
16302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303/* end confdefs.h. */
16304#include <curses.h>
16305int
16306main ()
16307{
16308
16309#ifndef use_env
16310void *x=use_env
16311#endif
16312
16313 ;
16314 return 0;
16315}
16316_ACEOF
16317if ac_fn_c_try_compile "$LINENO"; then :
16318
16319$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16320
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16322$as_echo "yes" >&6; }
16323else
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16325$as_echo "no" >&6; }
16326
16327fi
16328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016329# last curses configure check
16330CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16333$as_echo "$as_me: checking for device files" >&6;}
16334
16335if test "x$cross_compiling" = xyes; then
16336 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16338$as_echo_n "checking for /dev/ptmx... " >&6; }
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16340$as_echo "not set" >&6; }
16341 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16342 fi
16343 if test "${ac_cv_file__dev_ptc+set}" != set; then
16344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16345$as_echo_n "checking for /dev/ptc... " >&6; }
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16347$as_echo "not set" >&6; }
16348 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16349 fi
16350fi
16351
Matthias Kloseb9621712010-04-24 17:59:49 +000016352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16353$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016354if ${ac_cv_file__dev_ptmx+:} false; then :
16355 $as_echo_n "(cached) " >&6
16356else
16357 test "$cross_compiling" = yes &&
16358 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16359if test -r "/dev/ptmx"; then
16360 ac_cv_file__dev_ptmx=yes
16361else
16362 ac_cv_file__dev_ptmx=no
16363fi
16364fi
16365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16366$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16367if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016368
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016369fi
16370
16371if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016372
Matthias Kloseb9621712010-04-24 17:59:49 +000016373$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016374
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16377$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016378if ${ac_cv_file__dev_ptc+:} false; then :
16379 $as_echo_n "(cached) " >&6
16380else
16381 test "$cross_compiling" = yes &&
16382 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16383if test -r "/dev/ptc"; then
16384 ac_cv_file__dev_ptc=yes
16385else
16386 ac_cv_file__dev_ptc=no
16387fi
16388fi
16389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16390$as_echo "$ac_cv_file__dev_ptc" >&6; }
16391if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016392
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016393fi
16394
16395if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016396
Matthias Kloseb9621712010-04-24 17:59:49 +000016397$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016398
Neal Norwitz865400f2003-03-21 01:42:58 +000016399fi
16400
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016401if test $ac_sys_system = Darwin
16402then
16403 LIBS="$LIBS -framework CoreFoundation"
16404fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16407$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016408if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016410else
Matthias Kloseb9621712010-04-24 17:59:49 +000016411 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016412 ac_cv_have_size_t_format="cross -- assuming yes"
16413
Thomas Wouters477c8d52006-05-27 19:21:47 +000016414else
Matthias Kloseb9621712010-04-24 17:59:49 +000016415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016416/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016417
Thomas Wouters477c8d52006-05-27 19:21:47 +000016418#include <stdio.h>
16419#include <stddef.h>
16420#include <string.h>
16421
Christian Heimes2c181612007-12-17 20:04:13 +000016422#ifdef HAVE_SYS_TYPES_H
16423#include <sys/types.h>
16424#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016425
16426#ifdef HAVE_SSIZE_T
16427typedef ssize_t Py_ssize_t;
16428#elif SIZEOF_VOID_P == SIZEOF_LONG
16429typedef long Py_ssize_t;
16430#else
16431typedef int Py_ssize_t;
16432#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016433
Christian Heimes2c181612007-12-17 20:04:13 +000016434int main()
16435{
16436 char buffer[256];
16437
Thomas Wouters477c8d52006-05-27 19:21:47 +000016438 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16439 return 1;
16440
Thomas Wouters89f507f2006-12-13 04:49:30 +000016441 if (strcmp(buffer, "123"))
16442 return 1;
16443
16444 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16445 return 1;
16446
16447 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016448 return 1;
16449
16450 return 0;
16451}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016452
Thomas Wouters477c8d52006-05-27 19:21:47 +000016453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016454if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016455 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016456else
Matthias Kloseb9621712010-04-24 17:59:49 +000016457 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16460 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016461fi
16462
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16465$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016466if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016467
Matthias Kloseb9621712010-04-24 17:59:49 +000016468$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016469
16470fi
16471
Matthias Kloseb9621712010-04-24 17:59:49 +000016472ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016473#ifdef HAVE_SYS_TYPES_H
16474#include <sys/types.h>
16475#endif
16476#ifdef HAVE_SYS_SOCKET_H
16477#include <sys/socket.h>
16478#endif
16479
Matthias Kloseb9621712010-04-24 17:59:49 +000016480"
Victor Stinnere0be4232011-10-25 13:06:09 +020016481if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016482
Martin v. Löwis11437992002-04-12 09:54:03 +000016483else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016484
Matthias Kloseb9621712010-04-24 17:59:49 +000016485$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016486
16487fi
16488
Michael W. Hudson54241132001-12-07 15:38:26 +000016489
Matthias Kloseb9621712010-04-24 17:59:49 +000016490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16491$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016492if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016493 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016494else
Matthias Kloseb9621712010-04-24 17:59:49 +000016495 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016496 ac_cv_broken_mbstowcs=no
16497else
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016499/* end confdefs.h. */
16500
Stefan Krah19c21392012-11-22 23:47:32 +010016501#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016502#include<stdlib.h>
16503int main() {
16504 size_t len = -1;
16505 const char *str = "text";
16506 len = mbstowcs(NULL, str, 0);
16507 return (len != 4);
16508}
16509
16510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016511if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016512 ac_cv_broken_mbstowcs=no
16513else
Matthias Kloseb9621712010-04-24 17:59:49 +000016514 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016518fi
16519
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016520fi
16521
Matthias Kloseb9621712010-04-24 17:59:49 +000016522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16523$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016524if test "$ac_cv_broken_mbstowcs" = yes
16525then
16526
Matthias Kloseb9621712010-04-24 17:59:49 +000016527$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016528
16529fi
16530
Antoine Pitroub52ec782009-01-25 16:34:23 +000016531# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16533$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016534
16535# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016536if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016537 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016538if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016539then
16540
Matthias Kloseb9621712010-04-24 17:59:49 +000016541$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016542
Matthias Kloseb9621712010-04-24 17:59:49 +000016543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16544$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016545fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016546if test "$withval" = no
16547then
16548
16549$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16550
Matthias Kloseb9621712010-04-24 17:59:49 +000016551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16552$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016553fi
16554
Antoine Pitrou042b1282010-08-13 21:15:58 +000016555else
16556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16557$as_echo "no value specified" >&6; }
16558fi
16559
Antoine Pitroub52ec782009-01-25 16:34:23 +000016560
Matthias Kloseb17289e2012-03-15 19:51:34 +010016561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16562$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16563if ${ac_cv_computed_gotos+:} false; then :
16564 $as_echo_n "(cached) " >&6
16565else
16566 if test "$cross_compiling" = yes; then :
16567 if test "${with_computed_gotos+set}" = set; then
16568 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16569 else
16570 ac_cv_computed_gotos=no
16571 fi
16572else
16573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574/* end confdefs.h. */
16575
16576int main(int argc, char **argv)
16577{
16578 static void *targets[1] = { &&LABEL1 };
16579 goto LABEL2;
16580LABEL1:
16581 return 0;
16582LABEL2:
16583 goto *targets[0];
16584 return 1;
16585}
16586
16587_ACEOF
16588if ac_fn_c_try_run "$LINENO"; then :
16589 ac_cv_computed_gotos=yes
16590else
16591 ac_cv_computed_gotos=no
16592fi
16593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16594 conftest.$ac_objext conftest.beam conftest.$ac_ext
16595fi
16596
16597fi
16598
16599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16600$as_echo "$ac_cv_computed_gotos" >&6; }
16601case "$ac_cv_computed_gotos" in yes*)
16602
16603$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16604
16605esac
16606
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016607case $ac_sys_system in
16608AIX*)
16609
16610$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16611 ;;
16612esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016613
Michael W. Hudson54241132001-12-07 15:38:26 +000016614
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016615
16616
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016617for h in `(cd $srcdir;echo Python/thread_*.h)`
16618do
16619 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16620done
16621
Michael W. Hudson54241132001-12-07 15:38:26 +000016622
Victor Stinner21a74a92019-04-11 22:28:12 +020016623SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16625$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016626for dir in $SRCDIRS; do
16627 if test ! -d $dir; then
16628 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016629 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016630done
Matthias Kloseb9621712010-04-24 17:59:49 +000016631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16632$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016633
Stefan Krah1919b7e2012-03-21 18:25:23 +010016634# Availability of -O2:
16635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16636$as_echo_n "checking for -O2... " >&6; }
16637saved_cflags="$CFLAGS"
16638CFLAGS="-O2"
16639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16640/* end confdefs.h. */
16641
16642int
16643main ()
16644{
16645
16646
16647 ;
16648 return 0;
16649}
16650_ACEOF
16651if ac_fn_c_try_compile "$LINENO"; then :
16652 have_O2=yes
16653else
16654 have_O2=no
16655fi
16656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16658$as_echo "$have_O2" >&6; }
16659CFLAGS="$saved_cflags"
16660
16661# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16662# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16664$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16665saved_cflags="$CFLAGS"
16666CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16667if test "$have_O2" = no; then
16668 CFLAGS=""
16669fi
16670if test "$cross_compiling" = yes; then :
16671 have_glibc_memmove_bug=undefined
16672else
16673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16674/* end confdefs.h. */
16675
16676#include <stdio.h>
16677#include <stdlib.h>
16678#include <string.h>
16679void foo(void *p, void *q) { memmove(p, q, 19); }
16680int main() {
16681 char a[32] = "123456789000000000";
16682 foo(&a[9], a);
16683 if (strcmp(a, "123456789123456789000000000") != 0)
16684 return 1;
16685 foo(a, &a[9]);
16686 if (strcmp(a, "123456789000000000") != 0)
16687 return 1;
16688 return 0;
16689}
16690
16691_ACEOF
16692if ac_fn_c_try_run "$LINENO"; then :
16693 have_glibc_memmove_bug=no
16694else
16695 have_glibc_memmove_bug=yes
16696fi
16697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16698 conftest.$ac_objext conftest.beam conftest.$ac_ext
16699fi
16700
16701CFLAGS="$saved_cflags"
16702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16703$as_echo "$have_glibc_memmove_bug" >&6; }
16704if test "$have_glibc_memmove_bug" = yes; then
16705
16706$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16707
16708fi
16709
16710if test "$have_gcc_asm_for_x87" = yes; then
16711 # Some versions of gcc miscompile inline asm:
16712 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16713 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16714 case $CC in
16715 *gcc*)
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16717$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16718 saved_cflags="$CFLAGS"
16719 CFLAGS="-O2"
16720 if test "$cross_compiling" = yes; then :
16721 have_ipa_pure_const_bug=undefined
16722else
16723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724/* end confdefs.h. */
16725
16726 __attribute__((noinline)) int
16727 foo(int *p) {
16728 int r;
16729 asm ( "movl \$6, (%1)\n\t"
16730 "xorl %0, %0\n\t"
16731 : "=r" (r) : "r" (p) : "memory"
16732 );
16733 return r;
16734 }
16735 int main() {
16736 int p = 8;
16737 if ((foo(&p) ? : p) != 6)
16738 return 1;
16739 return 0;
16740 }
16741
16742_ACEOF
16743if ac_fn_c_try_run "$LINENO"; then :
16744 have_ipa_pure_const_bug=no
16745else
16746 have_ipa_pure_const_bug=yes
16747fi
16748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16749 conftest.$ac_objext conftest.beam conftest.$ac_ext
16750fi
16751
16752 CFLAGS="$saved_cflags"
16753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16754$as_echo "$have_ipa_pure_const_bug" >&6; }
16755 if test "$have_ipa_pure_const_bug" = yes; then
16756
16757$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16758
16759 fi
16760 ;;
16761 esac
16762fi
16763
Victor Stinner4f5366e2015-01-09 02:13:19 +010016764# Check for stdatomic.h
16765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16766$as_echo_n "checking for stdatomic.h... " >&6; }
16767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16768/* end confdefs.h. */
16769
16770
16771 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016772 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016773 int main() {
16774 int loaded_value = atomic_load(&value);
16775 return 0;
16776 }
16777
16778
16779_ACEOF
16780if ac_fn_c_try_link "$LINENO"; then :
16781 have_stdatomic_h=yes
16782else
16783 have_stdatomic_h=no
16784fi
16785rm -f core conftest.err conftest.$ac_objext \
16786 conftest$ac_exeext conftest.$ac_ext
16787
16788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16789$as_echo "$have_stdatomic_h" >&6; }
16790
16791if test "$have_stdatomic_h" = yes; then
16792
16793$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16794
16795fi
16796
16797# Check for GCC >= 4.7 __atomic builtins
16798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16799$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16801/* end confdefs.h. */
16802
16803
16804 volatile int val = 1;
16805 int main() {
16806 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16807 return 0;
16808 }
16809
16810
16811_ACEOF
16812if ac_fn_c_try_link "$LINENO"; then :
16813 have_builtin_atomic=yes
16814else
16815 have_builtin_atomic=no
16816fi
16817rm -f core conftest.err conftest.$ac_objext \
16818 conftest$ac_exeext conftest.$ac_ext
16819
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16821$as_echo "$have_builtin_atomic" >&6; }
16822
16823if test "$have_builtin_atomic" = yes; then
16824
16825$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16826
16827fi
16828
Ned Deily322f5ba2013-11-21 23:01:59 -080016829# ensurepip option
16830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16831$as_echo_n "checking for ensurepip... " >&6; }
16832
16833# Check whether --with-ensurepip was given.
16834if test "${with_ensurepip+set}" = set; then :
16835 withval=$with_ensurepip;
16836else
16837 with_ensurepip=upgrade
16838fi
16839
16840case $with_ensurepip in #(
16841 yes|upgrade) :
16842 ENSUREPIP=upgrade ;; #(
16843 install) :
16844 ENSUREPIP=install ;; #(
16845 no) :
16846 ENSUREPIP=no ;; #(
16847 *) :
16848 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16849esac
16850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16851$as_echo "$ENSUREPIP" >&6; }
16852
16853
Victor Stinner35a97c02015-03-08 02:59:09 +010016854# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16856$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16858/* end confdefs.h. */
16859
16860
16861 #include <dirent.h>
16862
16863 int main() {
16864 struct dirent entry;
16865 return entry.d_type == DT_UNKNOWN;
16866 }
16867
16868
16869_ACEOF
16870if ac_fn_c_try_link "$LINENO"; then :
16871 have_dirent_d_type=yes
16872else
16873 have_dirent_d_type=no
16874fi
16875rm -f core conftest.err conftest.$ac_objext \
16876 conftest$ac_exeext conftest.$ac_ext
16877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16878$as_echo "$have_dirent_d_type" >&6; }
16879
16880if test "$have_dirent_d_type" = yes; then
16881
16882$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16883
16884fi
16885
Victor Stinner9eb57c52015-03-19 22:21:49 +010016886# check if the Linux getrandom() syscall is available
16887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16888$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16890/* end confdefs.h. */
16891
16892
Victor Stinner1b80b242016-04-12 22:34:58 +020016893 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016894 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016895 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016896
16897 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016898 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016899 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016900 const int flags = GRND_NONBLOCK;
16901 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016902 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016903 return 0;
16904 }
16905
16906
16907_ACEOF
16908if ac_fn_c_try_link "$LINENO"; then :
16909 have_getrandom_syscall=yes
16910else
16911 have_getrandom_syscall=no
16912fi
16913rm -f core conftest.err conftest.$ac_objext \
16914 conftest$ac_exeext conftest.$ac_ext
16915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16916$as_echo "$have_getrandom_syscall" >&6; }
16917
16918if test "$have_getrandom_syscall" = yes; then
16919
16920$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16921
16922fi
16923
Victor Stinner3abf44e2015-09-18 15:38:37 +020016924# check if the getrandom() function is available
16925# the test was written for the Solaris function of <sys/random.h>
16926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16927$as_echo_n "checking for the getrandom() function... " >&6; }
16928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16929/* end confdefs.h. */
16930
16931
16932 #include <sys/random.h>
16933
16934 int main() {
16935 char buffer[1];
16936 const size_t buflen = sizeof(buffer);
16937 const int flags = 0;
16938 /* ignore the result, Python checks for ENOSYS at runtime */
16939 (void)getrandom(buffer, buflen, flags);
16940 return 0;
16941 }
16942
16943
16944_ACEOF
16945if ac_fn_c_try_link "$LINENO"; then :
16946 have_getrandom=yes
16947else
16948 have_getrandom=no
16949fi
16950rm -f core conftest.err conftest.$ac_objext \
16951 conftest$ac_exeext conftest.$ac_ext
16952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16953$as_echo "$have_getrandom" >&6; }
16954
16955if test "$have_getrandom" = yes; then
16956
16957$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16958
16959fi
16960
Neil Schemenauer5741c452019-02-08 10:48:46 -080016961# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16962# shm_* may only be available if linking against librt
16963save_LIBS="$LIBS"
16964save_includes_default="$ac_includes_default"
16965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16966$as_echo_n "checking for library containing shm_open... " >&6; }
16967if ${ac_cv_search_shm_open+:} false; then :
16968 $as_echo_n "(cached) " >&6
16969else
16970 ac_func_search_save_LIBS=$LIBS
16971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16972/* end confdefs.h. */
16973
16974/* Override any GCC internal prototype to avoid an error.
16975 Use char because int might match the return type of a GCC
16976 builtin and then its argument prototype would still apply. */
16977#ifdef __cplusplus
16978extern "C"
16979#endif
16980char shm_open ();
16981int
16982main ()
16983{
16984return shm_open ();
16985 ;
16986 return 0;
16987}
16988_ACEOF
16989for ac_lib in '' rt; do
16990 if test -z "$ac_lib"; then
16991 ac_res="none required"
16992 else
16993 ac_res=-l$ac_lib
16994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16995 fi
16996 if ac_fn_c_try_link "$LINENO"; then :
16997 ac_cv_search_shm_open=$ac_res
16998fi
16999rm -f core conftest.err conftest.$ac_objext \
17000 conftest$ac_exeext
17001 if ${ac_cv_search_shm_open+:} false; then :
17002 break
17003fi
17004done
17005if ${ac_cv_search_shm_open+:} false; then :
17006
17007else
17008 ac_cv_search_shm_open=no
17009fi
17010rm conftest.$ac_ext
17011LIBS=$ac_func_search_save_LIBS
17012fi
17013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17014$as_echo "$ac_cv_search_shm_open" >&6; }
17015ac_res=$ac_cv_search_shm_open
17016if test "$ac_res" != no; then :
17017 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17018
17019fi
17020
17021if test "$ac_cv_search_shm_open" = "-lrt"; then
17022
17023$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17024
17025fi
17026for ac_header in sys/mman.h
17027do :
17028 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17029if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17030 cat >>confdefs.h <<_ACEOF
17031#define HAVE_SYS_MMAN_H 1
17032_ACEOF
17033
17034fi
17035
17036done
17037
17038# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17039ac_includes_default="\
17040${ac_includes_default}
17041#ifndef __cplusplus
17042# ifdef HAVE_SYS_MMAN_H
17043# include <sys/mman.h>
17044# endif
17045#endif
17046"
17047for ac_func in shm_open shm_unlink
17048do :
17049 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17050ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17051if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17052 cat >>confdefs.h <<_ACEOF
17053#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17054_ACEOF
17055
17056fi
17057done
17058
17059# we don't want to link with librt always, restore LIBS
17060LIBS="$save_LIBS"
17061ac_includes_default="$save_includes_default"
17062
Christian Heimesff5be6e2018-01-20 13:19:21 +010017063# Check for usable OpenSSL
17064
17065 found=false
17066
17067# Check whether --with-openssl was given.
17068if test "${with_openssl+set}" = set; then :
17069 withval=$with_openssl;
17070 case "$withval" in
17071 "" | y | ye | yes | n | no)
17072 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17073 ;;
17074 *) ssldirs="$withval"
17075 ;;
17076 esac
17077
17078else
17079
17080 # if pkg-config is installed and openssl has installed a .pc file,
17081 # then use that information and don't search ssldirs
17082 if test -n "$ac_tool_prefix"; then
17083 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17084set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17086$as_echo_n "checking for $ac_word... " >&6; }
17087if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17088 $as_echo_n "(cached) " >&6
17089else
17090 if test -n "$PKG_CONFIG"; then
17091 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17092else
17093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17094for as_dir in $PATH
17095do
17096 IFS=$as_save_IFS
17097 test -z "$as_dir" && as_dir=.
17098 for ac_exec_ext in '' $ac_executable_extensions; do
17099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17100 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17102 break 2
17103 fi
17104done
17105 done
17106IFS=$as_save_IFS
17107
17108fi
17109fi
17110PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17111if test -n "$PKG_CONFIG"; then
17112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17113$as_echo "$PKG_CONFIG" >&6; }
17114else
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17116$as_echo "no" >&6; }
17117fi
17118
17119
17120fi
17121if test -z "$ac_cv_prog_PKG_CONFIG"; then
17122 ac_ct_PKG_CONFIG=$PKG_CONFIG
17123 # Extract the first word of "pkg-config", so it can be a program name with args.
17124set dummy pkg-config; ac_word=$2
17125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17126$as_echo_n "checking for $ac_word... " >&6; }
17127if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17128 $as_echo_n "(cached) " >&6
17129else
17130 if test -n "$ac_ct_PKG_CONFIG"; then
17131 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17132else
17133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17134for as_dir in $PATH
17135do
17136 IFS=$as_save_IFS
17137 test -z "$as_dir" && as_dir=.
17138 for ac_exec_ext in '' $ac_executable_extensions; do
17139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17140 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17142 break 2
17143 fi
17144done
17145 done
17146IFS=$as_save_IFS
17147
17148fi
17149fi
17150ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17151if test -n "$ac_ct_PKG_CONFIG"; then
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17153$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17154else
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17156$as_echo "no" >&6; }
17157fi
17158
17159 if test "x$ac_ct_PKG_CONFIG" = x; then
17160 PKG_CONFIG=""
17161 else
17162 case $cross_compiling:$ac_tool_warned in
17163yes:)
17164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17166ac_tool_warned=yes ;;
17167esac
17168 PKG_CONFIG=$ac_ct_PKG_CONFIG
17169 fi
17170else
17171 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17172fi
17173
17174 if test x"$PKG_CONFIG" != x""; then
17175 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17176 if test $? = 0; then
17177 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17178 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17179 found=true
17180 fi
17181 fi
17182
17183 # no such luck; use some default ssldirs
17184 if ! $found; then
17185 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17186 fi
17187
17188
17189fi
17190
17191
17192
17193 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17194 # an 'openssl' subdirectory
17195
17196 if ! $found; then
17197 OPENSSL_INCLUDES=
17198 for ssldir in $ssldirs; do
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17200$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17201 if test -f "$ssldir/include/openssl/ssl.h"; then
17202 OPENSSL_INCLUDES="-I$ssldir/include"
17203 OPENSSL_LDFLAGS="-L$ssldir/lib"
17204 OPENSSL_LIBS="-lssl -lcrypto"
17205 found=true
17206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17207$as_echo "yes" >&6; }
17208 break
17209 else
17210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17211$as_echo "no" >&6; }
17212 fi
17213 done
17214
17215 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17216 # it will just work!
17217 fi
17218
17219 # try the preprocessor and linker with our new flags,
17220 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17221
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17223$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17224 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17225 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17226
17227 save_LIBS="$LIBS"
17228 save_LDFLAGS="$LDFLAGS"
17229 save_CPPFLAGS="$CPPFLAGS"
17230 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17231 LIBS="$OPENSSL_LIBS $LIBS"
17232 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17234/* end confdefs.h. */
17235#include <openssl/ssl.h>
17236int
17237main ()
17238{
17239SSL_new(NULL)
17240 ;
17241 return 0;
17242}
17243_ACEOF
17244if ac_fn_c_try_link "$LINENO"; then :
17245
17246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17247$as_echo "yes" >&6; }
17248 have_openssl=yes
17249
17250else
17251
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17253$as_echo "no" >&6; }
17254 have_openssl=no
17255
17256fi
17257rm -f core conftest.err conftest.$ac_objext \
17258 conftest$ac_exeext conftest.$ac_ext
17259 CPPFLAGS="$save_CPPFLAGS"
17260 LDFLAGS="$save_LDFLAGS"
17261 LIBS="$save_LIBS"
17262
17263
17264
17265
17266
17267
17268if test "$have_openssl" = yes; then
17269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17270$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17271
17272 save_LIBS="$LIBS"
17273 save_LDFLAGS="$LDFLAGS"
17274 save_CPPFLAGS="$CPPFLAGS"
17275 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17276 LIBS="$OPENSSL_LIBS $LIBS"
17277 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17278
17279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17280/* end confdefs.h. */
17281
17282 #include <openssl/x509_vfy.h>
17283
17284int
17285main ()
17286{
17287
17288 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17289 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17290 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17291 X509_VERIFY_PARAM_set_hostflags(p, 0);
17292
17293 ;
17294 return 0;
17295}
17296
17297_ACEOF
17298if ac_fn_c_try_link "$LINENO"; then :
17299
17300 ac_cv_has_x509_verify_param_set1_host=yes
17301
17302else
17303
17304 ac_cv_has_x509_verify_param_set1_host=no
17305
17306fi
17307rm -f core conftest.err conftest.$ac_objext \
17308 conftest$ac_exeext conftest.$ac_ext
17309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17310$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17311 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17312
17313$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17314
17315 fi
17316
17317 CPPFLAGS="$save_CPPFLAGS"
17318 LDFLAGS="$save_LDFLAGS"
17319 LIBS="$save_LIBS"
17320fi
17321
Christian Heimes892d66e2018-01-29 14:10:18 +010017322# ssl module default cipher suite string
17323
17324
17325
17326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17327$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17328
17329# Check whether --with-ssl-default-suites was given.
17330if test "${with_ssl_default_suites+set}" = set; then :
17331 withval=$with_ssl_default_suites;
17332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17333$as_echo "$withval" >&6; }
17334case "$withval" in
17335 python)
17336 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17337
17338 ;;
17339 openssl)
17340 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17341
17342 ;;
17343 *)
17344 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17345
17346 cat >>confdefs.h <<_ACEOF
17347#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17348_ACEOF
17349
17350 ;;
17351esac
17352
17353else
17354
17355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17356$as_echo "python" >&6; }
17357$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17358
17359
17360fi
17361
17362
17363
Guido van Rossum627b2d71993-12-24 10:39:16 +000017364# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017365ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017366
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017367ac_config_files="$ac_config_files Modules/ld_so_aix"
17368
Martin v. Löwis11437992002-04-12 09:54:03 +000017369cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017370# This file is a shell script that caches the results of configure
17371# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017372# scripts and configure runs, see configure's option --config-cache.
17373# It is not useful on other systems. If it contains results you don't
17374# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017375#
Martin v. Löwis11437992002-04-12 09:54:03 +000017376# config.status only pays attention to the cache file if you give it
17377# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017378#
Skip Montanaro6dead952003-09-25 14:50:04 +000017379# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017380# loading this file, other *unset* `ac_cv_foo' will be assigned the
17381# following values.
17382
17383_ACEOF
17384
Guido van Rossumf78abae1997-01-21 22:02:36 +000017385# The following way of writing the cache mishandles newlines in values,
17386# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017388# Ultrix sh set writes to stderr and can't be redirected directly,
17389# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390(
17391 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17392 eval ac_val=\$$ac_var
17393 case $ac_val in #(
17394 *${as_nl}*)
17395 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017396 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17397$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398 esac
17399 case $ac_var in #(
17400 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017401 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17402 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403 esac ;;
17404 esac
17405 done
17406
Martin v. Löwis11437992002-04-12 09:54:03 +000017407 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17409 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 # `set' does not quote correctly, so add quotes: double-quote
17411 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017413 "s/'/'\\\\''/g;
17414 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 *)
17417 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 esac |
17421 sort
17422) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017423 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017427 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17428 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17430 :end' >>confcache
17431if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17432 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017433 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017434 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17435$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017436 if test ! -f "$cache_file" || test -h "$cache_file"; then
17437 cat confcache >"$cache_file"
17438 else
17439 case $cache_file in #(
17440 */* | ?:*)
17441 mv -f confcache "$cache_file"$$ &&
17442 mv -f "$cache_file"$$ "$cache_file" ;; #(
17443 *)
17444 mv -f confcache "$cache_file" ;;
17445 esac
17446 fi
17447 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017448 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017449 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17450$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017451 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017452fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017453rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017455test "x$prefix" = xNONE && prefix=$ac_default_prefix
17456# Let make expand exec_prefix.
17457test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017458
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017459DEFS=-DHAVE_CONFIG_H
17460
Skip Montanaro6dead952003-09-25 14:50:04 +000017461ac_libobjs=
17462ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017463U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017464for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17465 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17469 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017470 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17471 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017472done
17473LIBOBJS=$ac_libobjs
17474
17475LTLIBOBJS=$ac_ltlibobjs
17476
17477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478
Matthias Kloseb9621712010-04-24 17:59:49 +000017479
Victor Stinnere0be4232011-10-25 13:06:09 +020017480: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017481ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017482ac_clean_files_save=$ac_clean_files
17483ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017484{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17485$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17486as_write_fail=0
17487cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017488#! $SHELL
17489# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017490# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017491# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017492# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017493
Martin v. Löwis11437992002-04-12 09:54:03 +000017494debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017495ac_cs_recheck=false
17496ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017497
Matthias Kloseb9621712010-04-24 17:59:49 +000017498SHELL=\${CONFIG_SHELL-$SHELL}
17499export SHELL
17500_ASEOF
17501cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17502## -------------------- ##
17503## M4sh Initialization. ##
17504## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506# Be more Bourne compatible
17507DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017508if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017509 emulate sh
17510 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017512 # is contrary to our usage. Disable this feature.
17513 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017515else
Matthias Kloseb9621712010-04-24 17:59:49 +000017516 case `(set -o) 2>/dev/null` in #(
17517 *posix*) :
17518 set -o posix ;; #(
17519 *) :
17520 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017522fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017523
17524
Matthias Kloseb9621712010-04-24 17:59:49 +000017525as_nl='
17526'
17527export as_nl
17528# Printing a long string crashes Solaris 7 /usr/bin/printf.
17529as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17530as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17531as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17532# Prefer a ksh shell builtin over an external printf program on Solaris,
17533# but without wasting forks for bash or zsh.
17534if test -z "$BASH_VERSION$ZSH_VERSION" \
17535 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17536 as_echo='print -r --'
17537 as_echo_n='print -rn --'
17538elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17539 as_echo='printf %s\n'
17540 as_echo_n='printf %s'
17541else
17542 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17543 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17544 as_echo_n='/usr/ucb/echo -n'
17545 else
17546 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17547 as_echo_n_body='eval
17548 arg=$1;
17549 case $arg in #(
17550 *"$as_nl"*)
17551 expr "X$arg" : "X\\(.*\\)$as_nl";
17552 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17553 esac;
17554 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17555 '
17556 export as_echo_n_body
17557 as_echo_n='sh -c $as_echo_n_body as_echo'
17558 fi
17559 export as_echo_body
17560 as_echo='sh -c $as_echo_body as_echo'
17561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017562
17563# The user is always right.
17564if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017565 PATH_SEPARATOR=:
17566 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17567 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17568 PATH_SEPARATOR=';'
17569 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572
17573# IFS
17574# We need space, tab and new line, in precisely that order. Quoting is
17575# there to prevent editors from complaining about space-tab.
17576# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17577# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578IFS=" "" $as_nl"
17579
17580# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017581as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017582case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 *[\\/]* ) as_myself=$0 ;;
17584 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017585for as_dir in $PATH
17586do
17587 IFS=$as_save_IFS
17588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017589 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017593 ;;
17594esac
17595# We did not find ourselves, most probably we were run as `sh COMMAND'
17596# in which case we are not to be found in the path.
17597if test "x$as_myself" = x; then
17598 as_myself=$0
17599fi
17600if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017601 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17602 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603fi
17604
Matthias Kloseb9621712010-04-24 17:59:49 +000017605# Unset variables that we do not need and which cause bugs (e.g. in
17606# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17607# suppresses any "Segmentation fault" message there. '((' could
17608# trigger a bug in pdksh 5.2.14.
17609for as_var in BASH_ENV ENV MAIL MAILPATH
17610do eval test x\${$as_var+set} = xset \
17611 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612done
17613PS1='$ '
17614PS2='> '
17615PS4='+ '
17616
17617# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017618LC_ALL=C
17619export LC_ALL
17620LANGUAGE=C
17621export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017622
Matthias Kloseb9621712010-04-24 17:59:49 +000017623# CDPATH.
17624(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17625
17626
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017627# as_fn_error STATUS ERROR [LINENO LOG_FD]
17628# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017629# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17630# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017631# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017632as_fn_error ()
17633{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017634 as_status=$1; test $as_status -eq 0 && as_status=1
17635 if test "$4"; then
17636 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17637 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017638 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017639 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017640 as_fn_exit $as_status
17641} # as_fn_error
17642
17643
17644# as_fn_set_status STATUS
17645# -----------------------
17646# Set $? to STATUS, without forking.
17647as_fn_set_status ()
17648{
17649 return $1
17650} # as_fn_set_status
17651
17652# as_fn_exit STATUS
17653# -----------------
17654# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17655as_fn_exit ()
17656{
17657 set +e
17658 as_fn_set_status $1
17659 exit $1
17660} # as_fn_exit
17661
17662# as_fn_unset VAR
17663# ---------------
17664# Portably unset VAR.
17665as_fn_unset ()
17666{
17667 { eval $1=; unset $1;}
17668}
17669as_unset=as_fn_unset
17670# as_fn_append VAR VALUE
17671# ----------------------
17672# Append the text in VALUE to the end of the definition contained in VAR. Take
17673# advantage of any shell optimizations that allow amortized linear growth over
17674# repeated appends, instead of the typical quadratic growth present in naive
17675# implementations.
17676if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17677 eval 'as_fn_append ()
17678 {
17679 eval $1+=\$2
17680 }'
17681else
17682 as_fn_append ()
17683 {
17684 eval $1=\$$1\$2
17685 }
17686fi # as_fn_append
17687
17688# as_fn_arith ARG...
17689# ------------------
17690# Perform arithmetic evaluation on the ARGs, and store the result in the
17691# global $as_val. Take advantage of shells that can avoid forks. The arguments
17692# must be portable across $(()) and expr.
17693if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17694 eval 'as_fn_arith ()
17695 {
17696 as_val=$(( $* ))
17697 }'
17698else
17699 as_fn_arith ()
17700 {
17701 as_val=`expr "$@" || test $? -eq 1`
17702 }
17703fi # as_fn_arith
17704
17705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706if expr a : '\(a\)' >/dev/null 2>&1 &&
17707 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17708 as_expr=expr
17709else
17710 as_expr=false
17711fi
17712
17713if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17714 as_basename=basename
17715else
17716 as_basename=false
17717fi
17718
Matthias Kloseb9621712010-04-24 17:59:49 +000017719if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17720 as_dirname=dirname
17721else
17722 as_dirname=false
17723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725as_me=`$as_basename -- "$0" ||
17726$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17727 X"$0" : 'X\(//\)$' \| \
17728 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017729$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 sed '/^.*\/\([^/][^/]*\)\/*$/{
17731 s//\1/
17732 q
17733 }
17734 /^X\/\(\/\/\)$/{
17735 s//\1/
17736 q
17737 }
17738 /^X\/\(\/\).*/{
17739 s//\1/
17740 q
17741 }
17742 s/.*/./; q'`
17743
Matthias Kloseb9621712010-04-24 17:59:49 +000017744# Avoid depending upon Character Ranges.
17745as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17746as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17747as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17748as_cr_digits='0123456789'
17749as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750
17751ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017752case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017756 xy) ECHO_C='\c';;
17757 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17758 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759 esac;;
17760*)
17761 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017763
Martin v. Löwis11437992002-04-12 09:54:03 +000017764rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765if test -d conf$$.dir; then
17766 rm -f conf$$.dir/conf$$.file
17767else
17768 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017769 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017771if (echo >conf$$.file) 2>/dev/null; then
17772 if ln -s conf$$.file conf$$ 2>/dev/null; then
17773 as_ln_s='ln -s'
17774 # ... but there are two gotchas:
17775 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17776 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017777 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017779 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017780 elif ln conf$$.file conf$$ 2>/dev/null; then
17781 as_ln_s=ln
17782 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017783 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017785else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017786 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17789rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017790
Matthias Kloseb9621712010-04-24 17:59:49 +000017791
17792# as_fn_mkdir_p
17793# -------------
17794# Create "$as_dir" as a directory, including parents if necessary.
17795as_fn_mkdir_p ()
17796{
17797
17798 case $as_dir in #(
17799 -*) as_dir=./$as_dir;;
17800 esac
17801 test -d "$as_dir" || eval $as_mkdir_p || {
17802 as_dirs=
17803 while :; do
17804 case $as_dir in #(
17805 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17806 *) as_qdir=$as_dir;;
17807 esac
17808 as_dirs="'$as_qdir' $as_dirs"
17809 as_dir=`$as_dirname -- "$as_dir" ||
17810$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17811 X"$as_dir" : 'X\(//\)[^/]' \| \
17812 X"$as_dir" : 'X\(//\)$' \| \
17813 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17814$as_echo X"$as_dir" |
17815 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17816 s//\1/
17817 q
17818 }
17819 /^X\(\/\/\)[^/].*/{
17820 s//\1/
17821 q
17822 }
17823 /^X\(\/\/\)$/{
17824 s//\1/
17825 q
17826 }
17827 /^X\(\/\).*/{
17828 s//\1/
17829 q
17830 }
17831 s/.*/./; q'`
17832 test -d "$as_dir" && break
17833 done
17834 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017835 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017836
17837
17838} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017839if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017840 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017841else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017842 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017843 as_mkdir_p=false
17844fi
17845
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017846
17847# as_fn_executable_p FILE
17848# -----------------------
17849# Test if FILE is an executable regular file.
17850as_fn_executable_p ()
17851{
17852 test -f "$1" && test -x "$1"
17853} # as_fn_executable_p
17854as_test_x='test -x'
17855as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017856
17857# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017858as_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 +000017859
17860# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017861as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017862
17863
Martin v. Löwis11437992002-04-12 09:54:03 +000017864exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017865## ----------------------------------- ##
17866## Main body of $CONFIG_STATUS script. ##
17867## ----------------------------------- ##
17868_ASEOF
17869test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017870
Matthias Kloseb9621712010-04-24 17:59:49 +000017871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17872# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017873# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874# values after options handling.
17875ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017876This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017877generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
17879 CONFIG_FILES = $CONFIG_FILES
17880 CONFIG_HEADERS = $CONFIG_HEADERS
17881 CONFIG_LINKS = $CONFIG_LINKS
17882 CONFIG_COMMANDS = $CONFIG_COMMANDS
17883 $ $0 $@
17884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885on `(hostname || uname -n) 2>/dev/null | sed 1q`
17886"
17887
Martin v. Löwis11437992002-04-12 09:54:03 +000017888_ACEOF
17889
Matthias Kloseb9621712010-04-24 17:59:49 +000017890case $ac_config_files in *"
17891"*) set x $ac_config_files; shift; ac_config_files=$*;;
17892esac
17893
17894case $ac_config_headers in *"
17895"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17896esac
17897
17898
17899cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017900# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017901config_files="$ac_config_files"
17902config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017905
Matthias Kloseb9621712010-04-24 17:59:49 +000017906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017907ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017908\`$as_me' instantiates files and other configuration actions
17909from templates according to the current configuration. Unless the files
17910and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017911
Matthias Kloseb9621712010-04-24 17:59:49 +000017912Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017913
17914 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017916 --config print configuration, then exit
17917 -q, --quiet, --silent
17918 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017919 -d, --debug don't remove temporary files
17920 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017921 --file=FILE[:TEMPLATE]
17922 instantiate the configuration file FILE
17923 --header=FILE[:TEMPLATE]
17924 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017925
17926Configuration files:
17927$config_files
17928
17929Configuration headers:
17930$config_headers
17931
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017932Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17936ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017937ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017938python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017939configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017940 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017941
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017942Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017943This config.status script is free software; the Free Software Foundation
17944gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945
17946ac_pwd='$ac_pwd'
17947srcdir='$srcdir'
17948INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017949MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017950test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017951_ACEOF
17952
Matthias Kloseb9621712010-04-24 17:59:49 +000017953cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17954# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017955ac_need_defaults=:
17956while test $# != 0
17957do
17958 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17961 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017962 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017964 --*=)
17965 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17966 ac_optarg=
17967 ac_shift=:
17968 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017970 ac_option=$1
17971 ac_optarg=$2
17972 ac_shift=shift
17973 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 esac
17975
Skip Montanaro6dead952003-09-25 14:50:04 +000017976 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017978 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17979 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017981 $as_echo "$ac_cs_version"; exit ;;
17982 --config | --confi | --conf | --con | --co | --c )
17983 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 debug=: ;;
17986 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017987 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017988 case $ac_optarg in
17989 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017990 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017991 esac
17992 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017993 ac_need_defaults=false;;
17994 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017995 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017996 case $ac_optarg in
17997 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17998 esac
17999 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001 --he | --h)
18002 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018003 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018004Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018006 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018007 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18008 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18009 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018010
18011 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018012 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018013Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018014
Matthias Kloseb9621712010-04-24 17:59:49 +000018015 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018017
18018 esac
18019 shift
18020done
18021
Skip Montanaro6dead952003-09-25 14:50:04 +000018022ac_configure_extra_args=
18023
18024if $ac_cs_silent; then
18025 exec 6>/dev/null
18026 ac_configure_extra_args="$ac_configure_extra_args --silent"
18027fi
18028
18029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018031if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018032 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018033 shift
18034 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18035 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018037 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018038fi
18039
Martin v. Löwis11437992002-04-12 09:54:03 +000018040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042exec 5>>config.log
18043{
18044 echo
18045 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18046## Running $as_me. ##
18047_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018048 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018054
Matthias Kloseb9621712010-04-24 17:59:49 +000018055cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056
18057# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018058for ac_config_target in $ac_config_targets
18059do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060 case $ac_config_target in
18061 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18062 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18063 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018064 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18065 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018067 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018068 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018069 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018070 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071
Victor Stinnere0be4232011-10-25 13:06:09 +020018072 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018073 esac
18074done
18075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076
Martin v. Löwis11437992002-04-12 09:54:03 +000018077# If the user did not use the arguments to specify the items to instantiate,
18078# then the envvar interface is used. Set only those that are not.
18079# We use the long form for the default assignment because of an extremely
18080# bizarre bug on SunOS 4.1.3.
18081if $ac_need_defaults; then
18082 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18083 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18084fi
18085
Skip Montanaro6dead952003-09-25 14:50:04 +000018086# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018088# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089# Hook for its removal unless debugging.
18090# Note that there is a small window in which the directory will not be cleaned:
18091# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018092$debug ||
18093{
Victor Stinnere0be4232011-10-25 13:06:09 +020018094 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018096 : "${ac_tmp:=$tmp}"
18097 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018099 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018100}
Martin v. Löwis11437992002-04-12 09:54:03 +000018101# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018102
Martin v. Löwis11437992002-04-12 09:54:03 +000018103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018105 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018106} ||
18107{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108 tmp=./conf$$-$RANDOM
18109 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018110} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018111ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018112
Matthias Kloseb9621712010-04-24 17:59:49 +000018113# Set up the scripts for CONFIG_FILES section.
18114# No need to generate them if there are no CONFIG_FILES.
18115# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018117
Matthias Kloseb9621712010-04-24 17:59:49 +000018118
18119ac_cr=`echo X | tr X '\015'`
18120# On cygwin, bash can eat \r inside `` if the user requested igncr.
18121# But we know of no other shell where ac_cr would be empty at this
18122# point, so we can use a bashism as a fallback.
18123if test "x$ac_cr" = x; then
18124 eval ac_cr=\$\'\\r\'
18125fi
18126ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18127if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018128 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018129else
18130 ac_cs_awk_cr=$ac_cr
18131fi
18132
Victor Stinnere0be4232011-10-25 13:06:09 +020018133echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018134_ACEOF
18135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136
Matthias Kloseb9621712010-04-24 17:59:49 +000018137{
18138 echo "cat >conf$$subs.awk <<_ACEOF" &&
18139 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18140 echo "_ACEOF"
18141} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018142 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18143ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144ac_delim='%!_!# '
18145for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018146 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018147 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148
Matthias Kloseb9621712010-04-24 17:59:49 +000018149 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18150 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151 break
18152 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018153 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154 else
18155 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157done
Matthias Kloseb9621712010-04-24 17:59:49 +000018158rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159
Matthias Kloseb9621712010-04-24 17:59:49 +000018160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018161cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018163sed -n '
18164h
18165s/^/S["/; s/!.*/"]=/
18166p
18167g
18168s/^[^!]*!//
18169:repl
18170t repl
18171s/'"$ac_delim"'$//
18172t delim
18173:nl
18174h
18175s/\(.\{148\}\)..*/\1/
18176t more1
18177s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18178p
18179n
18180b repl
18181:more1
18182s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18183p
18184g
18185s/.\{148\}//
18186t nl
18187:delim
18188h
18189s/\(.\{148\}\)..*/\1/
18190t more2
18191s/["\\]/\\&/g; s/^/"/; s/$/"/
18192p
18193b
18194:more2
18195s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18196p
18197g
18198s/.\{148\}//
18199t delim
18200' <conf$$subs.awk | sed '
18201/^[^""]/{
18202 N
18203 s/\n//
18204}
18205' >>$CONFIG_STATUS || ac_write_fail=1
18206rm -f conf$$subs.awk
18207cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18208_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018209cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018210 for (key in S) S_is_set[key] = 1
18211 FS = ""
18212
18213}
18214{
18215 line = $ 0
18216 nfields = split(line, field, "@")
18217 substed = 0
18218 len = length(field[1])
18219 for (i = 2; i < nfields; i++) {
18220 key = field[i]
18221 keylen = length(key)
18222 if (S_is_set[key]) {
18223 value = S[key]
18224 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18225 len += length(value) + length(field[++i])
18226 substed = 1
18227 } else
18228 len += 1 + keylen
18229 }
18230
18231 print line
18232}
18233
18234_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18237if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18238 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18239else
18240 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018241fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018242 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018243_ACEOF
18244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018245# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18246# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018247# trailing colons and then remove the whole line if VPATH becomes empty
18248# (actually we leave an empty line to preserve line numbers).
18249if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018250 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18251h
18252s///
18253s/^/:/
18254s/[ ]*$/:/
18255s/:\$(srcdir):/:/g
18256s/:\${srcdir}:/:/g
18257s/:@srcdir@:/:/g
18258s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018260x
18261s/\(=[ ]*\).*/\1/
18262G
18263s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264s/^[^=]*=[ ]*$//
18265}'
18266fi
18267
Matthias Kloseb9621712010-04-24 17:59:49 +000018268cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018269fi # test -n "$CONFIG_FILES"
18270
Matthias Kloseb9621712010-04-24 17:59:49 +000018271# Set up the scripts for CONFIG_HEADERS section.
18272# No need to generate them if there are no CONFIG_HEADERS.
18273# This happens for instance with `./config.status Makefile'.
18274if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018275cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018276BEGIN {
18277_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018278
Matthias Kloseb9621712010-04-24 17:59:49 +000018279# Transform confdefs.h into an awk script `defines.awk', embedded as
18280# here-document in config.status, that substitutes the proper values into
18281# config.h.in to produce config.h.
18282
18283# Create a delimiter string that does not exist in confdefs.h, to ease
18284# handling of long lines.
18285ac_delim='%!_!# '
18286for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018287 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18288 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018289 break
18290 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018291 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018292 else
18293 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18294 fi
18295done
18296
18297# For the awk script, D is an array of macro values keyed by name,
18298# likewise P contains macro parameters if any. Preserve backslash
18299# newline sequences.
18300
18301ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18302sed -n '
18303s/.\{148\}/&'"$ac_delim"'/g
18304t rset
18305:rset
18306s/^[ ]*#[ ]*define[ ][ ]*/ /
18307t def
18308d
18309:def
18310s/\\$//
18311t bsnl
18312s/["\\]/\\&/g
18313s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18314D["\1"]=" \3"/p
18315s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18316d
18317:bsnl
18318s/["\\]/\\&/g
18319s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18320D["\1"]=" \3\\\\\\n"\\/p
18321t cont
18322s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18323t cont
18324d
18325:cont
18326n
18327s/.\{148\}/&'"$ac_delim"'/g
18328t clear
18329:clear
18330s/\\$//
18331t bsnlc
18332s/["\\]/\\&/g; s/^/"/; s/$/"/p
18333d
18334:bsnlc
18335s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18336b cont
18337' <confdefs.h | sed '
18338s/'"$ac_delim"'/"\\\
18339"/g' >>$CONFIG_STATUS || ac_write_fail=1
18340
18341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18342 for (key in D) D_is_set[key] = 1
18343 FS = ""
18344}
18345/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18346 line = \$ 0
18347 split(line, arg, " ")
18348 if (arg[1] == "#") {
18349 defundef = arg[2]
18350 mac1 = arg[3]
18351 } else {
18352 defundef = substr(arg[1], 2)
18353 mac1 = arg[2]
18354 }
18355 split(mac1, mac2, "(") #)
18356 macro = mac2[1]
18357 prefix = substr(line, 1, index(line, defundef) - 1)
18358 if (D_is_set[macro]) {
18359 # Preserve the white space surrounding the "#".
18360 print prefix "define", macro P[macro] D[macro]
18361 next
18362 } else {
18363 # Replace #undef with comments. This is necessary, for example,
18364 # in the case of _POSIX_SOURCE, which is predefined and required
18365 # on some systems where configure will not decide to define it.
18366 if (defundef == "undef") {
18367 print "/*", prefix defundef, macro, "*/"
18368 next
18369 }
18370 }
18371}
18372{ print }
18373_ACAWK
18374_ACEOF
18375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018376 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018377fi # test -n "$CONFIG_HEADERS"
18378
18379
18380eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18381shift
18382for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383do
18384 case $ac_tag in
18385 :[FHLC]) ac_mode=$ac_tag; continue;;
18386 esac
18387 case $ac_mode$ac_tag in
18388 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018389 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390 :[FH]-) ac_tag=-:-;;
18391 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18392 esac
18393 ac_save_IFS=$IFS
18394 IFS=:
18395 set x $ac_tag
18396 IFS=$ac_save_IFS
18397 shift
18398 ac_file=$1
18399 shift
18400
18401 case $ac_mode in
18402 :L) ac_source=$1;;
18403 :[FH])
18404 ac_file_inputs=
18405 for ac_f
18406 do
18407 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018408 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409 *) # Look for the file first in the build tree, then in the source tree
18410 # (if the path is not absolute). The absolute path cannot be DOS-style,
18411 # because $ac_f cannot contain `:'.
18412 test -f "$ac_f" ||
18413 case $ac_f in
18414 [\\/$]*) false;;
18415 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18416 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018417 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018419 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18420 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 done
18422
18423 # Let's still pretend it is `configure' which instantiates (i.e., don't
18424 # use $as_me), people would be surprised to read:
18425 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018426 configure_input='Generated from '`
18427 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18428 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429 if test x"$ac_file" != x-; then
18430 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018431 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18432$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018433 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018434 # Neutralize special characters interpreted by sed in replacement strings.
18435 case $configure_input in #(
18436 *\&* | *\|* | *\\* )
18437 ac_sed_conf_input=`$as_echo "$configure_input" |
18438 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18439 *) ac_sed_conf_input=$configure_input;;
18440 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441
18442 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018443 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 esac
18446 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018447 esac
18448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018450$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018451 X"$ac_file" : 'X\(//\)[^/]' \| \
18452 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018454$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18456 s//\1/
18457 q
18458 }
18459 /^X\(\/\/\)[^/].*/{
18460 s//\1/
18461 q
18462 }
18463 /^X\(\/\/\)$/{
18464 s//\1/
18465 q
18466 }
18467 /^X\(\/\).*/{
18468 s//\1/
18469 q
18470 }
18471 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018472 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 ac_builddir=.
18474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018475case "$ac_dir" in
18476.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18477*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018478 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018480 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481 case $ac_top_builddir_sub in
18482 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18483 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18484 esac ;;
18485esac
18486ac_abs_top_builddir=$ac_pwd
18487ac_abs_builddir=$ac_pwd$ac_dir_suffix
18488# for backward compatibility:
18489ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018490
18491case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018493 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 ac_top_srcdir=$ac_top_builddir_sub
18495 ac_abs_top_srcdir=$ac_pwd ;;
18496 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018497 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498 ac_top_srcdir=$srcdir
18499 ac_abs_top_srcdir=$srcdir ;;
18500 *) # Relative name.
18501 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18502 ac_top_srcdir=$ac_top_build_prefix$srcdir
18503 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018504esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018506
Martin v. Löwis11437992002-04-12 09:54:03 +000018507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508 case $ac_mode in
18509 :F)
18510 #
18511 # CONFIG_FILE
18512 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018513
18514 case $INSTALL in
18515 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018517 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018518 ac_MKDIR_P=$MKDIR_P
18519 case $MKDIR_P in
18520 [\\/$]* | ?:[\\/]* ) ;;
18521 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18522 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018523_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524
Matthias Kloseb9621712010-04-24 17:59:49 +000018525cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018526# If the template does not know about datarootdir, expand it.
18527# FIXME: This hack should be removed a few years after 2.60.
18528ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018529ac_sed_dataroot='
18530/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531 p
18532 q
18533}
18534/@datadir@/p
18535/@docdir@/p
18536/@infodir@/p
18537/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018538/@mandir@/p'
18539case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540*datarootdir*) ac_datarootdir_seen=yes;;
18541*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18543$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018545cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546 ac_datarootdir_hack='
18547 s&@datadir@&$datadir&g
18548 s&@docdir@&$docdir&g
18549 s&@infodir@&$infodir&g
18550 s&@localedir@&$localedir&g
18551 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018552 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018553esac
18554_ACEOF
18555
18556# Neutralize VPATH when `$srcdir' = `.'.
18557# Shell code in configure.ac might set extrasub.
18558# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18560ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018561$extrasub
18562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018564:t
18565/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018566s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018567s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018568s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018569s&@srcdir@&$ac_srcdir&;t t
18570s&@abs_srcdir@&$ac_abs_srcdir&;t t
18571s&@top_srcdir@&$ac_top_srcdir&;t t
18572s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18573s&@builddir@&$ac_builddir&;t t
18574s&@abs_builddir@&$ac_abs_builddir&;t t
18575s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18576s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018577s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018579"
Victor Stinnere0be4232011-10-25 13:06:09 +020018580eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18581 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018584 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18585 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18586 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018588which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018589$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018590which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018591
Victor Stinnere0be4232011-10-25 13:06:09 +020018592 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018593 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018594 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18595 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018596 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018597 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018598 ;;
18599 :H)
18600 #
18601 # CONFIG_HEADER
18602 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018603 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018604 {
18605 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018606 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18607 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018608 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018609 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018610 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18611$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018613 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018614 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018615 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 fi
18617 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018618 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018619 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018620 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018621 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018622 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624
18625 esac
18626
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018627
18628 case $ac_file$ac_mode in
18629 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18630
18631 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018632done # for ac_tag
18633
Guido van Rossum627b2d71993-12-24 10:39:16 +000018634
Matthias Kloseb9621712010-04-24 17:59:49 +000018635as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018636_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018637ac_clean_files=$ac_clean_files_save
18638
Matthias Kloseb9621712010-04-24 17:59:49 +000018639test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018640 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018641
Martin v. Löwis11437992002-04-12 09:54:03 +000018642
18643# configure is writing to config.log, and then calls config.status.
18644# config.status does its own redirection, appending to config.log.
18645# Unfortunately, on DOS this fails, as config.log is still kept open
18646# by configure, so config.status won't be able to write to it; its
18647# output is simply discarded. So we exec the FD to /dev/null,
18648# effectively closing config.log, so it can be properly (re)opened and
18649# appended to by config.status. When coming back to configure, we
18650# need to make the FD available again.
18651if test "$no_create" != yes; then
18652 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018653 ac_config_status_args=
18654 test "$silent" = yes &&
18655 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018656 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018657 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 exec 5>>config.log
18659 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18660 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018661 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018662fi
18663if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18665$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018666fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018667
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018668
Christian Heimes75ed8902013-11-20 01:11:18 +010018669echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018670if test ! -f Modules/Setup.local
18671then
18672 echo "# Edit this file for local setup changes" >Modules/Setup.local
18673fi
18674
Christian Heimes75ed8902013-11-20 01:11:18 +010018675echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018676$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018677 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018678 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018679mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018680
18681if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18682 echo "" >&6
18683 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018684 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 +000018685 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018686 echo "" >&6
18687 echo "" >&6
18688fi
18689