blob: 0914e24704383237f966248a165a264bdccff244 [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
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Miss Islington (bot)24066722019-07-22 13:17:23 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200816with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
Miss Islington (bot)24066722019-07-22 13:17:23 -0700856PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Miss Skeleton (bot)dbcea392019-10-22 13:19:32 -07001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001400\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001465 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001493 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1494 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001503 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001504 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001505 --with-lto Enable Link Time Optimization in any build. Disabled
1506 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001510 enable AddressSanitizer (asan)
1511 --with-memory-sanitizer enable MemorySanitizer (msan)
1512 --with-undefined-behavior-sanitizer
1513 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001515 --with-system-expat build pyexpat module using an installed expat
1516 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001517 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001518 --with-system-libmpdec build _decimal module using an installed libmpdec
1519 library
Ned Deilyd819b932013-09-06 01:07:05 -07001520 --with-tcltk-includes='-I...'
1521 override search for Tcl and Tk include files
1522 --with-tcltk-libs='-L...'
1523 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001524 --with-dbmliborder=db1:db2:...
1525 order to check db backends for dbm. Valid value is a
1526 colon separated string with the backend names
1527 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
1529 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001530 --with(out)-c-locale-coercion
1531 disable/enable C locale coercion to a UTF-8 based
1532 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001533 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001534 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-libm=STRING math library
1536 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001537 --with(out)-computed-gotos
1538 Use computed gotos in evaluation loop (enabled by
1539 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001540 --with(out)-ensurepip=[=upgrade]
1541 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001542 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001543 --with-ssl-default-suites=[python|openssl|STRING]
1544 Override default cipher suites string, python: use
1545 Python's preferred selection (default), openssl:
1546 leave OpenSSL's defaults untouched, STRING: use a
1547 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Miss Islington (bot)24066722019-07-22 13:17:23 -07001559 PROFILE_TASK
1560 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001561 PKG_CONFIG path to pkg-config utility
1562 PKG_CONFIG_PATH
1563 directories to add to pkg-config's search path
1564 PKG_CONFIG_LIBDIR
1565 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
1567Use these variables to override the choices made by `configure' or to help
1568it to find libraries and programs with nonstandard names/locations.
1569
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001570Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
1574
1575if test "$ac_init_help" = "recursive"; then
1576 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -d "$ac_dir" ||
1579 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_builddir=.
1582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583case "$ac_dir" in
1584.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $ac_top_builddir_sub in
1590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592 esac ;;
1593esac
1594ac_abs_top_builddir=$ac_pwd
1595ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596# for backward compatibility:
1597ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001598
1599case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$ac_top_builddir_sub
1603 ac_abs_top_srcdir=$ac_pwd ;;
1604 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 ac_top_srcdir=$srcdir
1607 ac_abs_top_srcdir=$srcdir ;;
1608 *) # Relative name.
1609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610 ac_top_srcdir=$ac_top_build_prefix$srcdir
1611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001612esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 cd "$ac_dir" || { ac_status=$?; continue; }
1616 # Check for guested configure.
1617 if test -f "$ac_srcdir/configure.gnu"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620 elif test -f "$ac_srcdir/configure"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 fi || ac_status=$?
1626 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 done
1628fi
1629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if $ac_init_version; then
1632 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001633python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001635
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001637This configure script is free software; the Free Software Foundation
1638gives unlimited permission to copy, distribute and modify it.
1639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001642
1643## ------------------------ ##
1644## Autoconf initialization. ##
1645## ------------------------ ##
1646
1647# ac_fn_c_try_compile LINENO
1648# --------------------------
1649# Try to compile conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_compile ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 rm -f conftest.$ac_objext
1654 if { { ac_try="$ac_compile"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_compile") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } && {
1670 test -z "$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 } && test -s conftest.$ac_objext; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_compile
1684
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } > conftest.i && {
1707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
Matthias Kloseb9621712010-04-24 17:59:49 +00001722# ac_fn_c_try_link LINENO
1723# -----------------------
1724# Try to link conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_link ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext conftest$ac_exeext
1729 if { { ac_try="$ac_link"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_link") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest$ac_exeext && {
1748 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001749 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 }; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1759 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1760 # interfere with the next link command; also delete a directory that is
1761 # left behind by Apple's compiler. We do this before executing the actions.
1762 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_link
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1769# -------------------------------------------------------
1770# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771# the include files in INCLUDES and setting the cache variable VAR
1772# accordingly.
1773ac_fn_c_check_header_mongrel ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001779if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 $as_echo_n "(cached) " >&6
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785else
1786 # Is the header compilable?
1787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788$as_echo_n "checking $2 usability... " >&6; }
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791$4
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_compile "$LINENO"; then :
1795 ac_header_compiler=yes
1796else
1797 ac_header_compiler=no
1798fi
1799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801$as_echo "$ac_header_compiler" >&6; }
1802
1803# Is the header present?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805$as_echo_n "checking $2 presence... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_cpp "$LINENO"; then :
1811 ac_header_preproc=yes
1812else
1813 ac_header_preproc=no
1814fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001815rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817$as_echo "$ac_header_preproc" >&6; }
1818
1819# So? What about this header?
1820case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821 yes:no: )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826 ;;
1827 no:yes:* )
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1831$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1835$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001838( $as_echo "## --------------------------------------- ##
1839## Report this to https://bugs.python.org/ ##
1840## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 ) | sed "s/^/$as_me: WARNING: /" >&2
1842 ;;
1843esac
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=\$ac_header_compiler"
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001856
1857} # ac_fn_c_check_header_mongrel
1858
1859# ac_fn_c_try_run LINENO
1860# ----------------------
1861# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1862# that executables *can* be run.
1863ac_fn_c_try_run ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 if { { ac_try="$ac_link"
1867case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_link") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1877 { { case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_try") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; }; }; then :
1887 ac_retval=0
1888else
1889 $as_echo "$as_me: program exited with status $ac_status" >&5
1890 $as_echo "$as_me: failed program was:" >&5
1891sed 's/^/| /' conftest.$ac_ext >&5
1892
1893 ac_retval=$ac_status
1894fi
1895 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001896 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 as_fn_set_status $ac_retval
1898
1899} # ac_fn_c_try_run
1900
1901# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902# -------------------------------------------------------
1903# Tests whether HEADER exists and can be compiled using the include files in
1904# INCLUDES, setting the cache variable VAR accordingly.
1905ac_fn_c_check_header_compile ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 $as_echo_n "(cached) " >&6
1912else
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 eval "$3=yes"
1920else
1921 eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_check_header_compile
1931
Matthias Kloseb9621712010-04-24 17:59:49 +00001932# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1933# -------------------------------------------
1934# Tests whether TYPE exists after having included INCLUDES, setting cache
1935# variable VAR accordingly.
1936ac_fn_c_check_type ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$4
1948int
1949main ()
1950{
1951if (sizeof ($2))
1952 return 0;
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
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
1972else
1973 eval "$3=yes"
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_check_type
1985
Matthias Kloseb9621712010-04-24 17:59:49 +00001986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=-1 ac_mid=-1
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
2128
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
2149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
2162
2163 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002164 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002165 as_fn_set_status $ac_retval
2166
2167} # ac_fn_c_compute_int
2168
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002177if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 $as_echo_n "(cached) " >&6
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002233
2234} # ac_fn_c_check_func
2235
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002236# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2237# ---------------------------------------------
2238# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2239# accordingly.
2240ac_fn_c_check_decl ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 as_decl_name=`echo $2|sed 's/ *(.*//'`
2244 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2246$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$4
2253int
2254main ()
2255{
2256#ifndef $as_decl_name
2257#ifdef __cplusplus
2258 (void) $as_decl_use;
2259#else
2260 (void) $as_decl_name;
2261#endif
2262#endif
2263
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$3=yes"
2270else
2271 eval "$3=no"
2272fi
2273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274fi
2275eval ac_res=\$$3
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277$as_echo "$ac_res" >&6; }
2278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279
2280} # ac_fn_c_check_decl
2281
Matthias Kloseb9621712010-04-24 17:59:49 +00002282# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2283# ----------------------------------------------------
2284# Tries to find if the field MEMBER exists in type AGGR, after including
2285# INCLUDES, setting cache variable VAR accordingly.
2286ac_fn_c_check_member ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2290$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (sizeof ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 eval "$4=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$4
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Ned Deily5489bda2018-01-31 17:44:09 -05002342It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002343generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_files
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002521## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577 # We do not want a PATH search for config.site.
2578 case $CONFIG_SITE in #((
2579 -*) ac_site_file1=./$CONFIG_SITE;;
2580 */*) ac_site_file1=$CONFIG_SITE;;
2581 *) ac_site_file1=./$CONFIG_SITE;;
2582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597 . "$ac_site_file" \
2598 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002601See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603done
2604
2605if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 # Some versions of bash will fail to source /dev/null (special files
2607 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2608 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 esac
2615 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 >$cache_file
2620fi
2621
2622# Check that the precious variables saved in the cache have kept the same
2623# value.
2624ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 case $ac_old_set,$ac_new_set in
2631 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633$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 +00002634 ac_cache_corrupted=: ;;
2635 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_cache_corrupted=: ;;
2639 ,);;
2640 *)
2641 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 # differences in whitespace do not lead to failure.
2643 ac_old_val_w=`echo x $ac_old_val`
2644 ac_new_val_w=`echo x $ac_new_val`
2645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648 ac_cache_corrupted=:
2649 else
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652 eval $ac_var=\$ac_old_val
2653 fi
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2655$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2657$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 fi;;
2659 esac
2660 # Pass precious variables to config.status.
2661 if test "$ac_new_set" = set; then
2662 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 *) ac_arg=$ac_var=$ac_new_val ;;
2665 esac
2666 case " $ac_configure_args " in
2667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
2671done
2672if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002679## -------------------- ##
2680## Main body of script. ##
2681## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682
Guido van Rossum7f43da71994-08-01 12:15:30 +00002683ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691
Christian Heimesff5be6e2018-01-20 13:19:21 +01002692
2693
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002694if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Victor Stinner9ed34a82017-05-02 22:35:58 +02002713if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715# Extract the first word of "git", so it can be a program name with args.
2716set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 if test -n "$HAS_GIT"; then
2723 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
2742fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=$ac_cv_prog_HAS_GIT
2744if test -n "$HAS_GIT"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2746$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Xiang Zhang4c855572018-08-20 22:36:19 +08002758 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2759 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2760 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITVERSION=""
2763 GITTAG=""
2764 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if test -f "$ac_dir/install-sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install-sh -c"
2776 break
2777 elif test -f "$ac_dir/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884 $as_echo_n "(cached) " >&6
2885else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002886 if test -n "$PYTHON_FOR_REGEN"; then
2887 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002896 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002906PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2907if test -n "$PYTHON_FOR_REGEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2909$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
2921
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002922if test "$cross_compiling" = yes; then
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2924$as_echo_n "checking for python interpreter for cross build... " >&6; }
2925 if test -z "$PYTHON_FOR_BUILD"; then
2926 for interp in python$PACKAGE_VERSION python3 python; do
2927 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002928 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 +02002929 break
2930 fi
2931 interp=
2932 done
2933 if test x$interp = x; then
2934 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2935 fi
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2937$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002938 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 +02002939 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002940elif test "$cross_compiling" = maybe; then
2941 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002942else
2943 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Benjamin Petersond23f8222009-04-05 19:13:16 +00002948if test "$prefix" != "/"; then
2949 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
2954
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002955# We don't use PACKAGE_ variables, and they cause conflicts
2956# with other autoconf-based packages that include Python.h
2957grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2958rm confdefs.h
2959mv confdefs.h.new confdefs.h
2960
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002961
Ned Deily5489bda2018-01-31 17:44:09 -05002962VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002963
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002964# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002965
2966SOVERSION=1.0
2967
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968# The later defininition of _XOPEN_SOURCE disables certain features
2969# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2970
Matthias Kloseb9621712010-04-24 17:59:49 +00002971$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972
2973
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2976# them.
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979
2980
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2983# them.
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986
2987
Martin v. Löwisd6320502004-08-12 13:45:08 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002993
2994
2995
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002996define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002997
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002998# Arguments passed to configure.
2999
3000CONFIG_ARGS="$ac_configure_args"
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3003$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003005if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007 case $enableval in
3008 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003009 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 # information
3011 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003012 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003014 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3015 if test ! -d "${enableval}"
3016 then
3017 enableval=/
3018 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003019 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 ;;
3021 esac
3022 case $enableval in
3023 no)
3024 UNIVERSALSDK=
3025 enable_universalsdk=
3026 ;;
3027 *)
3028 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 if test ! -d "${UNIVERSALSDK}"
3030 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003031 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 ;;
3034 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003035
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037else
3038
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044if test -n "${UNIVERSALSDK}"
3045then
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3047$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048else
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3050$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003053
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deily87adb6e2013-10-18 21:09:56 -07003055ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003056
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057# For backward compatibility reasons we prefer to select '32-bit' if available,
3058# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003059UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060if test "`uname -s`" = "Darwin"
3061then
3062 if test -n "${UNIVERSALSDK}"
3063 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003064 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 then
3066 UNIVERSAL_ARCHS="intel"
3067 fi
3068 fi
3069fi
3070
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3073$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074
3075# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003076if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 UNIVERSAL_ARCHS="$withval"
3079
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080fi
3081
Ned Deily87adb6e2013-10-18 21:09:56 -07003082if test -n "${UNIVERSALSDK}"
3083then
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3085$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3086else
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3088$as_echo "no" >&6; }
3089fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091
3092# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003093if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094 withval=$with_framework_name;
3095 PYTHONFRAMEWORK=${withval}
3096 PYTHONFRAMEWORKDIR=${withval}.framework
3097 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3098
3099else
3100
3101 PYTHONFRAMEWORK=Python
3102 PYTHONFRAMEWORKDIR=Python.framework
3103 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3104
3105fi
3106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003110 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003112 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 esac
3114 case $enableval in
3115 no)
3116 PYTHONFRAMEWORK=
3117 PYTHONFRAMEWORKDIR=no-framework
3118 PYTHONFRAMEWORKPREFIX=
3119 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120 FRAMEWORKINSTALLFIRST=
3121 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 FRAMEWORKALTINSTALLFIRST=
3123 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003124 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 if test "x${prefix}" = "xNONE"; then
3126 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003131 ;;
3132 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003133 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003136 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003137 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3138 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 if test "x${prefix}" = "xNONE" ; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 else
3146 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3147 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
3149 case "${enableval}" in
3150 /System*)
3151 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3152 if test "${prefix}" = "NONE" ; then
3153 # See below
3154 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3155 fi
3156 ;;
3157
3158 /Library*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 ;;
3161
3162 */Library/Frameworks)
3163 MDIR="`dirname "${enableval}"`"
3164 MDIR="`dirname "${MDIR}"`"
3165 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3166
3167 if test "${prefix}" = "NONE"; then
3168 # User hasn't specified the
3169 # --prefix option, but wants to install
3170 # the framework in a non-default location,
3171 # ensure that the compatibility links get
3172 # installed relative to that prefix as well
3173 # instead of in /usr/local.
3174 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3175 fi
3176 ;;
3177
3178 *)
3179 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3180 ;;
3181 esac
3182
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003185 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003191 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3192
3193 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3194
Jack Jansene578a632001-08-15 01:27:14 +00003195 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Guido van Rossum563e7081996-09-10 18:20:48 +00003197else
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003201 PYTHONFRAMEWORKPREFIX=
3202 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST=
3204 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 FRAMEWORKALTINSTALLFIRST=
3206 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 if test "x${prefix}" = "xNONE" ; then
3209 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3210 else
3211 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3212 fi
Jack Jansene578a632001-08-15 01:27:14 +00003213 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003214
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216fi
3217
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
3219
Michael W. Hudson54241132001-12-07 15:38:26 +00003220
3221
3222
3223
Jack Jansene578a632001-08-15 01:27:14 +00003224
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225
3226
3227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003229
Ned Deilyb8f944f2013-11-21 22:42:25 -08003230
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231
3232cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003233#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003234_ACEOF
3235
3236
Jack Jansene578a632001-08-15 01:27:14 +00003237##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003238## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003239## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003240##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241# Set name for machine-dependent library files
3242
Matthias Kloseb9621712010-04-24 17:59:49 +00003243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3244$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003245if test -z "$MACHDEP"
3246then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 # avoid using uname for cross builds
3248 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003249 # ac_sys_system and ac_sys_release are used for setting
3250 # a lot of different things including 'define_xopen_source'
3251 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003253 *-*-linux-android*)
3254 ac_sys_system=Linux-android
3255 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003262 *-*-vxworks*)
3263 ac_sys_system=VxWorks
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *)
3266 # for now, limit cross builds to known configurations
3267 MACHDEP="unknown"
3268 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3269 esac
3270 ac_sys_release=
3271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003273 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003274 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 fi
3280 ac_md_system=`echo $ac_sys_system |
3281 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3282 ac_md_release=`echo $ac_sys_release |
3283 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3284 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003285
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003287 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003288 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003289 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003290 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003291 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3295$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003296
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003297
3298if test "$cross_compiling" = yes; then
3299 case "$host" in
3300 *-*-linux*)
3301 case "$host_cpu" in
3302 arm*)
3303 _host_cpu=arm
3304 ;;
3305 *)
3306 _host_cpu=$host_cpu
3307 esac
3308 ;;
3309 *-*-cygwin*)
3310 _host_cpu=
3311 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003312 *-*-vxworks*)
3313 _host_cpu=$host_cpu
3314 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 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 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3377 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3378 # identifies itself as Darwin/7.*
3379 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # disables platform specific features beyond repair.
3381 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # has no effect, don't bother defining them
3383 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003384 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003385 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3388 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3389 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003390 AIX/4)
3391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 AIX/5)
3393 if test `uname -r` -eq 1; then
3394 define_xopen_source=no
3395 fi
3396 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003397 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3398 # defining NI_NUMERICHOST.
3399 QNX/6.3.2)
3400 define_xopen_source=no
3401 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003402 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3403 # in network headers still using system V types.
3404 VxWorks/*)
3405 define_xopen_source=no
3406 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408esac
3409
3410if test $define_xopen_source = yes
3411then
Victor Stinner14d098d2011-09-07 22:29:43 +02003412 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Victor Stinner14d098d2011-09-07 22:29:43 +02003414$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3418 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3419 # several APIs are not declared. Since this is also needed in some
3420 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Matthias Kloseb9621712010-04-24 17:59:49 +00003422$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
3424
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003426$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428fi
3429
Christian Heimes647cd872013-12-07 23:39:33 +01003430# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3431case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432 hp*|HP*)
3433 define_stdc_a1=yes;;
3434 *)
3435 define_stdc_a1=no;;
3436esac
3437
3438if test $define_stdc_a1 = yes
3439then
Christian Heimes647cd872013-12-07 23:39:33 +01003440
3441$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3442
Christian Heimesb02bcae2013-12-08 15:21:08 +01003443fi
Christian Heimes647cd872013-12-07 23:39:33 +01003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3446# it may influence the way we can build extensions, so distutils
3447# needs to check it
3448
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003451EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003452
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003454
3455# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3456# for debug/optimization stuff. BASECFLAGS is for flags that are required
3457# just to get things to compile and link. Users are free to override OPT
3458# when running configure or make. The build should not break if they do.
3459# BASECFLAGS should generally not be messed with, however.
3460
Guido van Rossum8b131c51995-03-09 14:10:13 +00003461# If the user switches compilers, we can't believe the cache
3462if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3463then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003464 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003465(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003466fi
3467
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003468# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3469# when the compiler supports them, but we don't always want -O2, and
3470# we set -g later.
3471if test -z "$CFLAGS"; then
3472 CFLAGS=
3473fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003474
3475if test "$ac_sys_system" = "Darwin"
3476then
3477 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003478 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479 # information
3480 if test -z "${CC}"
3481 then
3482 found_gcc=
3483 found_clang=
3484 as_save_IFS=$IFS; IFS=:
3485 for as_dir in $PATH
3486 do
3487 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003488 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003489 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003490 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 fi
3492 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003493 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003495 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496 fi
3497 fi
3498 done
3499 IFS=$as_save_IFS
3500
3501 if test -n "$found_gcc" -a -n "$found_clang"
3502 then
3503 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3504 then
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3506$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3507 CC="$found_clang"
3508 CXX="$found_clang++"
3509 fi
3510
3511
3512 elif test -z "$found_gcc" -a -n "$found_clang"
3513 then
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3515$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3516 CC="$found_clang"
3517 CXX="$found_clang++"
3518
3519 elif test -z "$found_gcc" -a -z "$found_clang"
3520 then
3521 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3522 if test -n "${found_clang}"
3523 then
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3525$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3526 CC="${found_clang}"
3527 CXX="`/usr/bin/xcrun -find clang++`"
3528
3529 # else: use default behaviour
3530 fi
3531 fi
3532 fi
3533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534ac_ext=c
3535ac_cpp='$CPP $CPPFLAGS'
3536ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3537ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3538ac_compiler_gnu=$ac_cv_c_compiler_gnu
3539if test -n "$ac_tool_prefix"; then
3540 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3541set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3543$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003544if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003546else
3547 if test -n "$CC"; then
3548 ac_cv_prog_CC="$CC" # Let the user override the test.
3549else
Martin v. Löwis11437992002-04-12 09:54:03 +00003550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3551for as_dir in $PATH
3552do
3553 IFS=$as_save_IFS
3554 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 $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 +00003559 break 2
3560 fi
3561done
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003564
Jack Jansendd19cf82001-12-06 22:36:17 +00003565fi
3566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003567CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003568if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3570$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003571else
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3573$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003574fi
3575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576
Martin v. Löwis11437992002-04-12 09:54:03 +00003577fi
3578if test -z "$ac_cv_prog_CC"; then
3579 ac_ct_CC=$CC
3580 # Extract the first word of "gcc", so it can be a program name with args.
3581set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003584if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003586else
3587 if test -n "$ac_ct_CC"; then
3588 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3589else
3590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $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 +00003599 break 2
3600 fi
3601done
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003604
3605fi
3606fi
3607ac_ct_CC=$ac_cv_prog_ac_ct_CC
3608if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3610$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611else
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616 if test "x$ac_ct_CC" = x; then
3617 CC=""
3618 else
3619 case $cross_compiling:$ac_tool_warned in
3620yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623ac_tool_warned=yes ;;
3624esac
3625 CC=$ac_ct_CC
3626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003627else
3628 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003629fi
3630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632 if test -n "$ac_tool_prefix"; then
3633 # 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 +00003634set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3636$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003637if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003639else
3640 if test -n "$CC"; then
3641 ac_cv_prog_CC="$CC" # Let the user override the test.
3642else
Martin v. Löwis11437992002-04-12 09:54:03 +00003643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3644for as_dir in $PATH
3645do
3646 IFS=$as_save_IFS
3647 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $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 +00003652 break 2
3653 fi
3654done
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003657
3658fi
3659fi
3660CC=$ac_cv_prog_CC
3661if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3663$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664else
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3666$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667fi
3668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671fi
3672if test -z "$CC"; then
3673 # Extract the first word of "cc", so it can be a program name with args.
3674set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003677if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003679else
3680 if test -n "$CC"; then
3681 ac_cv_prog_CC="$CC" # Let the user override the test.
3682else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003683 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3685for as_dir in $PATH
3686do
3687 IFS=$as_save_IFS
3688 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3692 ac_prog_rejected=yes
3693 continue
3694 fi
3695 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 $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 +00003697 break 2
3698 fi
3699done
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003702
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703if test $ac_prog_rejected = yes; then
3704 # We found a bogon in the path, so make sure we never use it.
3705 set dummy $ac_cv_prog_CC
3706 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003707 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708 # We chose a different compiler from the bogus one.
3709 # However, it has the same basename, so the bogon will be chosen
3710 # first if we set CC to just the basename; use the full file name.
3711 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003712 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713 fi
3714fi
3715fi
3716fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003717CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3720$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721else
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3723$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724fi
3725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 do
3732 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3733set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003736if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003738else
3739 if test -n "$CC"; then
3740 ac_cv_prog_CC="$CC" # Let the user override the test.
3741else
Martin v. Löwis11437992002-04-12 09:54:03 +00003742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3743for as_dir in $PATH
3744do
3745 IFS=$as_save_IFS
3746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 $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 +00003751 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003752 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753done
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003756
3757fi
3758fi
3759CC=$ac_cv_prog_CC
3760if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3762$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3765$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003766fi
3767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 test -n "$CC" && break
3770 done
3771fi
3772if test -z "$CC"; then
3773 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003775do
3776 # Extract the first word of "$ac_prog", so it can be a program name with args.
3777set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003780if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003782else
3783 if test -n "$ac_ct_CC"; then
3784 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3785else
3786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $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 +00003795 break 2
3796 fi
3797done
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801fi
3802fi
3803ac_ct_CC=$ac_cv_prog_ac_ct_CC
3804if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3806$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3809$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 test -n "$ac_ct_CC" && break
3814done
Michael W. Hudson54241132001-12-07 15:38:26 +00003815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 if test "x$ac_ct_CC" = x; then
3817 CC=""
3818 else
3819 case $cross_compiling:$ac_tool_warned in
3820yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823ac_tool_warned=yes ;;
3824esac
3825 CC=$ac_ct_CC
3826 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003827fi
3828
3829fi
3830
3831
Matthias Kloseb9621712010-04-24 17:59:49 +00003832test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003834as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003835See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836
3837# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003838$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3839set X $ac_compile
3840ac_compiler=$2
3841for ac_option in --version -v -V -qversion; do
3842 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843case "(($ac_try" in
3844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3845 *) ac_try_echo=$ac_try;;
3846esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003847eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3848$as_echo "$ac_try_echo"; } >&5
3849 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003850 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 if test -s conftest.err; then
3852 sed '10a\
3853... rest of stderr output deleted ...
3854 10q' conftest.err >conftest.er1
3855 cat conftest.er1 >&5
3856 fi
3857 rm -f conftest.er1 conftest.err
3858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3859 test $ac_status = 0; }
3860done
Martin v. Löwis11437992002-04-12 09:54:03 +00003861
Matthias Kloseb9621712010-04-24 17:59:49 +00003862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003863/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003864
Martin v. Löwis11437992002-04-12 09:54:03 +00003865int
3866main ()
3867{
3868
3869 ;
3870 return 0;
3871}
3872_ACEOF
3873ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003874ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003875# Try to create an executable without -o first, disregard a.out.
3876# It will help us diagnose broken compilers, and finding out an intuition
3877# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3879$as_echo_n "checking whether the C compiler works... " >&6; }
3880ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3881
3882# The possible output files:
3883ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885ac_rmfiles=
3886for ac_file in $ac_files
3887do
3888 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3891 esac
3892done
3893rm -f $ac_rmfiles
3894
Matthias Kloseb9621712010-04-24 17:59:49 +00003895if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896case "(($ac_try" in
3897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3898 *) ac_try_echo=$ac_try;;
3899esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3901$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3905 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3907# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3908# in a Makefile. We should not override ac_cv_exeext if it was cached,
3909# so that the user can short-circuit this test for compilers unknown to
3910# Autoconf.
3911for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003912do
3913 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003914 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003916 ;;
3917 [ab].out )
3918 # We found the default executable, but exeext='' is most
3919 # certainly right.
3920 break;;
3921 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 then :; else
3924 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3925 fi
3926 # We set ac_cv_exeext here because the later test for it is not
3927 # safe: cross compilers may not add the suffix if given an `-o'
3928 # argument, so we may need to know it at that point already.
3929 # Even if this section looks crufty: it has the advantage of
3930 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003931 break;;
3932 * )
3933 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 esac
3935done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936test "$ac_cv_exeext" = no && ac_cv_exeext=
3937
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003938else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 ac_file=''
3940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003941if test -z "$ac_file"; then :
3942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943$as_echo "no" >&6; }
3944$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003945sed 's/^/| /' conftest.$ac_ext >&5
3946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003949as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003950See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003951else
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3953$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3956$as_echo_n "checking for C compiler default output file name... " >&6; }
3957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3958$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003962ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3964$as_echo_n "checking for suffix of executables... " >&6; }
3965if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3971$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003976 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3977# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3978# work properly (i.e., refer to `conftest.exe'), while it won't with
3979# `rm'.
3980for ac_file in conftest.exe conftest conftest.*; do
3981 test -f "$ac_file" || continue
3982 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3985 break;;
3986 * ) break;;
3987 esac
3988done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989else
Matthias Kloseb9621712010-04-24 17:59:49 +00003990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003992as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003993See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003995rm -f conftest conftest$ac_cv_exeext
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3997$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998
3999rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004000EXEEXT=$ac_cv_exeext
4001ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4003/* end confdefs.h. */
4004#include <stdio.h>
4005int
4006main ()
4007{
4008FILE *f = fopen ("conftest.out", "w");
4009 return ferror (f) || fclose (f) != 0;
4010
4011 ;
4012 return 0;
4013}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004015ac_clean_files="$ac_clean_files conftest.out"
4016# Check that the compiler produces executables we can run. If not, either
4017# the compiler is broken, or we cross compile.
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4019$as_echo_n "checking whether we are cross compiling... " >&6; }
4020if test "$cross_compiling" != yes; then
4021 { { ac_try="$ac_link"
4022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
4026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
4028 (eval "$ac_link") 2>&5
4029 ac_status=$?
4030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }
4032 if { ac_try='./conftest$ac_cv_exeext'
4033 { { case "(($ac_try" in
4034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4035 *) ac_try_echo=$ac_try;;
4036esac
4037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4038$as_echo "$ac_try_echo"; } >&5
4039 (eval "$ac_try") 2>&5
4040 ac_status=$?
4041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4042 test $ac_status = 0; }; }; then
4043 cross_compiling=no
4044 else
4045 if test "$cross_compiling" = maybe; then
4046 cross_compiling=yes
4047 else
4048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004050as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004051If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004052See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 fi
4054 fi
4055fi
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4057$as_echo "$cross_compiling" >&6; }
4058
4059rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4060ac_clean_files=$ac_clean_files_save
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4062$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004063if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo_n "(cached) " >&6
4065else
4066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067/* end confdefs.h. */
4068
4069int
4070main ()
4071{
4072
4073 ;
4074 return 0;
4075}
4076_ACEOF
4077rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004078if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079case "(($ac_try" in
4080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4081 *) ac_try_echo=$ac_try;;
4082esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004083eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4084$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4088 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004089 for ac_file in conftest.o conftest.obj conftest.*; do
4090 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004091 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004093 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4094 break;;
4095 esac
4096done
4097else
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004099sed 's/^/| /' conftest.$ac_ext >&5
4100
Matthias Kloseb9621712010-04-24 17:59:49 +00004101{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004103as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004104See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4109$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004110OBJEXT=$ac_cv_objext
4111ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4113$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004114if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004116else
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004119
Martin v. Löwis11437992002-04-12 09:54:03 +00004120int
4121main ()
4122{
4123#ifndef __GNUC__
4124 choke me
4125#endif
4126
4127 ;
4128 return 0;
4129}
4130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004131if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 ac_compiler_gnu=yes
4133else
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004137ac_cv_c_compiler_gnu=$ac_compiler_gnu
4138
4139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4141$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4142if test $ac_compiler_gnu = yes; then
4143 GCC=yes
4144else
4145 GCC=
4146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004147ac_test_CFLAGS=${CFLAGS+set}
4148ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4150$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004151if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004153else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 ac_save_c_werror_flag=$ac_c_werror_flag
4155 ac_c_werror_flag=yes
4156 ac_cv_prog_cc_g=no
4157 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004160
Martin v. Löwis11437992002-04-12 09:54:03 +00004161int
4162main ()
4163{
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004169if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004170 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 CFLAGS=""
4173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174/* end confdefs.h. */
4175
4176int
4177main ()
4178{
4179
4180 ;
4181 return 0;
4182}
4183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004184if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185
Matthias Kloseb9621712010-04-24 17:59:49 +00004186else
4187 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190/* end confdefs.h. */
4191
4192int
4193main ()
4194{
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4208 ac_c_werror_flag=$ac_save_c_werror_flag
4209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4211$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004214elif test $ac_cv_prog_cc_g = yes; then
4215 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004216 CFLAGS="-g -O2"
4217 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004218 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219 fi
4220else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004221 if test "$GCC" = yes; then
4222 CFLAGS="-O2"
4223 else
4224 CFLAGS=
4225 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4228$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004229if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004230 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004231else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004233ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
4236#include <stdarg.h>
4237#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004238struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004239/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4240struct buf { int x; };
4241FILE * (*rcsopen) (struct buf *, struct stat *, int);
4242static char *e (p, i)
4243 char **p;
4244 int i;
4245{
4246 return p[i];
4247}
4248static char *f (char * (*g) (char **, int), char **p, ...)
4249{
4250 char *s;
4251 va_list v;
4252 va_start (v,p);
4253 s = g (p, va_arg (v,int));
4254 va_end (v);
4255 return s;
4256}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257
4258/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4259 function prototypes and stuff, but not '\xHH' hex character constants.
4260 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4263 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004265int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4268 inside strings and character constants. */
4269#define FOO(x) 'x'
4270int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4271
Skip Montanaro6dead952003-09-25 14:50:04 +00004272int test (int i, double x);
4273struct s1 {int (*f) (int a);};
4274struct s2 {int (*f) (double a);};
4275int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4276int argc;
4277char **argv;
4278int
4279main ()
4280{
4281return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4282 ;
4283 return 0;
4284}
4285_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4287 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004288do
4289 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293rm -f core conftest.err conftest.$ac_objext
4294 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004295done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004297CC=$ac_save_CC
4298
4299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300# AC_CACHE_VAL
4301case "x$ac_cv_prog_cc_c89" in
4302 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4304$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4307$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4311$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004312esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004313if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004314
Matthias Kloseb9621712010-04-24 17:59:49 +00004315fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004316
Martin v. Löwis11437992002-04-12 09:54:03 +00004317ac_ext=c
4318ac_cpp='$CPP $CPPFLAGS'
4319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4321ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004323ac_ext=c
4324ac_cpp='$CPP $CPPFLAGS'
4325ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4326ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4327ac_compiler_gnu=$ac_cv_c_compiler_gnu
4328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4329$as_echo_n "checking how to run the C preprocessor... " >&6; }
4330# On Suns, sometimes $CPP names a directory.
4331if test -n "$CPP" && test -d "$CPP"; then
4332 CPP=
4333fi
4334if test -z "$CPP"; then
4335 if ${ac_cv_prog_CPP+:} false; then :
4336 $as_echo_n "(cached) " >&6
4337else
4338 # Double quotes because CPP needs to be expanded
4339 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4340 do
4341 ac_preproc_ok=false
4342for ac_c_preproc_warn_flag in '' yes
4343do
4344 # Use a header file that comes with gcc, so configuring glibc
4345 # with a fresh cross-compiler works.
4346 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4347 # <limits.h> exists even on freestanding compilers.
4348 # On the NeXT, cc -E runs the code through the compiler's parser,
4349 # not just through cpp. "Syntax error" is here to catch this case.
4350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4351/* end confdefs.h. */
4352#ifdef __STDC__
4353# include <limits.h>
4354#else
4355# include <assert.h>
4356#endif
4357 Syntax error
4358_ACEOF
4359if ac_fn_c_try_cpp "$LINENO"; then :
4360
4361else
4362 # Broken: fails on valid input.
4363continue
4364fi
4365rm -f conftest.err conftest.i conftest.$ac_ext
4366
4367 # OK, works on sane cases. Now check whether nonexistent headers
4368 # can be detected and how.
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370/* end confdefs.h. */
4371#include <ac_nonexistent.h>
4372_ACEOF
4373if ac_fn_c_try_cpp "$LINENO"; then :
4374 # Broken: success on invalid input.
4375continue
4376else
4377 # Passes both tests.
4378ac_preproc_ok=:
4379break
4380fi
4381rm -f conftest.err conftest.i conftest.$ac_ext
4382
4383done
4384# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4385rm -f conftest.i conftest.err conftest.$ac_ext
4386if $ac_preproc_ok; then :
4387 break
4388fi
4389
4390 done
4391 ac_cv_prog_CPP=$CPP
4392
4393fi
4394 CPP=$ac_cv_prog_CPP
4395else
4396 ac_cv_prog_CPP=$CPP
4397fi
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4399$as_echo "$CPP" >&6; }
4400ac_preproc_ok=false
4401for ac_c_preproc_warn_flag in '' yes
4402do
4403 # Use a header file that comes with gcc, so configuring glibc
4404 # with a fresh cross-compiler works.
4405 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4406 # <limits.h> exists even on freestanding compilers.
4407 # On the NeXT, cc -E runs the code through the compiler's parser,
4408 # not just through cpp. "Syntax error" is here to catch this case.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#ifdef __STDC__
4412# include <limits.h>
4413#else
4414# include <assert.h>
4415#endif
4416 Syntax error
4417_ACEOF
4418if ac_fn_c_try_cpp "$LINENO"; then :
4419
4420else
4421 # Broken: fails on valid input.
4422continue
4423fi
4424rm -f conftest.err conftest.i conftest.$ac_ext
4425
4426 # OK, works on sane cases. Now check whether nonexistent headers
4427 # can be detected and how.
4428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429/* end confdefs.h. */
4430#include <ac_nonexistent.h>
4431_ACEOF
4432if ac_fn_c_try_cpp "$LINENO"; then :
4433 # Broken: success on invalid input.
4434continue
4435else
4436 # Passes both tests.
4437ac_preproc_ok=:
4438break
4439fi
4440rm -f conftest.err conftest.i conftest.$ac_ext
4441
4442done
4443# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4444rm -f conftest.i conftest.err conftest.$ac_ext
4445if $ac_preproc_ok; then :
4446
4447else
4448 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4450as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4451See \`config.log' for more details" "$LINENO" 5; }
4452fi
4453
4454ac_ext=c
4455ac_cpp='$CPP $CPPFLAGS'
4456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4458ac_compiler_gnu=$ac_cv_c_compiler_gnu
4459
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4461$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4462if ${ac_cv_path_GREP+:} false; then :
4463 $as_echo_n "(cached) " >&6
4464else
4465 if test -z "$GREP"; then
4466 ac_path_GREP_found=false
4467 # Loop through the user's path and test for each of PROGNAME-LIST
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
4473 for ac_prog in grep ggrep; do
4474 for ac_exec_ext in '' $ac_executable_extensions; do
4475 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4476 as_fn_executable_p "$ac_path_GREP" || continue
4477# Check for GNU ac_path_GREP and select it if it is found.
4478 # Check for GNU $ac_path_GREP
4479case `"$ac_path_GREP" --version 2>&1` in
4480*GNU*)
4481 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4482*)
4483 ac_count=0
4484 $as_echo_n 0123456789 >"conftest.in"
4485 while :
4486 do
4487 cat "conftest.in" "conftest.in" >"conftest.tmp"
4488 mv "conftest.tmp" "conftest.in"
4489 cp "conftest.in" "conftest.nl"
4490 $as_echo 'GREP' >> "conftest.nl"
4491 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4492 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4493 as_fn_arith $ac_count + 1 && ac_count=$as_val
4494 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4495 # Best one so far, save it but keep looking for a better one
4496 ac_cv_path_GREP="$ac_path_GREP"
4497 ac_path_GREP_max=$ac_count
4498 fi
4499 # 10*(2^10) chars as input seems more than enough
4500 test $ac_count -gt 10 && break
4501 done
4502 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4503esac
4504
4505 $ac_path_GREP_found && break 3
4506 done
4507 done
4508 done
4509IFS=$as_save_IFS
4510 if test -z "$ac_cv_path_GREP"; then
4511 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4512 fi
4513else
4514 ac_cv_path_GREP=$GREP
4515fi
4516
4517fi
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4519$as_echo "$ac_cv_path_GREP" >&6; }
4520 GREP="$ac_cv_path_GREP"
4521
4522
Łukasz Langaa785c872016-09-09 17:37:37 -07004523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4524$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4525if ${ac_cv_path_SED+:} false; then :
4526 $as_echo_n "(cached) " >&6
4527else
4528 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4529 for ac_i in 1 2 3 4 5 6 7; do
4530 ac_script="$ac_script$as_nl$ac_script"
4531 done
4532 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4533 { ac_script=; unset ac_script;}
4534 if test -z "$SED"; then
4535 ac_path_SED_found=false
4536 # Loop through the user's path and test for each of PROGNAME-LIST
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
4542 for ac_prog in sed gsed; do
4543 for ac_exec_ext in '' $ac_executable_extensions; do
4544 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4545 as_fn_executable_p "$ac_path_SED" || continue
4546# Check for GNU ac_path_SED and select it if it is found.
4547 # Check for GNU $ac_path_SED
4548case `"$ac_path_SED" --version 2>&1` in
4549*GNU*)
4550 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4551*)
4552 ac_count=0
4553 $as_echo_n 0123456789 >"conftest.in"
4554 while :
4555 do
4556 cat "conftest.in" "conftest.in" >"conftest.tmp"
4557 mv "conftest.tmp" "conftest.in"
4558 cp "conftest.in" "conftest.nl"
4559 $as_echo '' >> "conftest.nl"
4560 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4561 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4562 as_fn_arith $ac_count + 1 && ac_count=$as_val
4563 if test $ac_count -gt ${ac_path_SED_max-0}; then
4564 # Best one so far, save it but keep looking for a better one
4565 ac_cv_path_SED="$ac_path_SED"
4566 ac_path_SED_max=$ac_count
4567 fi
4568 # 10*(2^10) chars as input seems more than enough
4569 test $ac_count -gt 10 && break
4570 done
4571 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4572esac
4573
4574 $ac_path_SED_found && break 3
4575 done
4576 done
4577 done
4578IFS=$as_save_IFS
4579 if test -z "$ac_cv_path_SED"; then
4580 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4581 fi
4582else
4583 ac_cv_path_SED=$SED
4584fi
4585
4586fi
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4588$as_echo "$ac_cv_path_SED" >&6; }
4589 SED="$ac_cv_path_SED"
4590 rm -f conftest.sed
4591
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004592
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594
Matthias Kloseb9621712010-04-24 17:59:49 +00004595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4596$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004599if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004600 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004601
4602 case $withval in
4603 no) with_cxx_main=no
4604 MAINCC='$(CC)';;
4605 yes) with_cxx_main=yes
4606 MAINCC='$(CXX)';;
4607 *) with_cxx_main=yes
4608 MAINCC=$withval
4609 if test -z "$CXX"
4610 then
4611 CXX=$withval
4612 fi;;
4613 esac
4614else
4615
4616 with_cxx_main=no
4617 MAINCC='$(CC)'
4618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004619fi
4620
Matthias Kloseb9621712010-04-24 17:59:49 +00004621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4622$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623
4624preset_cxx="$CXX"
4625if test -z "$CXX"
4626then
4627 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 gcc) if test -n "$ac_tool_prefix"; then
4629 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4630set dummy ${ac_tool_prefix}g++; ac_word=$2
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632$as_echo_n "checking for $ac_word... " >&6; }
4633if ${ac_cv_path_CXX+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635else
4636 case $CXX in
4637 [\\/]* | ?:[\\/]*)
4638 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4639 ;;
4640 *)
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in notfound
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004648 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650 break 2
4651 fi
4652done
4653 done
4654IFS=$as_save_IFS
4655
4656 ;;
4657esac
4658fi
4659CXX=$ac_cv_path_CXX
4660if test -n "$CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4662$as_echo "$CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
4668
4669fi
4670if test -z "$ac_cv_path_CXX"; then
4671 ac_pt_CXX=$CXX
4672 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004676if ${ac_cv_path_ac_pt_CXX+:} false; then :
4677 $as_echo_n "(cached) " >&6
4678else
4679 case $ac_pt_CXX in
4680 [\\/]* | ?:[\\/]*)
4681 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4682 ;;
4683 *)
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685for as_dir in notfound
4686do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004691 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695done
4696 done
4697IFS=$as_save_IFS
4698
4699 ;;
4700esac
4701fi
4702ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4703if test -n "$ac_pt_CXX"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4705$as_echo "$ac_pt_CXX" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711 if test "x$ac_pt_CXX" = x; then
4712 CXX="g++"
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715yes:)
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718ac_tool_warned=yes ;;
4719esac
4720 CXX=$ac_pt_CXX
4721 fi
4722else
4723 CXX="$ac_cv_path_CXX"
4724fi
4725 ;;
4726 cc) if test -n "$ac_tool_prefix"; then
4727 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4728set dummy ${ac_tool_prefix}c++; ac_word=$2
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004731if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733else
4734 case $CXX in
4735 [\\/]* | ?:[\\/]*)
4736 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4737 ;;
4738 *)
4739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in notfound
4741do
4742 IFS=$as_save_IFS
4743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748 break 2
4749 fi
4750done
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754 ;;
4755esac
4756fi
4757CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004758if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4760$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004761else
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766
4767fi
4768if test -z "$ac_cv_path_CXX"; then
4769 ac_pt_CXX=$CXX
4770 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4773$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004779 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 +00004780 ;;
4781 *)
4782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in notfound
4784do
4785 IFS=$as_save_IFS
4786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 break 2
4792 fi
4793done
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 ;;
4798esac
4799fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004800ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4801if test -n "$ac_pt_CXX"; then
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4803$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804else
Matthias Kloseb9621712010-04-24 17:59:49 +00004805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004808
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809 if test "x$ac_pt_CXX" = x; then
4810 CXX="c++"
4811 else
4812 case $cross_compiling:$ac_tool_warned in
4813yes:)
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4815$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4816ac_tool_warned=yes ;;
4817esac
4818 CXX=$ac_pt_CXX
4819 fi
4820else
4821 CXX="$ac_cv_path_CXX"
4822fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 clang|*/clang) if test -n "$ac_tool_prefix"; then
4825 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4826set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4828$as_echo_n "checking for $ac_word... " >&6; }
4829if ${ac_cv_path_CXX+:} false; then :
4830 $as_echo_n "(cached) " >&6
4831else
4832 case $CXX in
4833 [\\/]* | ?:[\\/]*)
4834 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4835 ;;
4836 *)
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in notfound
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848done
4849 done
4850IFS=$as_save_IFS
4851
Ned Deilycbfb9a52012-06-23 16:02:19 -07004852 ;;
4853esac
4854fi
4855CXX=$ac_cv_path_CXX
4856if test -n "$CXX"; then
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4858$as_echo "$CXX" >&6; }
4859else
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4861$as_echo "no" >&6; }
4862fi
4863
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864
4865fi
4866if test -z "$ac_cv_path_CXX"; then
4867 ac_pt_CXX=$CXX
4868 # Extract the first word of "clang++", so it can be a program name with args.
4869set dummy clang++; ac_word=$2
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4871$as_echo_n "checking for $ac_word... " >&6; }
4872if ${ac_cv_path_ac_pt_CXX+:} false; then :
4873 $as_echo_n "(cached) " >&6
4874else
4875 case $ac_pt_CXX in
4876 [\\/]* | ?:[\\/]*)
4877 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4878 ;;
4879 *)
4880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881for as_dir in notfound
4882do
4883 IFS=$as_save_IFS
4884 test -z "$as_dir" && as_dir=.
4885 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004887 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4889 break 2
4890 fi
4891done
4892 done
4893IFS=$as_save_IFS
4894
4895 ;;
4896esac
4897fi
4898ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4899if test -n "$ac_pt_CXX"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4901$as_echo "$ac_pt_CXX" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
4907 if test "x$ac_pt_CXX" = x; then
4908 CXX="clang++"
4909 else
4910 case $cross_compiling:$ac_tool_warned in
4911yes:)
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4914ac_tool_warned=yes ;;
4915esac
4916 CXX=$ac_pt_CXX
4917 fi
4918else
4919 CXX="$ac_cv_path_CXX"
4920fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004921 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004922 icc|*/icc) if test -n "$ac_tool_prefix"; then
4923 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4924set dummy ${ac_tool_prefix}icpc; ac_word=$2
4925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4926$as_echo_n "checking for $ac_word... " >&6; }
4927if ${ac_cv_path_CXX+:} false; then :
4928 $as_echo_n "(cached) " >&6
4929else
4930 case $CXX in
4931 [\\/]* | ?:[\\/]*)
4932 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4933 ;;
4934 *)
4935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4936for as_dir in notfound
4937do
4938 IFS=$as_save_IFS
4939 test -z "$as_dir" && as_dir=.
4940 for ac_exec_ext in '' $ac_executable_extensions; do
4941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4942 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4944 break 2
4945 fi
4946done
4947 done
4948IFS=$as_save_IFS
4949
4950 ;;
4951esac
4952fi
4953CXX=$ac_cv_path_CXX
4954if test -n "$CXX"; then
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4956$as_echo "$CXX" >&6; }
4957else
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4959$as_echo "no" >&6; }
4960fi
4961
4962
4963fi
4964if test -z "$ac_cv_path_CXX"; then
4965 ac_pt_CXX=$CXX
4966 # Extract the first word of "icpc", so it can be a program name with args.
4967set dummy icpc; ac_word=$2
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969$as_echo_n "checking for $ac_word... " >&6; }
4970if ${ac_cv_path_ac_pt_CXX+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972else
4973 case $ac_pt_CXX in
4974 [\\/]* | ?:[\\/]*)
4975 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4976 ;;
4977 *)
4978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4979for as_dir in notfound
4980do
4981 IFS=$as_save_IFS
4982 test -z "$as_dir" && as_dir=.
4983 for ac_exec_ext in '' $ac_executable_extensions; do
4984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4985 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4987 break 2
4988 fi
4989done
4990 done
4991IFS=$as_save_IFS
4992
4993 ;;
4994esac
4995fi
4996ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4997if test -n "$ac_pt_CXX"; then
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4999$as_echo "$ac_pt_CXX" >&6; }
5000else
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
5003fi
5004
5005 if test "x$ac_pt_CXX" = x; then
5006 CXX="icpc"
5007 else
5008 case $cross_compiling:$ac_tool_warned in
5009yes:)
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5011$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5012ac_tool_warned=yes ;;
5013esac
5014 CXX=$ac_pt_CXX
5015 fi
5016else
5017 CXX="$ac_cv_path_CXX"
5018fi
5019 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005020 esac
5021 if test "$CXX" = "notfound"
5022 then
5023 CXX=""
5024 fi
5025fi
5026if test -z "$CXX"
5027then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005028 if test -n "$ac_tool_prefix"; then
5029 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5030 do
5031 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005035if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037else
5038 if test -n "$CXX"; then
5039 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5040else
5041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in $PATH
5043do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005048 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050 break 2
5051 fi
5052done
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005055
5056fi
5057fi
5058CXX=$ac_cv_prog_CXX
5059if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5061$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062else
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005065fi
5066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 test -n "$CXX" && break
5069 done
5070fi
5071if test -z "$CXX"; then
5072 ac_ct_CXX=$CXX
5073 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5074do
5075 # Extract the first word of "$ac_prog", so it can be a program name with args.
5076set dummy $ac_prog; ac_word=$2
5077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5078$as_echo_n "checking for $ac_word... " >&6; }
5079if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5080 $as_echo_n "(cached) " >&6
5081else
5082 if test -n "$ac_ct_CXX"; then
5083 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5084else
5085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086for as_dir in $PATH
5087do
5088 IFS=$as_save_IFS
5089 test -z "$as_dir" && as_dir=.
5090 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005092 ac_cv_prog_ac_ct_CXX="$ac_prog"
5093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5094 break 2
5095 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 done
5098IFS=$as_save_IFS
5099
5100fi
5101fi
5102ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5103if test -n "$ac_ct_CXX"; then
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5105$as_echo "$ac_ct_CXX" >&6; }
5106else
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108$as_echo "no" >&6; }
5109fi
5110
5111
5112 test -n "$ac_ct_CXX" && break
5113done
5114
5115 if test "x$ac_ct_CXX" = x; then
5116 CXX="notfound"
5117 else
5118 case $cross_compiling:$ac_tool_warned in
5119yes:)
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5122ac_tool_warned=yes ;;
5123esac
5124 CXX=$ac_ct_CXX
5125 fi
5126fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005127
5128 if test "$CXX" = "notfound"
5129 then
5130 CXX=""
5131 fi
5132fi
5133if test "$preset_cxx" != "$CXX"
5134then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005135 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136
5137 By default, distutils will build C++ extension modules with \"$CXX\".
5138 If this is not intended, then set CXX on the configure command line.
5139 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005140$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141
5142 By default, distutils will build C++ extension modules with \"$CXX\".
5143 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005144 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005145fi
5146
5147
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5149
5150
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5152$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5153cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005154#undef bfin
5155#undef cris
5156#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005157#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005158#undef hppa
5159#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005160#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005161#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005162#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005163#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005164#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005165#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005166 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005167#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005168# if defined(__x86_64__) && defined(__LP64__)
5169 x86_64-linux-gnu
5170# elif defined(__x86_64__) && defined(__ILP32__)
5171 x86_64-linux-gnux32
5172# elif defined(__i386__)
5173 i386-linux-gnu
5174# elif defined(__aarch64__) && defined(__AARCH64EL__)
5175# if defined(__ILP32__)
5176 aarch64_ilp32-linux-gnu
5177# else
5178 aarch64-linux-gnu
5179# endif
5180# elif defined(__aarch64__) && defined(__AARCH64EB__)
5181# if defined(__ILP32__)
5182 aarch64_be_ilp32-linux-gnu
5183# else
5184 aarch64_be-linux-gnu
5185# endif
5186# elif defined(__alpha__)
5187 alpha-linux-gnu
5188# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5189# if defined(__ARMEL__)
5190 arm-linux-gnueabihf
5191# else
5192 armeb-linux-gnueabihf
5193# endif
5194# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5195# if defined(__ARMEL__)
5196 arm-linux-gnueabi
5197# else
5198 armeb-linux-gnueabi
5199# endif
5200# elif defined(__hppa__)
5201 hppa-linux-gnu
5202# elif defined(__ia64__)
5203 ia64-linux-gnu
5204# elif defined(__m68k__) && !defined(__mcoldfire__)
5205 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005206# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5207# if _MIPS_SIM == _ABIO32
5208 mipsisa32r6el-linux-gnu
5209# elif _MIPS_SIM == _ABIN32
5210 mipsisa64r6el-linux-gnuabin32
5211# elif _MIPS_SIM == _ABI64
5212 mipsisa64r6el-linux-gnuabi64
5213# else
5214# error unknown platform triplet
5215# endif
5216# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5217# if _MIPS_SIM == _ABIO32
5218 mipsisa32r6-linux-gnu
5219# elif _MIPS_SIM == _ABIN32
5220 mipsisa64r6-linux-gnuabin32
5221# elif _MIPS_SIM == _ABI64
5222 mipsisa64r6-linux-gnuabi64
5223# else
5224# error unknown platform triplet
5225# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005226# elif defined(__mips_hard_float) && defined(_MIPSEL)
5227# if _MIPS_SIM == _ABIO32
5228 mipsel-linux-gnu
5229# elif _MIPS_SIM == _ABIN32
5230 mips64el-linux-gnuabin32
5231# elif _MIPS_SIM == _ABI64
5232 mips64el-linux-gnuabi64
5233# else
5234# error unknown platform triplet
5235# endif
5236# elif defined(__mips_hard_float)
5237# if _MIPS_SIM == _ABIO32
5238 mips-linux-gnu
5239# elif _MIPS_SIM == _ABIN32
5240 mips64-linux-gnuabin32
5241# elif _MIPS_SIM == _ABI64
5242 mips64-linux-gnuabi64
5243# else
5244# error unknown platform triplet
5245# endif
5246# elif defined(__or1k__)
5247 or1k-linux-gnu
5248# elif defined(__powerpc__) && defined(__SPE__)
5249 powerpc-linux-gnuspe
5250# elif defined(__powerpc64__)
5251# if defined(__LITTLE_ENDIAN__)
5252 powerpc64le-linux-gnu
5253# else
5254 powerpc64-linux-gnu
5255# endif
5256# elif defined(__powerpc__)
5257 powerpc-linux-gnu
5258# elif defined(__s390x__)
5259 s390x-linux-gnu
5260# elif defined(__s390__)
5261 s390-linux-gnu
5262# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5263 sh4-linux-gnu
5264# elif defined(__sparc__) && defined(__arch64__)
5265 sparc64-linux-gnu
5266# elif defined(__sparc__)
5267 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005268# elif defined(__riscv)
5269# if __riscv_xlen == 32
5270 riscv32-linux-gnu
5271# elif __riscv_xlen == 64
5272 riscv64-linux-gnu
5273# else
5274# error unknown platform triplet
5275# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005276# else
5277# error unknown platform triplet
5278# endif
5279#elif defined(__FreeBSD_kernel__)
5280# if defined(__LP64__)
5281 x86_64-kfreebsd-gnu
5282# elif defined(__i386__)
5283 i386-kfreebsd-gnu
5284# else
5285# error unknown platform triplet
5286# endif
5287#elif defined(__gnu_hurd__)
5288 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005289#elif defined(__APPLE__)
5290 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005291#elif defined(__VXWORKS__)
5292 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293#else
5294# error unknown platform triplet
5295#endif
5296
5297EOF
5298
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005299if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5302$as_echo "$PLATFORM_TRIPLET" >&6; }
5303else
5304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5305$as_echo "none" >&6; }
5306fi
5307rm -f conftest.c conftest.out
5308
5309if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5310 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5311 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5312 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005313elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5314 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005316
doko@ubuntu.com55532312016-06-14 08:55:19 +02005317if test x$MULTIARCH != x; then
5318 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5319fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320
5321
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5323$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5324save_LDFLAGS="$LDFLAGS"
5325LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005326
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5328/* end confdefs.h. */
5329
5330int
5331main ()
5332{
5333
5334 ;
5335 return 0;
5336}
5337_ACEOF
5338if ac_fn_c_try_link "$LINENO"; then :
5339 NO_AS_NEEDED="-Wl,--no-as-needed"
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5341$as_echo "yes" >&6; }
5342else
5343 NO_AS_NEEDED=""
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347rm -f core conftest.err conftest.$ac_objext \
5348 conftest$ac_exeext conftest.$ac_ext
5349LDFLAGS="$save_LDFLAGS"
5350
5351
5352
5353# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354
Matthias Kloseb9621712010-04-24 17:59:49 +00005355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5356$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005357if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359else
5360 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5361 then ac_cv_path_EGREP="$GREP -E"
5362 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 # Loop through the user's path and test for each of PROGNAME-LIST
5366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005367for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5368do
5369 IFS=$as_save_IFS
5370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 for ac_prog in egrep; do
5372 for ac_exec_ext in '' $ac_executable_extensions; do
5373 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005374 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005375# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 # Check for GNU $ac_path_EGREP
5377case `"$ac_path_EGREP" --version 2>&1` in
5378*GNU*)
5379 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5380*)
5381 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 while :
5384 do
5385 cat "conftest.in" "conftest.in" >"conftest.tmp"
5386 mv "conftest.tmp" "conftest.in"
5387 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5390 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5393 # Best one so far, save it but keep looking for a better one
5394 ac_cv_path_EGREP="$ac_path_EGREP"
5395 ac_path_EGREP_max=$ac_count
5396 fi
5397 # 10*(2^10) chars as input seems more than enough
5398 test $ac_count -gt 10 && break
5399 done
5400 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5401esac
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $ac_path_EGREP_found && break 3
5404 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005409 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 +00005410 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411else
5412 ac_cv_path_EGREP=$EGREP
5413fi
5414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 fi
5416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5418$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005420
5421
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5423$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005424if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 $as_echo_n "(cached) " >&6
5426else
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005428/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005429#include <stdlib.h>
5430#include <stdarg.h>
5431#include <string.h>
5432#include <float.h>
5433
5434int
5435main ()
5436{
5437
5438 ;
5439 return 0;
5440}
5441_ACEOF
5442if ac_fn_c_try_compile "$LINENO"; then :
5443 ac_cv_header_stdc=yes
5444else
5445 ac_cv_header_stdc=no
5446fi
5447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5448
5449if test $ac_cv_header_stdc = yes; then
5450 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452/* end confdefs.h. */
5453#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005454
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005455_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005459else
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005461fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005462rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
Matthias Kloseb9621712010-04-24 17:59:49 +00005464fi
5465
5466if test $ac_cv_header_stdc = yes; then
5467 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470#include <stdlib.h>
5471
5472_ACEOF
5473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5474 $EGREP "free" >/dev/null 2>&1; then :
5475
5476else
5477 ac_cv_header_stdc=no
5478fi
5479rm -f conftest*
5480
5481fi
5482
5483if test $ac_cv_header_stdc = yes; then
5484 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5485 if test "$cross_compiling" = yes; then :
5486 :
5487else
5488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5489/* end confdefs.h. */
5490#include <ctype.h>
5491#include <stdlib.h>
5492#if ((' ' & 0x0FF) == 0x020)
5493# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5494# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5495#else
5496# define ISLOWER(c) \
5497 (('a' <= (c) && (c) <= 'i') \
5498 || ('j' <= (c) && (c) <= 'r') \
5499 || ('s' <= (c) && (c) <= 'z'))
5500# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5501#endif
5502
5503#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5504int
5505main ()
5506{
5507 int i;
5508 for (i = 0; i < 256; i++)
5509 if (XOR (islower (i), ISLOWER (i))
5510 || toupper (i) != TOUPPER (i))
5511 return 2;
5512 return 0;
5513}
5514_ACEOF
5515if ac_fn_c_try_run "$LINENO"; then :
5516
5517else
5518 ac_cv_header_stdc=no
5519fi
5520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5521 conftest.$ac_objext conftest.beam conftest.$ac_ext
5522fi
5523
5524fi
5525fi
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5527$as_echo "$ac_cv_header_stdc" >&6; }
5528if test $ac_cv_header_stdc = yes; then
5529
5530$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5531
5532fi
5533
5534# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5535for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5536 inttypes.h stdint.h unistd.h
5537do :
5538 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5539ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5540"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005541if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005542 cat >>confdefs.h <<_ACEOF
5543#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5544_ACEOF
5545
5546fi
5547
5548done
5549
5550
5551
5552 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 +02005553if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 MINIX=yes
5555else
5556 MINIX=
5557fi
5558
5559
5560 if test "$MINIX" = yes; then
5561
5562$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5563
5564
5565$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5566
5567
5568$as_echo "#define _MINIX 1" >>confdefs.h
5569
5570 fi
5571
5572
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5574$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005575if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 $as_echo_n "(cached) " >&6
5577else
5578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5579/* end confdefs.h. */
5580
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005581# define __EXTENSIONS__ 1
5582 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005583int
5584main ()
5585{
5586
5587 ;
5588 return 0;
5589}
5590_ACEOF
5591if ac_fn_c_try_compile "$LINENO"; then :
5592 ac_cv_safe_to_define___extensions__=yes
5593else
5594 ac_cv_safe_to_define___extensions__=no
5595fi
5596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5597fi
5598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5599$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5600 test $ac_cv_safe_to_define___extensions__ = yes &&
5601 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5602
5603 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5604
5605 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5606
5607 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5608
5609 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5610
5611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5614$as_echo_n "checking for the Android API level... " >&6; }
5615cat >> conftest.c <<EOF
5616#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005617android_api = __ANDROID_API__
5618arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619#else
5620#error not Android
5621#endif
5622EOF
5623
5624if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005625 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5626 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5628$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005629 if test -z "$ANDROID_API_LEVEL"; then
5630 echo 'Fatal: you must define __ANDROID_API__'
5631 exit 1
5632 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633
5634cat >>confdefs.h <<_ACEOF
5635#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5636_ACEOF
5637
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5640$as_echo_n "checking for the Android arm ABI... " >&6; }
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5642$as_echo "$_arm_arch" >&6; }
5643 if test "$_arm_arch" = 7; then
5644 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5645 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5646 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005647else
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5649$as_echo "not Android" >&6; }
5650fi
5651rm -f conftest.c conftest.out
5652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653# Check for unsupported systems
5654case $ac_sys_system/$ac_sys_release in
5655atheos*|Linux*/1*)
5656 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5657 echo See README for details.
5658 exit 1;;
5659esac
5660
5661
Matthias Kloseb9621712010-04-24 17:59:49 +00005662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5663$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664
5665# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005666if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 withval=$with_suffix;
5668 case $withval in
5669 no) EXEEXT=;;
5670 yes) EXEEXT=.exe;;
5671 *) EXEEXT=$withval;;
5672 esac
5673fi
5674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5676$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677
5678# Test whether we're running on a non-case-sensitive system, in which
5679# case we give a warning if no ext is given
5680
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5682$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683if test ! -d CaseSensitiveTestDir; then
5684mkdir CaseSensitiveTestDir
5685fi
5686
5687if test -d casesensitivetestdir
5688then
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5690$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691 BUILDEXEEXT=.exe
5692else
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695 BUILDEXEEXT=$EXEEXT
5696fi
5697rmdir CaseSensitiveTestDir
5698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699case $ac_sys_system in
5700hp*|HP*)
5701 case $CC in
5702 cc|*/cc) CC="$CC -Ae";;
5703 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704esac
5705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5708$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709if test -z "$LIBRARY"
5710then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005711 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5714$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
5716# LDLIBRARY is the name of the library to link against (as opposed to the
5717# name of the library into which to insert object files). BLDLIBRARY is also
5718# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5719# is blank as the main program is not linked directly against LDLIBRARY.
5720# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5721# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5722# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5723# DLLLIBRARY is the shared (i.e., DLL) library.
5724#
5725# RUNSHARED is used to run shared python without installed libraries
5726#
5727# INSTSONAME is the name of the shared library that will be use to install
5728# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005729#
5730# LDVERSION is the shared library version number, normally the Python version
5731# with the ABI build flags appended.
5732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734
5735
5736
5737
5738
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740LDLIBRARY="$LIBRARY"
5741BLDLIBRARY='$(LDLIBRARY)'
5742INSTSONAME='$(LDLIBRARY)'
5743DLLLIBRARY=''
5744LDLIBRARYDIR=''
5745RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005746LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# LINKCC is the command that links the python executable -- default is $(CC).
5749# If CXX is set, and if it is needed to link a main function that was
5750# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5751# python might then depend on the C++ runtime
5752# This is altered for AIX in order to build the export list before
5753# linking.
5754
Matthias Kloseb9621712010-04-24 17:59:49 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5756$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757if test -z "$LINKCC"
5758then
5759 LINKCC='$(PURIFY) $(MAINCC)'
5760 case $ac_sys_system in
5761 AIX*)
5762 exp_extra="\"\""
5763 if test $ac_sys_release -ge 5 -o \
5764 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5765 exp_extra="."
5766 fi
5767 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 QNX*)
5769 # qcc must be used because the other compilers do not
5770 # support -N.
5771 LINKCC=qcc;;
5772 esac
5773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5775$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5778# make sure we default having it set to "no": this is used by
5779# distutils.unixccompiler to know if it should add --enable-new-dtags
5780# to linker command lines, and failing to detect GNU ld simply results
5781# in the same bahaviour as before.
5782
Matthias Kloseb9621712010-04-24 17:59:49 +00005783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5784$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785ac_prog=ld
5786if test "$GCC" = yes; then
5787 ac_prog=`$CC -print-prog-name=ld`
5788fi
5789case `"$ac_prog" -V 2>&1 < /dev/null` in
5790 *GNU*)
5791 GNULD=yes;;
5792 *)
5793 GNULD=no;;
5794esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5796$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
Matthias Kloseb9621712010-04-24 17:59:49 +00005798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5799$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005801if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802 enableval=$enable_shared;
5803fi
5804
5805
5806if test -z "$enable_shared"
5807then
5808 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005809 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810 enable_shared="yes";;
5811 *)
5812 enable_shared="no";;
5813 esac
5814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5816$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5819$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005821if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005822 enableval=$enable_profiling;
5823fi
5824
5825if test "x$enable_profiling" = xyes; then
5826 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005827 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829/* end confdefs.h. */
5830int main() { return 0; }
5831_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832if ac_fn_c_try_link "$LINENO"; then :
5833
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005835 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837rm -f core conftest.err conftest.$ac_objext \
5838 conftest$ac_exeext conftest.$ac_ext
5839 CC="$ac_save_cc"
5840else
5841 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5844$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846if test "x$enable_profiling" = xyes; then
5847 BASECFLAGS="-pg $BASECFLAGS"
5848 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
5850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5852$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853
5854# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5855# library that we build, but we do not want to link against it (we
5856# will find it with a -framework option). For this reason there is an
5857# extra variable BLDLIBRARY against which Python and the extension
5858# modules are linked, BLDLIBRARY. This is normally the same as
5859# LDLIBRARY, but empty for MacOSX framework builds.
5860if test "$enable_framework"
5861then
5862 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005863 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 BLDLIBRARY=''
5865else
5866 BLDLIBRARY='$(LDLIBRARY)'
5867fi
5868
5869# Other platforms follow
5870if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005871 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
Matthias Kloseb9621712010-04-24 17:59:49 +00005873$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
5875 case $ac_sys_system in
5876 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 LDLIBRARY='libpython$(LDVERSION).dll.a'
5878 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 ;;
5880 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005881 LDLIBRARY='libpython$(LDVERSION).so'
5882 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005883 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005885 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005886 then
5887 PY3LIBRARY=libpython3.so
5888 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005890 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005891 LDLIBRARY='libpython$(LDVERSION).so'
5892 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005893 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005895 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005896 then
5897 PY3LIBRARY=libpython3.so
5898 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ;;
5900 hp*|HP*)
5901 case `uname -m` in
5902 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ;;
5908 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005910 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).dylib'
5914 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005917 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005920 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921
5922 esac
5923else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005924 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 case $ac_sys_system in
5926 CYGWIN*)
5927 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005928 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 esac
5931fi
5932
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005933if test "$cross_compiling" = yes; then
5934 RUNSHARED=
5935fi
5936
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5938$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005941if test -n "$ac_tool_prefix"; then
5942 for ac_prog in ar aal
5943 do
5944 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5945set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5947$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005948if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950else
5951 if test -n "$AR"; then
5952 ac_cv_prog_AR="$AR" # Let the user override the test.
5953else
5954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957 IFS=$as_save_IFS
5958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005961 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 break 2
5964 fi
5965done
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967IFS=$as_save_IFS
5968
5969fi
5970fi
5971AR=$ac_cv_prog_AR
5972if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5974$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975else
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978fi
5979
5980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005981 test -n "$AR" && break
5982 done
5983fi
5984if test -z "$AR"; then
5985 ac_ct_AR=$AR
5986 for ac_prog in ar aal
5987do
5988 # Extract the first word of "$ac_prog", so it can be a program name with args.
5989set dummy $ac_prog; ac_word=$2
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if ${ac_cv_prog_ac_ct_AR+:} false; then :
5993 $as_echo_n "(cached) " >&6
5994else
5995 if test -n "$ac_ct_AR"; then
5996 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001 IFS=$as_save_IFS
6002 test -z "$as_dir" && as_dir=.
6003 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006005 ac_cv_prog_ac_ct_AR="$ac_prog"
6006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6007 break 2
6008 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 done
6011IFS=$as_save_IFS
6012
6013fi
6014fi
6015ac_ct_AR=$ac_cv_prog_ac_ct_AR
6016if test -n "$ac_ct_AR"; then
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6018$as_echo "$ac_ct_AR" >&6; }
6019else
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
6022fi
6023
6024
6025 test -n "$ac_ct_AR" && break
6026done
6027
6028 if test "x$ac_ct_AR" = x; then
6029 AR="ar"
6030 else
6031 case $cross_compiling:$ac_tool_warned in
6032yes:)
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6035ac_tool_warned=yes ;;
6036esac
6037 AR=$ac_ct_AR
6038 fi
6039fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040
6041
6042# tweak ARFLAGS only if the user didn't set it on the command line
6043
6044if test -z "$ARFLAGS"
6045then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006046 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047fi
6048
doko@ubuntu.com58844492012-06-30 18:25:32 +02006049if test -n "$ac_tool_prefix"; then
6050 for ac_prog in readelf
6051 do
6052 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6053set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6055$as_echo_n "checking for $ac_word... " >&6; }
6056if ${ac_cv_prog_READELF+:} false; then :
6057 $as_echo_n "(cached) " >&6
6058else
6059 if test -n "$READELF"; then
6060 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6061else
6062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065 IFS=$as_save_IFS
6066 test -z "$as_dir" && as_dir=.
6067 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006069 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071 break 2
6072 fi
6073done
6074 done
6075IFS=$as_save_IFS
6076
6077fi
6078fi
6079READELF=$ac_cv_prog_READELF
6080if test -n "$READELF"; then
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6082$as_echo "$READELF" >&6; }
6083else
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6085$as_echo "no" >&6; }
6086fi
6087
6088
6089 test -n "$READELF" && break
6090 done
6091fi
6092if test -z "$READELF"; then
6093 ac_ct_READELF=$READELF
6094 for ac_prog in readelf
6095do
6096 # Extract the first word of "$ac_prog", so it can be a program name with args.
6097set dummy $ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102else
6103 if test -n "$ac_ct_READELF"; then
6104 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6105else
6106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006113 ac_cv_prog_ac_ct_READELF="$ac_prog"
6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115 break 2
6116 fi
6117done
6118 done
6119IFS=$as_save_IFS
6120
6121fi
6122fi
6123ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6124if test -n "$ac_ct_READELF"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6126$as_echo "$ac_ct_READELF" >&6; }
6127else
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133 test -n "$ac_ct_READELF" && break
6134done
6135
6136 if test "x$ac_ct_READELF" = x; then
6137 READELF=":"
6138 else
6139 case $cross_compiling:$ac_tool_warned in
6140yes:)
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6143ac_tool_warned=yes ;;
6144esac
6145 READELF=$ac_ct_READELF
6146 fi
6147fi
6148
6149if test "$cross_compiling" = yes; then
6150 case "$READELF" in
6151 readelf|:)
6152 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6153 ;;
6154 esac
6155fi
6156
6157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006160hp*|HP*)
6161 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162 if test -z "$INSTALL"
6163 then
6164 INSTALL="${srcdir}/install-sh -c"
6165 fi
6166esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167# Find a good install program. We prefer a C program (faster),
6168# so one script is as good as another. But avoid the broken or
6169# incompatible versions:
6170# SysV /etc/install, /usr/sbin/install
6171# SunOS /usr/etc/install
6172# IRIX /sbin/install
6173# AIX /bin/install
6174# AmigaOS /C/install, which installs bootblocks on floppy discs
6175# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6176# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6177# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6178# OS/2's system install, which has a completely different semantic
6179# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006180# Reject install programs that cannot install multiple files.
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6182$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006184if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186else
6187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 # Account for people who put trailing slashes in PATH elements.
6193case $as_dir/ in #((
6194 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197 /usr/ucb/* ) ;;
6198 *)
6199 # OSF1 and SCO ODT 3.0 have their own names for install.
6200 # Don't use installbsd from OSF since it installs stuff as root
6201 # by default.
6202 for ac_prog in ginstall scoinst install; do
6203 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006204 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006205 if test $ac_prog = install &&
6206 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6207 # AIX install. It has an incompatible calling convention.
6208 :
6209 elif test $ac_prog = install &&
6210 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6211 # program-specific install script used by HP pwplus--don't use.
6212 :
6213 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 rm -rf conftest.one conftest.two conftest.dir
6215 echo one > conftest.one
6216 echo two > conftest.two
6217 mkdir conftest.dir
6218 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6219 test -s conftest.one && test -s conftest.two &&
6220 test -s conftest.dir/conftest.one &&
6221 test -s conftest.dir/conftest.two
6222 then
6223 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6224 break 3
6225 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226 fi
6227 fi
6228 done
6229 done
6230 ;;
6231esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006232
6233 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234IFS=$as_save_IFS
6235
Matthias Kloseb9621712010-04-24 17:59:49 +00006236rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
6238fi
6239 if test "${ac_cv_path_install+set}" = set; then
6240 INSTALL=$ac_cv_path_install
6241 else
6242 # As a last resort, use the slow shell script. Don't cache a
6243 # value for INSTALL within a source directory, because that will
6244 # break other packages using the cache if that directory is
6245 # removed, or if the value is a relative name.
6246 INSTALL=$ac_install_sh
6247 fi
6248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6250$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251
6252# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6253# It thinks the first close brace ends the variable substitution.
6254test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6255
6256test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6257
6258test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6259
Matthias Klose93a0ef12012-03-15 18:08:34 +01006260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6261$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6262if test -z "$MKDIR_P"; then
6263 if ${ac_cv_path_mkdir+:} false; then :
6264 $as_echo_n "(cached) " >&6
6265else
6266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6268do
6269 IFS=$as_save_IFS
6270 test -z "$as_dir" && as_dir=.
6271 for ac_prog in mkdir gmkdir; do
6272 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006273 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006274 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6275 'mkdir (GNU coreutils) '* | \
6276 'mkdir (coreutils) '* | \
6277 'mkdir (fileutils) '4.1*)
6278 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6279 break 3;;
6280 esac
6281 done
6282 done
6283 done
6284IFS=$as_save_IFS
6285
6286fi
6287
6288 test -d ./--version && rmdir ./--version
6289 if test "${ac_cv_path_mkdir+set}" = set; then
6290 MKDIR_P="$ac_cv_path_mkdir -p"
6291 else
6292 # As a last resort, use the slow shell script. Don't cache a
6293 # value for MKDIR_P within a source directory, because that will
6294 # break other packages using the cache if that directory is
6295 # removed, or if the value is a relative name.
6296 MKDIR_P="$ac_install_sh -d"
6297 fi
6298fi
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6300$as_echo "$MKDIR_P" >&6; }
6301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302
6303# Not every filesystem supports hard links
6304
6305if test -z "$LN" ; then
6306 case $ac_sys_system in
6307 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 *) LN=ln;;
6309 esac
6310fi
6311
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006312# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006313
6314ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006315
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6318$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319
6320# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006321if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 withval=$with_pydebug;
6323if test "$withval" != no
6324then
6325
Matthias Kloseb9621712010-04-24 17:59:49 +00006326$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6329$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006331 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006332else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334fi
6335else
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338fi
6339
6340
Victor Stinnerf4e47032019-04-25 00:56:28 +02006341# Check for --with-trace-refs
6342# --with-trace-refs
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6344$as_echo_n "checking for --with-trace-refs... " >&6; }
6345
6346# Check whether --with-trace-refs was given.
6347if test "${with_trace_refs+set}" = set; then :
6348 withval=$with_trace_refs;
6349else
6350 with_trace_refs=no
6351fi
6352
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6354$as_echo "$with_trace_refs" >&6; }
6355
6356if test "$with_trace_refs" = "yes"
6357then
6358
6359$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6360
6361fi
6362
6363# Check for --with-assertions.
6364# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006365assertions='false'
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6367$as_echo_n "checking for --with-assertions... " >&6; }
6368
6369# Check whether --with-assertions was given.
6370if test "${with_assertions+set}" = set; then :
6371 withval=$with_assertions;
6372if test "$withval" != no
6373then
6374 assertions='true'
6375fi
6376fi
6377
6378if test "$assertions" = 'true'; then
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6380$as_echo "yes" >&6; }
6381elif test "$Py_DEBUG" = 'true'; then
6382 assertions='true'
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6384$as_echo "implied by --with-pydebug" >&6; }
6385else
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
Brett Cannon63d98bc2016-09-06 17:12:40 -07006390# Enable optimization flags
6391
6392
6393Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6395$as_echo_n "checking for --enable-optimizations... " >&6; }
6396# Check whether --enable-optimizations was given.
6397if test "${enable_optimizations+set}" = set; then :
6398 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006399if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006400then
6401 Py_OPT='true'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
6404else
6405 Py_OPT='false'
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; };
6408fi
6409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006415 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6416 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006417 # 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 +00006418 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006419 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006420 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006421 DEF_MAKE_RULE="build_all"
6422else
6423 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006424 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006425 DEF_MAKE_RULE="all"
6426fi
6427
Miss Islington (bot)24066722019-07-22 13:17:23 -07006428
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6430$as_echo_n "checking PROFILE_TASK... " >&6; }
6431if test -z "$PROFILE_TASK"
6432then
6433 PROFILE_TASK='-m test --pgo'
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6436$as_echo "$PROFILE_TASK" >&6; }
6437
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006438# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6439# normal names in the default $PATH (ie: Ubuntu). They exist under the
6440# non-suffixed name in their versioned llvm directory.
6441
6442llvm_bin_dir=''
6443llvm_path="${PATH}"
6444if test "${CC}" = "clang"
6445then
6446 clang_bin=`which clang`
6447 # Some systems install clang elsewhere as a symlink to the real path
6448 # which is where the related llvm tools are located.
6449 if test -L "${clang_bin}"
6450 then
6451 clang_dir=`dirname "${clang_bin}"`
6452 clang_bin=`readlink "${clang_bin}"`
6453 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6454 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6455 fi
6456fi
6457
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006458# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6460$as_echo_n "checking for --with-lto... " >&6; }
6461
6462# Check whether --with-lto was given.
6463if test "${with_lto+set}" = set; then :
6464 withval=$with_lto;
6465if test "$withval" != no
6466then
6467 Py_LTO='true'
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6469$as_echo "yes" >&6; };
6470else
6471 Py_LTO='false'
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; };
6474fi
6475else
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; }
6478fi
6479
6480if test "$Py_LTO" = 'true' ; then
6481 case $CC in
6482 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006483
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006484 if test -n "$ac_tool_prefix"; then
6485 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6486set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_LLVM_AR+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491else
6492 case $LLVM_AR in
6493 [\\/]* | ?:[\\/]*)
6494 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6495 ;;
6496 *)
6497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in ${llvm_path}
6499do
6500 IFS=$as_save_IFS
6501 test -z "$as_dir" && as_dir=.
6502 for ac_exec_ext in '' $ac_executable_extensions; do
6503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506 break 2
6507 fi
6508done
6509 done
6510IFS=$as_save_IFS
6511
6512 ;;
6513esac
6514fi
6515LLVM_AR=$ac_cv_path_LLVM_AR
6516if test -n "$LLVM_AR"; then
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6518$as_echo "$LLVM_AR" >&6; }
6519else
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006525fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006526if test -z "$ac_cv_path_LLVM_AR"; then
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006527 ac_pt_LLVM_AR=$LLVM_AR
6528 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006529set dummy llvm-ar; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534else
6535 case $ac_pt_LLVM_AR in
6536 [\\/]* | ?:[\\/]*)
6537 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6538 ;;
6539 *)
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in ${llvm_path}
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551done
6552 done
6553IFS=$as_save_IFS
6554
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006555 ;;
6556esac
6557fi
6558ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6559if test -n "$ac_pt_LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6561$as_echo "$ac_pt_LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006567 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006568 LLVM_AR="''"
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006569 else
6570 case $cross_compiling:$ac_tool_warned in
6571yes:)
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6574ac_tool_warned=yes ;;
6575esac
6576 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006577 fi
6578else
6579 LLVM_AR="$ac_cv_path_LLVM_AR"
6580fi
6581
6582
6583 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6584 then
6585 LLVM_AR_FOUND="found"
6586 else
6587 LLVM_AR_FOUND="not-found"
6588 fi
6589 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6590 then
6591 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6592 if test -n "${found_llvm_ar}"
6593 then
6594 LLVM_AR='/usr/bin/xcrun llvm-ar'
6595 LLVM_AR_FOUND=found
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6597$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6598 fi
6599 fi
6600 if test $LLVM_AR_FOUND = not-found
6601 then
6602 LLVM_PROFR_ERR=yes
6603 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6604 else
6605 LLVM_AR_ERR=no
6606 fi
6607 AR="${LLVM_AR}"
6608 case $ac_sys_system in
6609 Darwin*)
6610 # Any changes made here should be reflected in the GCC+Darwin case below
6611 LTOFLAGS="-flto -Wl,-export_dynamic"
6612 ;;
6613 *)
6614 LTOFLAGS="-flto"
6615 ;;
6616 esac
6617 ;;
6618 *gcc*)
6619 case $ac_sys_system in
6620 Darwin*)
6621 LTOFLAGS="-flto -Wl,-export_dynamic"
6622 ;;
6623 *)
6624 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6625 ;;
6626 esac
6627 ;;
6628 esac
6629
6630 if test "$ac_cv_prog_cc_g" = "yes"
6631 then
6632 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6633 # to get debug symbols.
6634 LTOFLAGS="$LTOFLAGS -g"
6635 fi
6636
stratakisf92c7aa2018-12-04 15:54:01 +01006637 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006638 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006639fi
6640
6641# Enable PGO flags.
6642
6643
6644
6645
6646
6647
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006648if test -n "$ac_tool_prefix"; then
6649 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6650set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6652$as_echo_n "checking for $ac_word... " >&6; }
6653if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6654 $as_echo_n "(cached) " >&6
6655else
6656 case $LLVM_PROFDATA in
6657 [\\/]* | ?:[\\/]*)
6658 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6659 ;;
6660 *)
6661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663do
6664 IFS=$as_save_IFS
6665 test -z "$as_dir" && as_dir=.
6666 for ac_exec_ext in '' $ac_executable_extensions; do
6667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6670 break 2
6671 fi
6672done
6673 done
6674IFS=$as_save_IFS
6675
Gregory P. Smith799520c2016-09-07 16:10:00 -07006676 ;;
6677esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006678fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006679LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6680if test -n "$LLVM_PROFDATA"; then
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6682$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683else
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685$as_echo "no" >&6; }
6686fi
6687
6688
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006689fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006690if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006691 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6692 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006693set dummy llvm-profdata; ac_word=$2
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695$as_echo_n "checking for $ac_word... " >&6; }
6696if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6697 $as_echo_n "(cached) " >&6
6698else
6699 case $ac_pt_LLVM_PROFDATA in
6700 [\\/]* | ?:[\\/]*)
6701 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6702 ;;
6703 *)
6704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6705for as_dir in ${llvm_path}
6706do
6707 IFS=$as_save_IFS
6708 test -z "$as_dir" && as_dir=.
6709 for ac_exec_ext in '' $ac_executable_extensions; do
6710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6711 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6713 break 2
6714 fi
6715done
6716 done
6717IFS=$as_save_IFS
6718
Gregory P. Smith799520c2016-09-07 16:10:00 -07006719 ;;
6720esac
6721fi
6722ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6723if test -n "$ac_pt_LLVM_PROFDATA"; then
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6725$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6726else
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6728$as_echo "no" >&6; }
6729fi
6730
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006731 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006732 LLVM_PROFDATA="''"
Miss Islington (bot)97d7ba42019-09-13 07:50:43 -07006733 else
6734 case $cross_compiling:$ac_tool_warned in
6735yes:)
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6738ac_tool_warned=yes ;;
6739esac
6740 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006741 fi
6742else
6743 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6744fi
6745
6746
6747if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6748then
6749 LLVM_PROF_FOUND="found"
6750else
6751 LLVM_PROF_FOUND="not-found"
6752fi
6753if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6754then
6755 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6756 if test -n "${found_llvm_profdata}"
6757 then
6758 # llvm-profdata isn't directly in $PATH in some cases.
6759 # https://apple.stackexchange.com/questions/197053/
6760 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6761 LLVM_PROF_FOUND=found
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6763$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6764 fi
6765fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006766LLVM_PROF_ERR=no
6767case $CC in
6768 *clang*)
6769 # Any changes made here should be reflected in the GCC+Darwin case below
6770 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6771 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006772 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006773 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6774 if test $LLVM_PROF_FOUND = not-found
6775 then
6776 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 if test "${REQUIRE_PGO}" = "yes"
6778 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006779 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 -07006780 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006781 fi
6782 ;;
6783 *gcc*)
6784 case $ac_sys_system in
6785 Darwin*)
6786 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6787 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006788 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006789 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006791 then
6792 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006793 if test "${REQUIRE_PGO}" = "yes"
6794 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006795 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 -07006796 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797 fi
6798 ;;
6799 *)
6800 PGO_PROF_GEN_FLAG="-fprofile-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6802 LLVM_PROF_MERGER="true"
6803 LLVM_PROF_FILE=""
6804 ;;
6805 esac
6806 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006807 *icc*)
6808 PGO_PROF_GEN_FLAG="-prof-gen"
6809 PGO_PROF_USE_FLAG="-prof-use"
6810 LLVM_PROF_MERGER="true"
6811 LLVM_PROF_FILE=""
6812 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813esac
6814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6816# merged with this chunk of code?
6817
6818# Optimizer/debugger flags
6819# ------------------------
6820# (The following bit of code is complicated enough - please keep things
6821# indented properly. Just pretend you're editing Python code. ;-)
6822
6823# There are two parallel sets of case statements below, one that checks to
6824# see if OPT was set and one that does BASECFLAGS setting based upon
6825# compiler and platform. BASECFLAGS tweaks need to be made even if the
6826# user set OPT.
6827
Victor Stinner23a683a2019-04-12 21:27:37 +02006828case $CC in
6829 *clang*)
6830 cc_is_clang=1
6831 ;;
6832 *)
6833 if $CC --version 2>&1 | grep -q clang
6834 then
6835 cc_is_clang=1
6836 else
6837 cc_is_clang=
6838 fi
6839esac
6840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841# tweak OPT based on compiler and platform, only if the user didn't set
6842# it on the command line
6843
Victor Stinner9ed34a82017-05-02 22:35:58 +02006844
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006845if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846then
6847 case $GCC in
6848 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6850 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6851 WRAP="-fwrapv"
6852 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006853
Victor Stinner35f3d242017-04-21 12:35:24 +02006854 if test -n "${cc_is_clang}"
6855 then
6856 # Clang also needs -fwrapv
6857 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006858 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6859 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006860 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006861 fi
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 case $ac_cv_prog_cc_g in
6864 yes)
6865 if test "$Py_DEBUG" = 'true' ; then
6866 # Optimization messes up debuggers, so turn it off for
6867 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006868 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006869 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006870 else
Victor Stinner28205b22017-04-21 11:24:34 +02006871 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006872 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873 else
Victor Stinner28205b22017-04-21 11:24:34 +02006874 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 fi
6876 ;;
6877 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006878 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 ;;
6880 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882 case $ac_sys_system in
6883 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6884 ;;
6885 esac
6886 ;;
6887
6888 *)
6889 OPT="-O"
6890 ;;
6891 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892fi
6893
6894
6895
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006896
stratakiscf10a752018-12-19 18:19:01 +01006897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898# The -arch flags for universal builds on OSX
6899UNIVERSAL_ARCH_FLAGS=
6900
6901
6902# tweak BASECFLAGS based on compiler and platform
6903case $GCC in
6904yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006905 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006906
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6908$as_echo_n "checking for -Wextra... " >&6; }
6909 ac_save_cc="$CC"
6910 CC="$CC -Wextra -Werror"
6911 if ${ac_cv_extra_warnings+:} false; then :
6912 $as_echo_n "(cached) " >&6
6913else
6914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6915/* end confdefs.h. */
6916
6917
6918int
6919main ()
6920{
6921
6922 ;
6923 return 0;
6924}
6925
6926_ACEOF
6927if ac_fn_c_try_compile "$LINENO"; then :
6928
6929 ac_cv_extra_warnings=yes
6930
6931else
6932
6933 ac_cv_extra_warnings=no
6934
6935fi
6936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6937fi
6938
6939 CC="$ac_save_cc"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6941$as_echo "$ac_cv_extra_warnings" >&6; }
6942
6943 if test $ac_cv_extra_warnings = yes
6944 then
6945 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6946 fi
6947
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006948 # Python doesn't violate C99 aliasing rules, but older versions of
6949 # GCC produce warnings for legal Python code. Enable
6950 # -fno-strict-aliasing on versions of GCC that support but produce
6951 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6953$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954 ac_save_cc="$CC"
6955 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006957 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006959else
Matthias Kloseb9621712010-04-24 17:59:49 +00006960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006962
Matthias Kloseb159a552010-04-25 21:00:44 +00006963
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006964int
6965main ()
6966{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006967
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006968 ;
6969 return 0;
6970}
Matthias Kloseb159a552010-04-25 21:00:44 +00006971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006973if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
6975 CC="$ac_save_cc -fstrict-aliasing"
6976 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978/* end confdefs.h. */
6979
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006980 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981int
6982main ()
6983{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006984double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985 ;
6986 return 0;
6987}
Matthias Kloseb159a552010-04-25 21:00:44 +00006988
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006990if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006991
6992 ac_cv_no_strict_aliasing=no
6993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994else
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
6996 ac_cv_no_strict_aliasing=yes
6997
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006998fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001else
Matthias Kloseb159a552010-04-25 21:00:44 +00007002
7003 ac_cv_no_strict_aliasing=no
7004
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007007fi
7008
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007009 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7012$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014 then
7015 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7016 fi
7017
Zachary Ware5af85642015-12-21 12:09:17 -06007018 # ICC doesn't recognize the option, but only emits a warning
7019 ## XXX does it emit an unused result warning and can it be disabled?
7020 case "$CC" in
7021 *icc*)
7022 ac_cv_disable_unused_result_warning=no
7023 ;;
7024 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7026$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7027 ac_save_cc="$CC"
7028 CC="$CC -Wunused-result -Werror"
7029 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007030 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007031 $as_echo_n "(cached) " >&6
7032else
7033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7034/* end confdefs.h. */
7035
7036
7037int
7038main ()
7039{
7040
7041 ;
7042 return 0;
7043}
7044
7045_ACEOF
7046if ac_fn_c_try_compile "$LINENO"; then :
7047
7048 ac_cv_disable_unused_result_warning=yes
7049
7050else
7051
7052 ac_cv_disable_unused_result_warning=no
7053
7054fi
7055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056fi
7057
7058 CFLAGS="$save_CFLAGS"
7059 CC="$ac_save_cc"
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7061$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007062 ;;
7063 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007064
7065 if test $ac_cv_disable_unused_result_warning = yes
7066 then
7067 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007068 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7069 fi
7070
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7072$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7073 ac_save_cc="$CC"
7074 CC="$CC -Wunused-parameter -Werror"
7075 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7076 $as_echo_n "(cached) " >&6
7077else
7078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7079/* end confdefs.h. */
7080
7081
7082int
7083main ()
7084{
7085
7086 ;
7087 return 0;
7088}
7089
7090_ACEOF
7091if ac_fn_c_try_compile "$LINENO"; then :
7092
7093 ac_cv_disable_unused_parameter_warning=yes
7094
7095else
7096
7097 ac_cv_disable_unused_parameter_warning=no
7098
7099fi
7100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7101fi
7102
7103 CC="$ac_save_cc"
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7105$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7106
7107 if test $ac_cv_disable_unused_parameter_warning = yes
7108 then
7109 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7110 fi
7111
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7113$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7114 ac_save_cc="$CC"
7115 CC="$CC -Wmissing-field-initializers -Werror"
7116 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7117 $as_echo_n "(cached) " >&6
7118else
7119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7120/* end confdefs.h. */
7121
7122
7123int
7124main ()
7125{
7126
7127 ;
7128 return 0;
7129}
7130
7131_ACEOF
7132if ac_fn_c_try_compile "$LINENO"; then :
7133
7134 ac_cv_disable_missing_field_initializers=yes
7135
7136else
7137
7138 ac_cv_disable_missing_field_initializers=no
7139
7140fi
7141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7142fi
7143
7144 CC="$ac_save_cc"
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7146$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7147
7148 if test $ac_cv_disable_missing_field_initializers = yes
7149 then
7150 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007151 fi
7152
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7154$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7155 ac_save_cc="$CC"
7156 CC="$CC -Wsign-compare"
7157 save_CFLAGS="$CFLAGS"
7158 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7159 $as_echo_n "(cached) " >&6
7160else
7161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162/* end confdefs.h. */
7163
7164
7165int
7166main ()
7167{
7168
7169 ;
7170 return 0;
7171}
7172
7173_ACEOF
7174if ac_fn_c_try_compile "$LINENO"; then :
7175
7176 ac_cv_enable_sign_compare_warning=yes
7177
7178else
7179
7180 ac_cv_enable_sign_compare_warning=no
7181
7182fi
7183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7184fi
7185
7186 CFLAGS="$save_CFLAGS"
7187 CC="$ac_save_cc"
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7189$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7190
7191 if test $ac_cv_enable_sign_compare_warning = yes
7192 then
7193 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7194 fi
7195
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7197$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7198 ac_save_cc="$CC"
7199 CC="$CC -Wunreachable-code"
7200 save_CFLAGS="$CFLAGS"
7201 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7202 $as_echo_n "(cached) " >&6
7203else
7204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7205/* end confdefs.h. */
7206
7207
7208int
7209main ()
7210{
7211
7212 ;
7213 return 0;
7214}
7215
7216_ACEOF
7217if ac_fn_c_try_compile "$LINENO"; then :
7218
7219 ac_cv_enable_unreachable_code_warning=yes
7220
7221else
7222
7223 ac_cv_enable_unreachable_code_warning=no
7224
7225fi
7226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7227fi
7228
7229 CFLAGS="$save_CFLAGS"
7230 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007231
7232 # Don't enable unreachable code warning in debug mode, since it usually
7233 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007234 # Issue #24324: Unfortunately, the unreachable code warning does not work
7235 # correctly on gcc and has been silently removed from the compiler.
7236 # It is supported on clang but on OS X systems gcc may be an alias
7237 # for clang. Try to determine if the compiler is not really gcc and,
7238 # if so, only then enable the warning.
7239 if test $ac_cv_enable_unreachable_code_warning = yes && \
7240 test "$Py_DEBUG" != "true" && \
7241 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007242 then
7243 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007244 else
7245 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007246 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7248$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007249
INADA Naokie3364842018-06-05 20:40:53 +09007250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7251$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7252 ac_save_cc="$CC"
7253 CC="$CC -Werror -Wstrict-prototypes"
7254 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7255 $as_echo_n "(cached) " >&6
7256else
7257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7258/* end confdefs.h. */
7259
7260
7261int
7262main ()
7263{
7264
7265 ;
7266 return 0;
7267}
7268
7269_ACEOF
7270if ac_fn_c_try_compile "$LINENO"; then :
7271
7272 ac_cv_enable_strict_prototypes_warning=yes
7273
7274else
7275
7276 ac_cv_enable_strict_prototypes_warning=no
7277
7278fi
7279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7280fi
7281
7282 CC="$ac_save_cc"
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7284$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7285
7286 if test $ac_cv_enable_strict_prototypes_warning = yes
7287 then
7288 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7289 fi
7290
Victor Stinner193ee0a2017-02-06 14:24:00 +01007291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7292$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7293 ac_save_cc="$CC"
7294 CC="$CC -Werror=implicit-function-declaration"
7295 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7296 $as_echo_n "(cached) " >&6
7297else
7298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7299/* end confdefs.h. */
7300
7301
7302int
7303main ()
7304{
7305
7306 ;
7307 return 0;
7308}
7309
7310_ACEOF
7311if ac_fn_c_try_compile "$LINENO"; then :
7312
7313 ac_cv_enable_implicit_function_declaration_error=yes
7314
7315else
7316
7317 ac_cv_enable_implicit_function_declaration_error=no
7318
7319fi
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321fi
7322
7323 CC="$ac_save_cc"
7324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7325$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7326
7327 if test $ac_cv_enable_implicit_function_declaration_error = yes
7328 then
7329 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7330 fi
7331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007332 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7333 # support. Without this, treatment of subnormals doesn't follow
7334 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007335 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336 alpha*)
7337 BASECFLAGS="$BASECFLAGS -mieee"
7338 ;;
7339 esac
7340
7341 case $ac_sys_system in
7342 SCO_SV*)
7343 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7344 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007345
Ned Deily87adb6e2013-10-18 21:09:56 -07007346 Darwin*)
7347 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7348 # used to be here, but non-Apple gcc doesn't accept them.
7349 if test "${CC}" = gcc
7350 then
7351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007353 case "${UNIVERSALSDK}" in
7354 */MacOSX10.4u.sdk)
7355 # Build using 10.4 SDK, force usage of gcc when the
7356 # compiler is gcc, otherwise the user will get very
7357 # confusing error messages when building on OSX 10.6
7358 CC=gcc-4.0
7359 CPP=cpp-4.0
7360 ;;
7361 esac
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007363$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007364 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365
Ned Deily87adb6e2013-10-18 21:09:56 -07007366 if test "${enable_universalsdk}"
7367 then
7368 case "$UNIVERSAL_ARCHS" in
7369 32-bit)
7370 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7371 LIPO_32BIT_FLAGS=""
7372 ARCH_RUN_32BIT=""
7373 ;;
7374 64-bit)
7375 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7376 LIPO_32BIT_FLAGS=""
7377 ARCH_RUN_32BIT="true"
7378 ;;
7379 all)
7380 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7381 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7382 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7383 ;;
7384 intel)
7385 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7386 LIPO_32BIT_FLAGS="-extract i386"
7387 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7388 ;;
7389 intel-32)
7390 UNIVERSAL_ARCH_FLAGS="-arch i386"
7391 LIPO_32BIT_FLAGS=""
7392 ARCH_RUN_32BIT=""
7393 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007394 intel-64)
7395 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7396 LIPO_32BIT_FLAGS=""
7397 ARCH_RUN_32BIT="true"
7398 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 3-way)
7400 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7401 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7402 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7403 ;;
7404 *)
7405 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7406 ;;
7407 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408
Ned Deily87adb6e2013-10-18 21:09:56 -07007409 if test "${UNIVERSALSDK}" != "/"
7410 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007411 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7412 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007413 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007414 else
7415 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7416 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007417 fi
7418 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419
Ned Deily87adb6e2013-10-18 21:09:56 -07007420 # Calculate an appropriate deployment target for this build:
7421 # The deployment target value is used explicitly to enable certain
7422 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007423 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007424 # component of the string returned by distutils.get_platform().
7425 #
7426 # Use the value from:
7427 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7428 # 2. the operating system version of the build machine if >= 10.6
7429 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7430 # below to pick either 10.3, 10.4, or 10.5 as the target.
7431 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432
Ned Deily87adb6e2013-10-18 21:09:56 -07007433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7434$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007435 cur_target_major=`sw_vers -productVersion | \
7436 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7437 cur_target_minor=`sw_vers -productVersion | \
7438 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7439 cur_target="${cur_target_major}.${cur_target_minor}"
7440 if test ${cur_target_major} -eq 10 && \
7441 test ${cur_target_minor} -ge 3 && \
7442 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 then
Ned Deily36820b62014-06-25 13:44:22 -07007444 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 cur_target=10.3
7446 if test ${enable_universalsdk}
7447 then
7448 case "$UNIVERSAL_ARCHS" in
7449 all|3-way|intel|64-bit)
7450 # These configurations were first supported in 10.5
7451 cur_target='10.5'
7452 ;;
7453 esac
7454 else
7455 if test `/usr/bin/arch` = "i386"
7456 then
7457 # 10.4 was the first release to support Intel archs
7458 cur_target="10.4"
7459 fi
7460 fi
7461 fi
7462 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007463
Ned Deily87adb6e2013-10-18 21:09:56 -07007464 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7465 # environment with a value that is the same as what we'll use
7466 # in the Makefile to ensure that we'll get the same compiler
7467 # environment during configure and build time.
7468 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7469 export MACOSX_DEPLOYMENT_TARGET
7470 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7472$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007473
Ned Deily87adb6e2013-10-18 21:09:56 -07007474 # end of Darwin* tests
7475 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476 esac
7477 ;;
7478
7479*)
7480 case $ac_sys_system in
7481 OpenUNIX*|UnixWare*)
7482 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7483 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 SCO_SV*)
7485 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7486 ;;
7487 esac
7488 ;;
7489esac
7490
Zachary Ware5af85642015-12-21 12:09:17 -06007491# ICC needs -fp-model strict or floats behave badly
7492case "$CC" in
7493*icc*)
7494 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7495 ;;
7496esac
7497
T. Woutersddbfa2c2017-05-23 01:30:49 +02007498if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 :
7500else
7501 OPT="-DNDEBUG $OPT"
7502fi
7503
7504if test "$ac_arch_flags"
7505then
7506 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7507fi
7508
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509# On some compilers, pthreads are available without further options
7510# (e.g. MacOS X). On some of these systems, the compiler will not
7511# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7512# So we have to see first whether pthreads are available without
7513# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7515$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007516if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518else
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007520 ac_cv_pthread_is_default=no
7521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523/* end confdefs.h. */
7524
Stefan Krah7dba5942012-11-22 22:49:11 +01007525#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526#include <pthread.h>
7527
7528void* routine(void* p){return NULL;}
7529
7530int main(){
7531 pthread_t p;
7532 if(pthread_create(&p,NULL,routine,NULL)!=0)
7533 return 1;
7534 (void)pthread_detach(p);
7535 return 0;
7536}
7537
7538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007539if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540
7541 ac_cv_pthread_is_default=yes
7542 ac_cv_kthread=no
7543 ac_cv_pthread=no
7544
7545else
Matthias Kloseb9621712010-04-24 17:59:49 +00007546 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7549 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550fi
7551
7552
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553fi
7554
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7556$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557
7558
7559if test $ac_cv_pthread_is_default = yes
7560then
7561 ac_cv_kpthread=no
7562else
7563# -Kpthread, if available, provides the right #defines
7564# and linker options to make pthread_create available
7565# Some compilers won't report that they do not support -Kpthread,
7566# so we need to run a program to see whether it really made the
7567# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7569$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007570if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572else
7573 ac_save_cc="$CC"
7574CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007575if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576 ac_cv_kpthread=no
7577else
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579/* end confdefs.h. */
7580
Stefan Krah7dba5942012-11-22 22:49:11 +01007581#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582#include <pthread.h>
7583
7584void* routine(void* p){return NULL;}
7585
7586int main(){
7587 pthread_t p;
7588 if(pthread_create(&p,NULL,routine,NULL)!=0)
7589 return 1;
7590 (void)pthread_detach(p);
7591 return 0;
7592}
7593
7594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007595if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596 ac_cv_kpthread=yes
7597else
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602fi
7603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604CC="$ac_save_cc"
7605fi
7606
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7608$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609fi
7610
7611if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7612then
7613# -Kthread, if available, provides the right #defines
7614# and linker options to make pthread_create available
7615# Some compilers won't report that they do not support -Kthread,
7616# so we need to run a program to see whether it really made the
7617# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7619$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007620if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622else
7623 ac_save_cc="$CC"
7624CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007625if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626 ac_cv_kthread=no
7627else
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629/* end confdefs.h. */
7630
Stefan Krah7dba5942012-11-22 22:49:11 +01007631#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632#include <pthread.h>
7633
7634void* routine(void* p){return NULL;}
7635
7636int main(){
7637 pthread_t p;
7638 if(pthread_create(&p,NULL,routine,NULL)!=0)
7639 return 1;
7640 (void)pthread_detach(p);
7641 return 0;
7642}
7643
7644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007645if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646 ac_cv_kthread=yes
7647else
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
7653
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654CC="$ac_save_cc"
7655fi
7656
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7658$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659fi
7660
7661if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7662then
7663# -pthread, if available, provides the right #defines
7664# and linker options to make pthread_create available
7665# Some compilers won't report that they do not support -pthread,
7666# so we need to run a program to see whether it really made the
7667# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7669$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007670if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007671 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672else
7673 ac_save_cc="$CC"
7674CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007675if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 ac_cv_pthread=no
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679/* end confdefs.h. */
7680
Stefan Krah7dba5942012-11-22 22:49:11 +01007681#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682#include <pthread.h>
7683
7684void* routine(void* p){return NULL;}
7685
7686int main(){
7687 pthread_t p;
7688 if(pthread_create(&p,NULL,routine,NULL)!=0)
7689 return 1;
7690 (void)pthread_detach(p);
7691 return 0;
7692}
7693
7694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007695if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696 ac_cv_pthread=yes
7697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702fi
7703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704CC="$ac_save_cc"
7705fi
7706
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7708$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
7710
7711# If we have set a CC compiler flag for thread support then
7712# check if it works for CXX, too.
7713ac_cv_cxx_thread=no
7714if test ! -z "$CXX"
7715then
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7717$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718ac_save_cxx="$CXX"
7719
7720if test "$ac_cv_kpthread" = "yes"
7721then
7722 CXX="$CXX -Kpthread"
7723 ac_cv_cxx_thread=yes
7724elif test "$ac_cv_kthread" = "yes"
7725then
7726 CXX="$CXX -Kthread"
7727 ac_cv_cxx_thread=yes
7728elif test "$ac_cv_pthread" = "yes"
7729then
7730 CXX="$CXX -pthread"
7731 ac_cv_cxx_thread=yes
7732fi
7733
7734if test $ac_cv_cxx_thread = yes
7735then
7736 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7737 $CXX -c conftest.$ac_ext 2>&5
7738 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7739 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7740 then
7741 ac_cv_cxx_thread=yes
7742 else
7743 ac_cv_cxx_thread=no
7744 fi
7745 rm -fr conftest*
7746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7748$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007749fi
7750CXX="$ac_save_cxx"
7751
7752
7753# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7755$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007756if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760/* end confdefs.h. */
7761#include <stdlib.h>
7762#include <stdarg.h>
7763#include <string.h>
7764#include <float.h>
7765
7766int
7767main ()
7768{
7769
7770 ;
7771 return 0;
7772}
7773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007774if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775 ac_cv_header_stdc=yes
7776else
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780
7781if test $ac_cv_header_stdc = yes; then
7782 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007784/* end confdefs.h. */
7785#include <string.h>
7786
7787_ACEOF
7788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 $EGREP "memchr" >/dev/null 2>&1; then :
7790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791else
7792 ac_cv_header_stdc=no
7793fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007794rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795
7796fi
7797
7798if test $ac_cv_header_stdc = yes; then
7799 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801/* end confdefs.h. */
7802#include <stdlib.h>
7803
7804_ACEOF
7805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 $EGREP "free" >/dev/null 2>&1; then :
7807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808else
7809 ac_cv_header_stdc=no
7810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007811rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812
7813fi
7814
7815if test $ac_cv_header_stdc = yes; then
7816 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818 :
7819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821/* end confdefs.h. */
7822#include <ctype.h>
7823#include <stdlib.h>
7824#if ((' ' & 0x0FF) == 0x020)
7825# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7826# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7827#else
7828# define ISLOWER(c) \
7829 (('a' <= (c) && (c) <= 'i') \
7830 || ('j' <= (c) && (c) <= 'r') \
7831 || ('s' <= (c) && (c) <= 'z'))
7832# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7833#endif
7834
7835#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7836int
7837main ()
7838{
7839 int i;
7840 for (i = 0; i < 256; i++)
7841 if (XOR (islower (i), ISLOWER (i))
7842 || toupper (i) != TOUPPER (i))
7843 return 2;
7844 return 0;
7845}
7846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007847if ac_fn_c_try_run "$LINENO"; then :
7848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854fi
7855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856fi
7857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7859$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860if test $ac_cv_header_stdc = yes; then
7861
Matthias Kloseb9621712010-04-24 17:59:49 +00007862$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863
7864fi
7865
stratakise768c862018-01-23 16:11:24 +01007866for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007867fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007868ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007869sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007870utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007871poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007872sys/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 +01007873sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007874sys/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 +01007875sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007876sys/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 -07007877libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007878linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007879sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007880do :
7881 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7882ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007883if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007885#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007886_ACEOF
7887
7888fi
7889
Guido van Rossum627b2d71993-12-24 10:39:16 +00007890done
7891
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007892ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007893for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7896$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007897if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007899else
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007901/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007902#include <sys/types.h>
7903#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905int
7906main ()
7907{
7908if ((DIR *) 0)
7909return 0;
7910 ;
7911 return 0;
7912}
7913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007916else
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007921eval ac_res=\$$as_ac_Header
7922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7923$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007924if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007926#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007927_ACEOF
7928
7929ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007931
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932done
7933# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7934if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7936$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007937if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007939else
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944/* Override any GCC internal prototype to avoid an error.
7945 Use char because int might match the return type of a GCC
7946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007947#ifdef __cplusplus
7948extern "C"
7949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007950char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007951int
7952main ()
7953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ;
7956 return 0;
7957}
7958_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959for ac_lib in '' dir; do
7960 if test -z "$ac_lib"; then
7961 ac_res="none required"
7962 else
7963 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969rm -f core conftest.err conftest.$ac_objext \
7970 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007971 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974done
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977else
7978 ac_cv_search_opendir=no
7979fi
7980rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007981LIBS=$ac_func_search_save_LIBS
7982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7984$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007990
Michael W. Hudson54241132001-12-07 15:38:26 +00007991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7993$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007996else
7997 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001/* Override any GCC internal prototype to avoid an error.
8002 Use char because int might match the return type of a GCC
8003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008004#ifdef __cplusplus
8005extern "C"
8006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008007char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008008int
8009main ()
8010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ;
8013 return 0;
8014}
8015_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016for ac_lib in '' x; do
8017 if test -z "$ac_lib"; then
8018 ac_res="none required"
8019 else
8020 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008021 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026rm -f core conftest.err conftest.$ac_objext \
8027 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008028 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031done
Victor Stinnere0be4232011-10-25 13:06:09 +02008032if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034else
8035 ac_cv_search_opendir=no
8036fi
8037rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008038LIBS=$ac_func_search_save_LIBS
8039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8041$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008043if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046fi
8047
8048fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008049
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8051$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008056/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008057#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008058int
8059main ()
8060{
8061return makedev(0, 0);
8062 ;
8063 return 0;
8064}
8065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008066if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008067 ac_cv_header_sys_types_h_makedev=yes
8068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008071rm -f core conftest.err conftest.$ac_objext \
8072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008073
8074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8076$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008077
8078if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008079ac_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 +02008080if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008081
Matthias Kloseb9621712010-04-24 17:59:49 +00008082$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008083
8084fi
8085
8086
8087
8088 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 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 +02008090if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008091
Matthias Kloseb9621712010-04-24 17:59:49 +00008092$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008093
8094fi
8095
8096
8097 fi
8098fi
8099
Michael W. Hudson54241132001-12-07 15:38:26 +00008100
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008101# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8102# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8103SAVE_CFLAGS=$CFLAGS
8104CFLAGS="-std=c99 $CFLAGS"
8105for ac_header in bluetooth/bluetooth.h
8106do :
8107 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8108if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8109 cat >>confdefs.h <<_ACEOF
8110#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8111_ACEOF
8112
8113fi
8114
8115done
8116
8117CFLAGS=$SAVE_CFLAGS
8118
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008119# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8120for ac_header in net/if.h
8121do :
8122 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8123#ifdef STDC_HEADERS
8124# include <stdlib.h>
8125# include <stddef.h>
8126#else
8127# ifdef HAVE_STDLIB_H
8128# include <stdlib.h>
8129# endif
8130#endif
8131#ifdef HAVE_SYS_SOCKET_H
8132# include <sys/socket.h>
8133#endif
8134
8135"
Victor Stinnere0be4232011-10-25 13:06:09 +02008136if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008137 cat >>confdefs.h <<_ACEOF
8138#define HAVE_NET_IF_H 1
8139_ACEOF
8140
8141fi
8142
8143done
8144
8145
Martin v. Löwis11017b12006-01-14 18:12:57 +00008146# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008147for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008148do :
8149 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 +00008150#ifdef HAVE_ASM_TYPES_H
8151#include <asm/types.h>
8152#endif
8153#ifdef HAVE_SYS_SOCKET_H
8154#include <sys/socket.h>
8155#endif
8156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157"
Victor Stinnere0be4232011-10-25 13:06:09 +02008158if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008159 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008160#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008161_ACEOF
8162
8163fi
8164
8165done
8166
8167
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008168# On Linux, qrtr.h requires asm/types.h
8169for ac_header in linux/qrtr.h
8170do :
8171 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8172#ifdef HAVE_ASM_TYPES_H
8173#include <asm/types.h>
8174#endif
8175#ifdef HAVE_SYS_SOCKET_H
8176#include <sys/socket.h>
8177#endif
8178
8179"
8180if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8181 cat >>confdefs.h <<_ACEOF
8182#define HAVE_LINUX_QRTR_H 1
8183_ACEOF
8184
8185fi
8186
8187done
8188
8189
caaveryeffc12f2017-09-06 18:18:10 -04008190for ac_header in linux/vm_sockets.h
8191do :
8192 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8193#ifdef HAVE_SYS_SOCKET_H
8194#include <sys/socket.h>
8195#endif
8196
8197"
8198if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8199 cat >>confdefs.h <<_ACEOF
8200#define HAVE_LINUX_VM_SOCKETS_H 1
8201_ACEOF
8202
8203fi
8204
8205done
8206
8207
Charles-François Natali47413c12011-10-06 19:47:44 +02008208# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008209for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008210do :
8211 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8212ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8213#ifdef HAVE_SYS_SOCKET_H
8214#include <sys/socket.h>
8215#endif
8216
8217"
8218if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8219 cat >>confdefs.h <<_ACEOF
8220#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8221_ACEOF
8222
8223fi
8224
8225done
8226
8227
Guido van Rossum627b2d71993-12-24 10:39:16 +00008228# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008229was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8231$as_echo_n "checking for clock_t in time.h... " >&6; }
8232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008233/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008234#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008235
8236_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008239 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008240else
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
8242
Matthias Kloseb9621712010-04-24 17:59:49 +00008243$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008244
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008245
Guido van Rossum627b2d71993-12-24 10:39:16 +00008246fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008247rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8250$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008251
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8253$as_echo_n "checking for makedev... " >&6; }
8254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008255/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008256
Jesus Cea740f53a2010-04-28 11:35:30 +00008257#if defined(MAJOR_IN_MKDEV)
8258#include <sys/mkdev.h>
8259#elif defined(MAJOR_IN_SYSMACROS)
8260#include <sys/sysmacros.h>
8261#else
8262#include <sys/types.h>
8263#endif
8264
Neal Norwitz11690112002-07-30 01:08:28 +00008265int
8266main ()
8267{
Jesus Cea740f53a2010-04-28 11:35:30 +00008268
8269 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008270 ;
8271 return 0;
8272}
Matthias Kloseb159a552010-04-25 21:00:44 +00008273
Neal Norwitz11690112002-07-30 01:08:28 +00008274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008275if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008276 ac_cv_has_makedev=yes
8277else
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280rm -f core conftest.err conftest.$ac_objext \
8281 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8283$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008284if test "$ac_cv_has_makedev" = "yes"; then
8285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008287
8288fi
8289
Christian Heimes985ecdc2013-11-20 11:46:18 +01008290# byte swapping
8291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8292$as_echo_n "checking for le64toh... " >&6; }
8293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8294/* end confdefs.h. */
8295
8296#ifdef HAVE_ENDIAN_H
8297#include <endian.h>
8298#elif defined(HAVE_SYS_ENDIAN_H)
8299#include <sys/endian.h>
8300#endif
8301
8302int
8303main ()
8304{
8305
8306 le64toh(1)
8307 ;
8308 return 0;
8309}
8310
8311_ACEOF
8312if ac_fn_c_try_link "$LINENO"; then :
8313 ac_cv_has_le64toh=yes
8314else
8315 ac_cv_has_le64toh=no
8316fi
8317rm -f core conftest.err conftest.$ac_objext \
8318 conftest$ac_exeext conftest.$ac_ext
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8320$as_echo "$ac_cv_has_le64toh" >&6; }
8321if test "$ac_cv_has_le64toh" = "yes"; then
8322
8323$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8324
8325fi
8326
Martin v. Löwis399a6892002-10-04 10:22:02 +00008327use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008328# Don't use largefile support for GNU/Hurd
8329case $ac_sys_system in GNU*)
8330 use_lfs=no
8331esac
8332
Martin v. Löwis399a6892002-10-04 10:22:02 +00008333if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008334# Two defines needed to enable largefile support on various platforms
8335# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008336case $ac_sys_system/$ac_sys_release in
8337AIX*)
8338
8339$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8340
8341 ;;
8342esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008345
8346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008348
Martin v. Löwis399a6892002-10-04 10:22:02 +00008349fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008350
Guido van Rossum84e7b241996-08-19 21:59:00 +00008351# Add some code to confdefs.h so that the test for off_t works on SCO
8352cat >> confdefs.h <<\EOF
8353#if defined(SCO_DS)
8354#undef _OFF_T
8355#endif
8356EOF
8357
Guido van Rossumef2255b2000-03-10 22:30:29 +00008358# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008359ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008360if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008362else
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
8364cat >>confdefs.h <<_ACEOF
8365#define mode_t int
8366_ACEOF
8367
8368fi
8369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008371if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008373else
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
8375cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008377_ACEOF
8378
8379fi
8380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008382if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
8386cat >>confdefs.h <<_ACEOF
8387#define pid_t int
8388_ACEOF
8389
8390fi
8391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008392
Martin v. Löwis11437992002-04-12 09:54:03 +00008393cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008394#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008395_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008398if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008400else
Martin v. Löwis11437992002-04-12 09:54:03 +00008401
8402cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008404_ACEOF
8405
8406fi
8407
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8409$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008412else
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008415#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008416
8417_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008420 ac_cv_type_uid_t=yes
8421else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008422 ac_cv_type_uid_t=no
8423fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008424rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8428$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008429if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430
Matthias Kloseb9621712010-04-24 17:59:49 +00008431$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008432
8433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008435
8436fi
8437
Mark Dickinson983bc162012-12-02 12:11:38 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008440if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008443
8444fi
8445
Stefan Krah1919b7e2012-03-21 18:25:23 +01008446ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8447if test "x$ac_cv_type___uint128_t" = xyes; then :
8448
8449$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8450
8451fi
8452
Jack Jansendd19cf82001-12-06 22:36:17 +00008453
Michael W. Hudson54241132001-12-07 15:38:26 +00008454# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008455# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456# The cast to long int works around a bug in the HP C Compiler
8457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8461$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 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 +00008466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 if test "$ac_cv_type_int" = yes; then
8469 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008471as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008472See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473 else
8474 ac_cv_sizeof_int=0
8475 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8480$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481
8482
8483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008485#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008486_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008487
8488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489# The cast to long int works around a bug in the HP C Compiler
8490# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8491# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8492# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8494$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 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 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 if test "$ac_cv_type_long" = yes; then
8502 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008504as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008505See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 else
8507 ac_cv_sizeof_long=0
8508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8513$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515
8516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008518#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008519_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008520
8521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522# The cast to long int works around a bug in the HP C Compiler
8523# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8524# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8525# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8527$as_echo_n "checking size of long long... " >&6; }
8528if ${ac_cv_sizeof_long_long+:} false; then :
8529 $as_echo_n "(cached) " >&6
8530else
8531 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8532
8533else
8534 if test "$ac_cv_type_long_long" = yes; then
8535 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8537as_fn_error 77 "cannot compute sizeof (long long)
8538See \`config.log' for more details" "$LINENO" 5; }
8539 else
8540 ac_cv_sizeof_long_long=0
8541 fi
8542fi
8543
8544fi
8545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8546$as_echo "$ac_cv_sizeof_long_long" >&6; }
8547
8548
8549
8550cat >>confdefs.h <<_ACEOF
8551#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8552_ACEOF
8553
8554
8555# The cast to long int works around a bug in the HP C Compiler
8556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8558# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8560$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008561if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008563else
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 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 +00008565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 if test "$ac_cv_type_void_p" = yes; then
8568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008570as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008571See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 else
8573 ac_cv_sizeof_void_p=0
8574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8579$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580
8581
8582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008584#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008585_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008586
8587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588# The cast to long int works around a bug in the HP C Compiler
8589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8591# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8593$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008594if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 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 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 if test "$ac_cv_type_short" = yes; then
8601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008603as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008604See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 else
8606 ac_cv_sizeof_short=0
8607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8612$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613
8614
8615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008617#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008619
8620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621# The cast to long int works around a bug in the HP C Compiler
8622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8624# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8626$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008627if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 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 +00008631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 if test "$ac_cv_type_float" = yes; then
8634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008636as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008637See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 else
8639 ac_cv_sizeof_float=0
8640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8645$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646
8647
8648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008650#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008651_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008652
8653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8659$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 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 +00008664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_double" = yes; then
8667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof_double=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8678$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679
8680
8681
Martin v. Löwis11437992002-04-12 09:54:03 +00008682cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008683#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008684_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008685
8686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687# The cast to long int works around a bug in the HP C Compiler
8688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8692$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008693if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 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 +00008697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 if test "$ac_cv_type_fpos_t" = yes; then
8700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008702as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 else
8705 ac_cv_sizeof_fpos_t=0
8706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8711$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712
8713
8714
Martin v. Löwis11437992002-04-12 09:54:03 +00008715cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008716#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008717_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008718
Michael W. Hudson54241132001-12-07 15:38:26 +00008719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8725$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 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 +00008730
Martin v. Löwis18e16552006-02-15 17:27:45 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 if test "$ac_cv_type_size_t" = yes; then
8733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008735as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737 else
8738 ac_cv_sizeof_size_t=0
8739 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008741
Martin v. Löwis18e16552006-02-15 17:27:45 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8744$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745
8746
8747
Martin v. Löwis18e16552006-02-15 17:27:45 +00008748cat >>confdefs.h <<_ACEOF
8749#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8750_ACEOF
8751
8752
Christian Heimes400adb02008-02-01 08:12:03 +00008753# The cast to long int works around a bug in the HP C Compiler
8754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8758$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 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 +00008763
Christian Heimes400adb02008-02-01 08:12:03 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 if test "$ac_cv_type_pid_t" = yes; then
8766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008768as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008769See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008770 else
8771 ac_cv_sizeof_pid_t=0
8772 fi
8773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774
Christian Heimes400adb02008-02-01 08:12:03 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8777$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008778
8779
8780
8781cat >>confdefs.h <<_ACEOF
8782#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8783_ACEOF
8784
8785
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008786# The cast to long int works around a bug in the HP C Compiler
8787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8789# This bug is HP SR number 8606223364.
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8791$as_echo_n "checking size of uintptr_t... " >&6; }
8792if ${ac_cv_sizeof_uintptr_t+:} false; then :
8793 $as_echo_n "(cached) " >&6
8794else
8795 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8796
8797else
8798 if test "$ac_cv_type_uintptr_t" = yes; then
8799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8801as_fn_error 77 "cannot compute sizeof (uintptr_t)
8802See \`config.log' for more details" "$LINENO" 5; }
8803 else
8804 ac_cv_sizeof_uintptr_t=0
8805 fi
8806fi
8807
8808fi
8809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8810$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8811
8812
8813
8814cat >>confdefs.h <<_ACEOF
8815#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8816_ACEOF
8817
8818
Michael W. Hudson54241132001-12-07 15:38:26 +00008819
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008820
Eitan Adler3055c942018-05-15 22:58:09 -07008821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8822$as_echo_n "checking for long double... " >&6; }
8823if ${ac_cv_type_long_double+:} false; then :
8824 $as_echo_n "(cached) " >&6
8825else
8826 if test "$GCC" = yes; then
8827 ac_cv_type_long_double=yes
8828 else
8829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8830/* end confdefs.h. */
8831/* The Stardent Vistra knows sizeof (long double), but does
8832 not support it. */
8833 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008834int
8835main ()
8836{
Eitan Adler3055c942018-05-15 22:58:09 -07008837static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8838 sizeof (double) <= sizeof (long double))];
8839test_array [0] = 0;
8840return test_array [0];
8841
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008842 ;
8843 return 0;
8844}
8845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008846if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008847 ac_cv_type_long_double=yes
8848else
8849 ac_cv_type_long_double=no
8850fi
8851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8852 fi
8853fi
8854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8855$as_echo "$ac_cv_type_long_double" >&6; }
8856 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008859
Eitan Adler3055c942018-05-15 22:58:09 -07008860 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008861
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008862# The cast to long int works around a bug in the HP C Compiler
8863# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8864# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8865# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8867$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008868if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008870else
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 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 +00008872
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873else
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 if test "$ac_cv_type_long_double" = yes; then
8875 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008877as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008878See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008879 else
8880 ac_cv_sizeof_long_double=0
8881 fi
8882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8886$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887
8888
8889
8890cat >>confdefs.h <<_ACEOF
8891#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8892_ACEOF
8893
8894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008896# The cast to long int works around a bug in the HP C Compiler
8897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8901$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 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 +00008906
Thomas Woutersb2137042007-02-01 18:02:27 +00008907else
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 if test "$ac_cv_type__Bool" = yes; then
8909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008911as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008912See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913 else
8914 ac_cv_sizeof__Bool=0
8915 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917
Thomas Woutersb2137042007-02-01 18:02:27 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8920$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008921
8922
8923
Thomas Woutersb2137042007-02-01 18:02:27 +00008924cat >>confdefs.h <<_ACEOF
8925#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8926_ACEOF
8927
8928
Thomas Woutersb2137042007-02-01 18:02:27 +00008929
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930# The cast to long int works around a bug in the HP C Compiler
8931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8935$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008936if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008940#ifdef HAVE_SYS_TYPES_H
8941#include <sys/types.h>
8942#endif
8943
Matthias Kloseb9621712010-04-24 17:59:49 +00008944"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946else
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 if test "$ac_cv_type_off_t" = yes; then
8948 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008950as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008951See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952 else
8953 ac_cv_sizeof_off_t=0
8954 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008956
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8959$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008961
8962
Martin v. Löwis11437992002-04-12 09:54:03 +00008963cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008964#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008966
Michael W. Hudson54241132001-12-07 15:38:26 +00008967
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8970$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008971if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008972 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8977$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8980$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008981fi
8982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983# The cast to long int works around a bug in the HP C Compiler
8984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8988$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991else
Matthias Kloseb9621712010-04-24 17:59:49 +00008992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993#ifdef HAVE_SYS_TYPES_H
8994#include <sys/types.h>
8995#endif
8996#ifdef HAVE_TIME_H
8997#include <time.h>
8998#endif
8999
Matthias Kloseb9621712010-04-24 17:59:49 +00009000"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002else
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 if test "$ac_cv_type_time_t" = yes; then
9004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009006as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009007See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009008 else
9009 ac_cv_sizeof_time_t=0
9010 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009012
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9015$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017
9018
Martin v. Löwis11437992002-04-12 09:54:03 +00009019cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009020#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009021_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009022
Michael W. Hudson54241132001-12-07 15:38:26 +00009023
9024
Trent Mick635f6fb2000-08-23 21:33:05 +00009025# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009026ac_save_cc="$CC"
9027if test "$ac_cv_kpthread" = "yes"
9028then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009029elif test "$ac_cv_kthread" = "yes"
9030then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009031elif test "$ac_cv_pthread" = "yes"
9032then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009033fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9036$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009037have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009039/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009040
9041 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009042int
9043main ()
9044{
Guido van Rossum12580492000-09-24 16:47:19 +00009045pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ;
9047 return 0;
9048}
Matthias Kloseb159a552010-04-25 21:00:44 +00009049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009051if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009052 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9056$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009057if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9060# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9061# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9063$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009064if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009066else
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068#ifdef HAVE_PTHREAD_H
9069#include <pthread.h>
9070#endif
9071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009074else
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 if test "$ac_cv_type_pthread_t" = yes; then
9076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009078as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009079See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009080 else
9081 ac_cv_sizeof_pthread_t=0
9082 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009084
Trent Mick635f6fb2000-08-23 21:33:05 +00009085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9087$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089
9090
Martin v. Löwis11437992002-04-12 09:54:03 +00009091cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009092#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009093_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009094
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009095
Trent Mick635f6fb2000-08-23 21:33:05 +00009096fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009097
9098# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9099# This checking will be unnecessary after removing deprecated TLS API.
9100# The cast to long int works around a bug in the HP C Compiler
9101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9103# This bug is HP SR number 8606223364.
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9105$as_echo_n "checking size of pthread_key_t... " >&6; }
9106if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9107 $as_echo_n "(cached) " >&6
9108else
9109 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9110"; then :
9111
9112else
9113 if test "$ac_cv_type_pthread_key_t" = yes; then
9114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9116as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9117See \`config.log' for more details" "$LINENO" 5; }
9118 else
9119 ac_cv_sizeof_pthread_key_t=0
9120 fi
9121fi
9122
9123fi
9124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9125$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9126
9127
9128
9129cat >>confdefs.h <<_ACEOF
9130#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9131_ACEOF
9132
9133
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9135$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9136if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138/* end confdefs.h. */
9139#include <pthread.h>
9140int
9141main ()
9142{
9143pthread_key_t k; k * 1;
9144 ;
9145 return 0;
9146}
9147_ACEOF
9148if ac_fn_c_try_compile "$LINENO"; then :
9149 ac_pthread_key_t_is_arithmetic_type=yes
9150else
9151 ac_pthread_key_t_is_arithmetic_type=no
9152
9153fi
9154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9156$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9157 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9158
9159$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9160
9161 fi
9162else
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164$as_echo "no" >&6; }
9165fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009166CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009167
Michael W. Hudson54241132001-12-07 15:38:26 +00009168
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009169case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009170 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009171 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9172 ;;
9173 Darwin/*)
9174 OTHER_LIBTOOL_OPT=""
9175 ;;
9176esac
9177
9178
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009179
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009180case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009181 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009182 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9183 if test "${enable_universalsdk}"; then
9184 :
9185 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009186 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009187 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009188 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009189 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009190 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009191 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009192 if test ${gcc_version} '<' 4.0
9193 then
9194 LIBTOOL_CRUFT="-lcc_dynamic"
9195 else
9196 LIBTOOL_CRUFT=""
9197 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009199 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009200else
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009202/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009203
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009204 #include <unistd.h>
9205 int main(int argc, char*argv[])
9206 {
9207 if (sizeof(long) == 4) {
9208 return 0;
9209 } else {
9210 return 1;
9211 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009212 }
9213
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009215if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009216 ac_osx_32bit=yes
9217else
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009219fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009222fi
9223
9224
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009225 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009226 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009227 i386)
9228 MACOSX_DEFAULT_ARCH="i386"
9229 ;;
9230 ppc)
9231 MACOSX_DEFAULT_ARCH="ppc"
9232 ;;
9233 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009234 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009235 ;;
9236 esac
9237 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009238 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009239 i386)
9240 MACOSX_DEFAULT_ARCH="x86_64"
9241 ;;
9242 ppc)
9243 MACOSX_DEFAULT_ARCH="ppc64"
9244 ;;
9245 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009246 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247 ;;
9248 esac
9249
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009250 fi
9251
9252 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009253 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009254 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009255esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9257$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009258if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009259then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009260 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009261 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009262 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9267$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009268 if test $enable_shared = "yes"
9269 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009270 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 +00009271 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009272else
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275fi
9276
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9278$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009279case $ac_sys_system/$ac_sys_release in
9280 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009281
Matthias Kloseb9621712010-04-24 17:59:49 +00009282$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009283
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9285$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009286 ;;
9287 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009290 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009291esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009292
Guido van Rossum0a516c91994-09-12 10:58:40 +00009293# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009294
Michael W. Hudson54241132001-12-07 15:38:26 +00009295
9296
9297
9298
Benjamin Peterson99f03762010-04-11 22:15:28 +00009299
Thomas Wouters477c8d52006-05-27 19:21:47 +00009300
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009301# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9302# -- usually .so, .sl on HP-UX, .dll on Cygwin
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9304$as_echo_n "checking the extension of shared libraries... " >&6; }
9305if test -z "$SHLIB_SUFFIX"; then
9306 case $ac_sys_system in
9307 hp*|HP*)
9308 case `uname -m` in
9309 ia64) SHLIB_SUFFIX=.so;;
9310 *) SHLIB_SUFFIX=.sl;;
9311 esac
9312 ;;
9313 CYGWIN*) SHLIB_SUFFIX=.dll;;
9314 *) SHLIB_SUFFIX=.so;;
9315 esac
9316fi
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9318$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009319
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009321# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322# (Shared libraries in this instance are shared modules to be loaded into
9323# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9325$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326if test -z "$LDSHARED"
9327then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009328 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009329 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009330 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009331 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009332 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009334 if test "$GCC" = "yes" ; then
9335 LDSHARED='$(CC) -shared'
9336 LDCXXSHARED='$(CXX) -shared'
9337 else
9338 LDSHARED='$(CC) -G'
9339 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009340 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009341 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009342 if test "$GCC" = "yes" ; then
9343 LDSHARED='$(CC) -shared'
9344 LDCXXSHARED='$(CXX) -shared'
9345 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009346 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009347 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009348 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009349 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009350 LDSHARED='$(CC) -bundle'
9351 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009352 if test "$enable_framework" ; then
9353 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009354 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9355 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009356 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009357 else
9358 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009359 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009360 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009361 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009362 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009363 LDSHARED='$(CC) -bundle'
9364 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009365 if test "$enable_framework" ; then
9366 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009367 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9368 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009369 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009370 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009371 # No framework, use the Python app as bundle-loader
9372 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009373 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009374 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009375 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009376 Darwin/*)
9377 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9378 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009379
Ned Deily36820b62014-06-25 13:44:22 -07009380 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9381 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9382 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9383 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9384 if test ${dep_target_major} -eq 10 && \
9385 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009386 then
Ned Deily36820b62014-06-25 13:44:22 -07009387 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009388 LDSHARED='$(CC) -bundle'
9389 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009390 if test "$enable_framework" ; then
9391 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009392 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9393 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009394 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009395 else
9396 # No framework, use the Python app as bundle-loader
9397 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9398 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009399 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009400 fi
Ned Deily36820b62014-06-25 13:44:22 -07009401 else
9402 # building for OS X 10.3 and later
9403 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9404 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9405 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009406 fi
9407 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009408 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009409 LDSHARED='$(CC) -shared'
9410 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009411 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009412 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009413 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009414 LDSHARED='$(CC) -shared'
9415 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009416 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009417 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009418 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009419 OpenBSD*)
9420 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9421 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009422 LDSHARED='$(CC) -shared $(CCSHARED)'
9423 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009424 else
9425 case `uname -r` in
9426 [01].* | 2.[0-7] | 2.[0-7].*)
9427 LDSHARED="ld -Bshareable ${LDFLAGS}"
9428 ;;
9429 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009430 LDSHARED='$(CC) -shared $(CCSHARED)'
9431 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009432 ;;
9433 esac
9434 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009435 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009436 LDSHARED='$(CC) -shared'
9437 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009438 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009439 if test "$GCC" = "yes" ; then
9440 LDSHARED='$(CC) -shared'
9441 LDCXXSHARED='$(CXX) -shared'
9442 else
9443 LDSHARED='$(CC) -G'
9444 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009445 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009446 SCO_SV*)
9447 LDSHARED='$(CC) -Wl,-G,-Bexport'
9448 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9449 CYGWIN*)
9450 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9451 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009452 *) LDSHARED="ld";;
9453 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9456$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009457LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009458BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009459# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009460# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9462$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009463if test -z "$CCSHARED"
9464then
Guido van Rossum07397971997-04-29 21:49:50 +00009465 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009466 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009467 then CCSHARED="-fPIC";
9468 elif test `uname -p` = sparc;
9469 then CCSHARED="-xcode=pic32";
9470 else CCSHARED="-Kpic";
9471 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009472 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009473 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009474 else CCSHARED="+z";
9475 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009476 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009477 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009478 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009479 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009480 if test "$GCC" = "yes"
9481 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009482 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009483 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009484 SCO_SV*)
9485 if test "$GCC" = "yes"
9486 then CCSHARED="-fPIC"
9487 else CCSHARED="-Kpic -belf"
9488 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009489 VxWorks*)
9490 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009491 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9494$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009496# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9498$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009499if test -z "$LINKFORSHARED"
9500then
Guido van Rossum07397971997-04-29 21:49:50 +00009501 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009502 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009503 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009504 LINKFORSHARED="-Wl,-E -Wl,+s";;
9505# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009506 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009507 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009508 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009510 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009511
9512 # Issue #18075: the default maximum stack size (8MBytes) is too
9513 # small for the default recursion limit. Increase the stack size
9514 # to ensure that tests don't crash
Miss Islington (bot)83996412019-08-01 07:38:57 -07009515 # Note: This matches the value of THREAD_STACK_SIZE in
9516 # thread_pthread.h
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009517 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9518
Jack Jansene578a632001-08-15 01:27:14 +00009519 if test "$enable_framework"
9520 then
Jack Jansenda49e192005-01-07 13:08:22 +00009521 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009522 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009523 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009524 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009525 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009526 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009527 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009528 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9529 then
9530 LINKFORSHARED="-Wl,--export-dynamic"
9531 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009532 SunOS/5*) case $CC in
9533 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009534 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009535 then
9536 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009537 fi;;
9538 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009539 CYGWIN*)
9540 if test $enable_shared = "no"
9541 then
9542 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9543 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009544 QNX*)
9545 # -Wl,-E causes the symbols to be added to the dynamic
9546 # symbol table so that they can be found when a module
9547 # is loaded. -N 2048K causes the stack size to be set
9548 # to 2048 kilobytes so that the stack doesn't overflow
9549 # when running test_compile.py.
9550 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009551 VxWorks*)
9552 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009553 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9556$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009557
Michael W. Hudson54241132001-12-07 15:38:26 +00009558
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9561$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009562if test ! "$LIBRARY" = "$LDLIBRARY"
9563then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009564 case $ac_sys_system in
9565 CYGWIN*)
9566 # Cygwin needs CCSHARED when building extension DLLs
9567 # but not when building the interpreter DLL.
9568 CFLAGSFORSHARED='';;
9569 *)
9570 CFLAGSFORSHARED='$(CCSHARED)'
9571 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9574$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009575
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009576# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9577# library (with --enable-shared).
9578# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009579# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9580# if it is not required, since it creates a dependency of the shared library
9581# to LIBS. This, in turn, means that applications linking the shared libpython
9582# don't need to link LIBS explicitly. The default should be only changed
9583# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009584
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9586$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009587case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009588 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009589 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009590esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9592$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593
9594
Guido van Rossum627b2d71993-12-24 10:39:16 +00009595# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9597$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009598if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009599 $as_echo_n "(cached) " >&6
9600else
9601 ac_check_lib_save_LIBS=$LIBS
9602LIBS="-lsendfile $LIBS"
9603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9604/* end confdefs.h. */
9605
9606/* Override any GCC internal prototype to avoid an error.
9607 Use char because int might match the return type of a GCC
9608 builtin and then its argument prototype would still apply. */
9609#ifdef __cplusplus
9610extern "C"
9611#endif
9612char sendfile ();
9613int
9614main ()
9615{
9616return sendfile ();
9617 ;
9618 return 0;
9619}
9620_ACEOF
9621if ac_fn_c_try_link "$LINENO"; then :
9622 ac_cv_lib_sendfile_sendfile=yes
9623else
9624 ac_cv_lib_sendfile_sendfile=no
9625fi
9626rm -f core conftest.err conftest.$ac_objext \
9627 conftest$ac_exeext conftest.$ac_ext
9628LIBS=$ac_check_lib_save_LIBS
9629fi
9630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9631$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009632if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009633 cat >>confdefs.h <<_ACEOF
9634#define HAVE_LIBSENDFILE 1
9635_ACEOF
9636
9637 LIBS="-lsendfile $LIBS"
9638
9639fi
9640
Matthias Kloseb9621712010-04-24 17:59:49 +00009641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9642$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009643if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009645else
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009647LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651/* Override any GCC internal prototype to avoid an error.
9652 Use char because int might match the return type of a GCC
9653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009654#ifdef __cplusplus
9655extern "C"
9656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009657char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009658int
9659main ()
9660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 ;
9663 return 0;
9664}
9665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009668else
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009671rm -f core conftest.err conftest.$ac_objext \
9672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009673LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9676$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009677if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 cat >>confdefs.h <<_ACEOF
9679#define HAVE_LIBDL 1
9680_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009682 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009683
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009684fi
9685 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9687$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009688if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009690else
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009692LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696/* Override any GCC internal prototype to avoid an error.
9697 Use char because int might match the return type of a GCC
9698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009699#ifdef __cplusplus
9700extern "C"
9701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009702char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009703int
9704main ()
9705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009707 ;
9708 return 0;
9709}
9710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009713else
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9721$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009722if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 cat >>confdefs.h <<_ACEOF
9724#define HAVE_LIBDLD 1
9725_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009727 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009729fi
9730 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009731
Michael Felt0d3ccb42017-12-30 22:39:20 +01009732# checks for uuid.h location
9733for ac_header in uuid/uuid.h uuid.h
9734do :
9735 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9736ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9737if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9738 cat >>confdefs.h <<_ACEOF
9739#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9740_ACEOF
9741
9742fi
9743
9744done
9745
9746
Berker Peksag9a10ff42017-11-08 23:09:16 +03009747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9748$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9750/* end confdefs.h. */
9751#include <uuid/uuid.h>
9752int
9753main ()
9754{
9755
9756#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009757void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009758#endif
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764if ac_fn_c_try_compile "$LINENO"; then :
9765
9766$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9767
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9769$as_echo "yes" >&6; }
9770else
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9772$as_echo "no" >&6; }
9773
9774fi
9775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9776
Michael Felt0d3ccb42017-12-30 22:39:20 +01009777# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009778# FreeBSD and OpenBSD provides support as well
9779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9780$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9782/* end confdefs.h. */
9783#include <uuid.h>
9784int
9785main ()
9786{
9787
9788#ifndef uuid_create
9789void *x = uuid_create
9790#endif
9791
9792 ;
9793 return 0;
9794}
9795_ACEOF
9796if ac_fn_c_try_compile "$LINENO"; then :
9797
9798$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9799
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9801$as_echo "yes" >&6; }
9802else
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805
9806fi
9807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9808
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009809# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9810# stream in big-endian byte-order
9811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9812$as_echo_n "checking for uuid_enc_be... " >&6; }
9813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9814/* end confdefs.h. */
9815#include <uuid.h>
9816int
9817main ()
9818{
9819
9820#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009821void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009822#endif
9823
9824 ;
9825 return 0;
9826}
9827_ACEOF
9828if ac_fn_c_try_compile "$LINENO"; then :
9829
9830$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9831
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9833$as_echo "yes" >&6; }
9834else
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
9837
9838fi
9839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9840
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009841# 'Real Time' functions on Solaris
9842# posix4 on Solaris 2.6
9843# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009846if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009847 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009848else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009849 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853/* Override any GCC internal prototype to avoid an error.
9854 Use char because int might match the return type of a GCC
9855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856#ifdef __cplusplus
9857extern "C"
9858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009859char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
9862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868for ac_lib in '' pthread rt posix4; do
9869 if test -z "$ac_lib"; then
9870 ac_res="none required"
9871 else
9872 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009873 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009880 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883done
Victor Stinnere0be4232011-10-25 13:06:09 +02009884if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886else
9887 ac_cv_search_sem_init=no
9888fi
9889rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009890LIBS=$ac_func_search_save_LIBS
9891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9893$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009895if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009897
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009898fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009899
Martin v. Löwis519adae2003-09-20 10:47:47 +00009900
Martin v. Löwis19d17342003-06-14 21:03:05 +00009901# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9903$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009904if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009906else
9907 ac_check_lib_save_LIBS=$LIBS
9908LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912/* Override any GCC internal prototype to avoid an error.
9913 Use char because int might match the return type of a GCC
9914 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009915#ifdef __cplusplus
9916extern "C"
9917#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009918char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919int
9920main ()
9921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923 ;
9924 return 0;
9925}
9926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009927if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009928 ac_cv_lib_intl_textdomain=yes
9929else
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009932rm -f core conftest.err conftest.$ac_objext \
9933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009934LIBS=$ac_check_lib_save_LIBS
9935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9937$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009938if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009939
Matthias Kloseb9621712010-04-24 17:59:49 +00009940$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009941
Brett Cannonc6d936e2009-06-07 20:09:53 +00009942 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943fi
9944
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009945
9946# checks for system dependent C++ extensions support
9947case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9949$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009952
Georg Brandl59e87bd2011-02-15 19:48:59 +00009953 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009954int
9955main ()
9956{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009957loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 ;
9959 return 0;
9960}
Matthias Kloseb159a552010-04-25 21:00:44 +00009961
Martin v. Löwis11437992002-04-12 09:54:03 +00009962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009963if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009964
Matthias Kloseb159a552010-04-25 21:00:44 +00009965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009967
Matthias Kloseb159a552010-04-25 21:00:44 +00009968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009969$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009970
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009971else
Matthias Kloseb159a552010-04-25 21:00:44 +00009972
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009975
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009977rm -f core conftest.err conftest.$ac_objext \
9978 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009979 *) ;;
9980esac
9981
Christian Heimes985ecdc2013-11-20 11:46:18 +01009982# check for systems that require aligned memory access
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9984$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009985if ${ac_cv_aligned_required+:} false; then :
9986 $as_echo_n "(cached) " >&6
9987else
9988 if test "$cross_compiling" = yes; then :
9989 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009990else
9991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9992/* end confdefs.h. */
9993
9994int main()
9995{
9996 char s[16];
9997 int i, *p1, *p2;
9998 for (i=0; i < 16; i++)
9999 s[i] = i;
10000 p1 = (int*)(s+1);
10001 p2 = (int*)(s+2);
10002 if (*p1 == *p2)
10003 return 1;
10004 return 0;
10005}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010006_ACEOF
10007if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010008 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010009else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010010 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010011fi
10012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10013 conftest.$ac_objext conftest.beam conftest.$ac_ext
10014fi
10015
10016
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010017fi
10018
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10020$as_echo "$ac_cv_aligned_required" >&6; }
10021if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010022
10023$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10024
10025fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010026
10027# str, bytes and memoryview hash algorithm
10028
10029
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10031$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10032
10033# Check whether --with-hash_algorithm was given.
10034if test "${with_hash_algorithm+set}" = set; then :
10035 withval=$with_hash_algorithm;
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10037$as_echo "$withval" >&6; }
10038case "$withval" in
10039 siphash24)
10040 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10041
10042 ;;
10043 fnv)
10044 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10045
10046 ;;
10047 *)
10048 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10049 ;;
10050esac
10051
10052else
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10054$as_echo "default" >&6; }
10055fi
10056
10057
Charles-François Natalid30b0222014-05-08 23:08:51 +010010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10059$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10060
10061# Check whether --with-address_sanitizer was given.
10062if test "${with_address_sanitizer+set}" = set; then :
10063 withval=$with_address_sanitizer;
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10065$as_echo "$withval" >&6; }
10066BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10067LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010068# ASan works by controlling memory allocation, our own malloc interferes.
10069with_pymalloc="no"
10070
10071else
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10078$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10079
10080# Check whether --with-memory_sanitizer was given.
10081if test "${with_memory_sanitizer+set}" = set; then :
10082 withval=$with_memory_sanitizer;
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10084$as_echo "$withval" >&6; }
10085BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10086LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10087# MSan works by controlling memory allocation, our own malloc interferes.
10088with_pymalloc="no"
10089
10090else
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
10093fi
10094
10095
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10097$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10098
10099# Check whether --with-undefined_behavior_sanitizer was given.
10100if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10101 withval=$with_undefined_behavior_sanitizer;
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10103$as_echo "$withval" >&6; }
10104BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10105LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010106
10107else
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10109$as_echo "no" >&6; }
10110fi
10111
10112
Guido van Rossum70c7f481998-03-26 18:44:10 +000010113# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10115$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010116if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010118else
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010120LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124/* Override any GCC internal prototype to avoid an error.
10125 Use char because int might match the return type of a GCC
10126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010127#ifdef __cplusplus
10128extern "C"
10129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010130char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010131int
10132main ()
10133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ;
10136 return 0;
10137}
10138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010141else
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010144rm -f core conftest.err conftest.$ac_objext \
10145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10149$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010150if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010151 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010152fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010153 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10155$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010156if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010158else
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010160LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164/* Override any GCC internal prototype to avoid an error.
10165 Use char because int might match the return type of a GCC
10166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167#ifdef __cplusplus
10168extern "C"
10169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010170char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010171int
10172main ()
10173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ;
10176 return 0;
10177}
10178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010181else
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010184rm -f core conftest.err conftest.$ac_objext \
10185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010186LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10189$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010190if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010191 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010192fi
10193 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10196$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10202$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010203LIBS="$withval $LIBS"
10204
10205else
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10207$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208fi
10209
Guido van Rossum7f43da71994-08-01 12:15:30 +000010210
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010211
10212
10213
10214
10215
10216
Victor Stinner23a683a2019-04-12 21:27:37 +020010217
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010218if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10219 if test -n "$ac_tool_prefix"; then
10220 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10221set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10223$as_echo_n "checking for $ac_word... " >&6; }
10224if ${ac_cv_path_PKG_CONFIG+:} false; then :
10225 $as_echo_n "(cached) " >&6
10226else
10227 case $PKG_CONFIG in
10228 [\\/]* | ?:[\\/]*)
10229 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10230 ;;
10231 *)
10232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233for as_dir in $PATH
10234do
10235 IFS=$as_save_IFS
10236 test -z "$as_dir" && as_dir=.
10237 for ac_exec_ext in '' $ac_executable_extensions; do
10238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10239 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241 break 2
10242 fi
10243done
10244 done
10245IFS=$as_save_IFS
10246
10247 ;;
10248esac
10249fi
10250PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10251if test -n "$PKG_CONFIG"; then
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10253$as_echo "$PKG_CONFIG" >&6; }
10254else
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
10257fi
10258
10259
10260fi
10261if test -z "$ac_cv_path_PKG_CONFIG"; then
10262 ac_pt_PKG_CONFIG=$PKG_CONFIG
10263 # Extract the first word of "pkg-config", so it can be a program name with args.
10264set dummy pkg-config; ac_word=$2
10265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10266$as_echo_n "checking for $ac_word... " >&6; }
10267if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10268 $as_echo_n "(cached) " >&6
10269else
10270 case $ac_pt_PKG_CONFIG in
10271 [\\/]* | ?:[\\/]*)
10272 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10273 ;;
10274 *)
10275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10276for as_dir in $PATH
10277do
10278 IFS=$as_save_IFS
10279 test -z "$as_dir" && as_dir=.
10280 for ac_exec_ext in '' $ac_executable_extensions; do
10281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10282 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10284 break 2
10285 fi
10286done
10287 done
10288IFS=$as_save_IFS
10289
10290 ;;
10291esac
10292fi
10293ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10294if test -n "$ac_pt_PKG_CONFIG"; then
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10296$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10297else
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
10300fi
10301
10302 if test "x$ac_pt_PKG_CONFIG" = x; then
10303 PKG_CONFIG=""
10304 else
10305 case $cross_compiling:$ac_tool_warned in
10306yes:)
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10308$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10309ac_tool_warned=yes ;;
10310esac
10311 PKG_CONFIG=$ac_pt_PKG_CONFIG
10312 fi
10313else
10314 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10315fi
10316
10317fi
10318if test -n "$PKG_CONFIG"; then
10319 _pkg_min_version=0.9.0
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10321$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10322 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10324$as_echo "yes" >&6; }
10325 else
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328 PKG_CONFIG=""
10329 fi
10330fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010331
10332# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10334$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010335
10336# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010338 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010339else
10340 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010341fi
10342
10343
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10345$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010346
10347# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10349$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010350
10351# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010353 withval=$with_system_ffi;
10354fi
10355
10356
Zachary Waref40d4dd2016-09-17 01:25:24 -050010357if test "$ac_sys_system" = "Darwin"
10358then
10359 case "$with_system_ffi" in
10360 "")
10361 with_system_ffi="no"
10362 ;;
10363 yes|no)
10364 ;;
10365 *)
10366 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10367 ;;
10368 esac
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10370$as_echo "$with_system_ffi" >&6; }
10371else
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10373$as_echo "yes" >&6; }
10374 if test "$with_system_ffi" != ""
10375 then
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10377$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10378 fi
10379 with_system_ffi="yes"
10380fi
Zachary Ware935043d2016-09-09 17:01:21 -070010381
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010382if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010383 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10384else
10385 LIBFFI_INCLUDEDIR=""
10386fi
10387
10388
Stefan Krah60187b52012-03-23 19:06:27 +010010389# Check for use of the system libmpdec library
10390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10391$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10392
10393# Check whether --with-system_libmpdec was given.
10394if test "${with_system_libmpdec+set}" = set; then :
10395 withval=$with_system_libmpdec;
10396else
10397 with_system_libmpdec="no"
10398fi
10399
10400
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10402$as_echo "$with_system_libmpdec" >&6; }
10403
Benjamin Peterson076ed002010-10-31 17:11:02 +000010404# Check for support for loadable sqlite extensions
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10406$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10407# Check whether --enable-loadable-sqlite-extensions was given.
10408if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10409 enableval=$enable_loadable_sqlite_extensions;
10410else
10411 enable_loadable_sqlite_extensions="no"
10412fi
10413
10414
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10416$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10417
Ned Deilyd819b932013-09-06 01:07:05 -070010418# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10419
10420
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10422$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10423
10424# Check whether --with-tcltk-includes was given.
10425if test "${with_tcltk_includes+set}" = set; then :
10426 withval=$with_tcltk_includes;
10427else
10428 with_tcltk_includes="default"
10429fi
10430
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10432$as_echo "$with_tcltk_includes" >&6; }
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10434$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10435
10436# Check whether --with-tcltk-libs was given.
10437if test "${with_tcltk_libs+set}" = set; then :
10438 withval=$with_tcltk_libs;
10439else
10440 with_tcltk_libs="default"
10441fi
10442
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10444$as_echo "$with_tcltk_libs" >&6; }
10445if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10446then
10447 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10448 then
10449 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10450 fi
10451 TCLTK_INCLUDES=""
10452 TCLTK_LIBS=""
10453else
10454 TCLTK_INCLUDES="$with_tcltk_includes"
10455 TCLTK_LIBS="$with_tcltk_libs"
10456fi
10457
Matthias Klose55708cc2009-04-30 08:06:49 +000010458# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10460$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010461
10462# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010464 withval=$with_dbmliborder;
10465if test x$with_dbmliborder = xyes
10466then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010467as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010468else
10469 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10470 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10471 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010472 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010473 fi
10474 done
10475fi
10476fi
10477
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10479$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481# Templates for things AC_DEFINEd more than once.
10482# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010483
10484
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010485if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010486then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010487 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010489
10490 posix_threads=yes
Miss Islington (bot)8750bce2019-09-27 19:20:31 -070010491 if test "$ac_sys_system" = "SunOS"; then
10492 CFLAGS="$CFLAGS -D_REENTRANT"
10493 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010494elif test "$ac_cv_kpthread" = "yes"
10495then
10496 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010497 if test "$ac_cv_cxx_thread" = "yes"; then
10498 CXX="$CXX -Kpthread"
10499 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010500 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010501elif test "$ac_cv_kthread" = "yes"
10502then
10503 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010504 if test "$ac_cv_cxx_thread" = "yes"; then
10505 CXX="$CXX -Kthread"
10506 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010507 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010508elif test "$ac_cv_pthread" = "yes"
10509then
10510 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010511 if test "$ac_cv_cxx_thread" = "yes"; then
10512 CXX="$CXX -pthread"
10513 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010514 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010515else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010516 if test ! -z "$withval" -a -d "$withval"
10517 then LDFLAGS="$LDFLAGS -L$withval"
10518 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010519
10520 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010521 # define _POSIX_THREADS in unistd.h. Some apparently don't
10522 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10524$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010526/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010527
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010528#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010529#ifdef _POSIX_THREADS
10530yes
10531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010532
10533_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010536 unistd_defines_pthreads=yes
10537else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010538 unistd_defines_pthreads=no
10539fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010540rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010541
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10543$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010546
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010547 # Just looking for pthread_create in libpthread is not enough:
10548 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10549 # So we really have to include pthread.h, and then link.
10550 _libs=$LIBS
10551 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10553$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010556
10557#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010558#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010559
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010560void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010561int
10562main ()
10563{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010564
10565pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ;
10567 return 0;
10568}
10569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10573$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010574 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010575
Guido van Rossum02a1c402000-02-25 19:26:31 +000010576else
Martin v. Löwis11437992002-04-12 09:54:03 +000010577
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010578 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010580if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010581
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010582 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010583
Guido van Rossumad678af1998-10-02 14:42:15 +000010584else
Guido van Rossumad678af1998-10-02 14:42:15 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10587$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010588if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590else
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010592LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596/* Override any GCC internal prototype to avoid an error.
10597 Use char because int might match the return type of a GCC
10598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010599#ifdef __cplusplus
10600extern "C"
10601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010602char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010603int
10604main ()
10605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 ;
10608 return 0;
10609}
10610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010616rm -f core conftest.err conftest.$ac_objext \
10617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010618LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10621$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010622if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010623
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010624 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010625 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010626
Greg Steinadf63d62000-07-05 10:38:09 +000010627else
Greg Steinadf63d62000-07-05 10:38:09 +000010628
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10630$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010631if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010633else
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010635LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639/* Override any GCC internal prototype to avoid an error.
10640 Use char because int might match the return type of a GCC
10641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010642#ifdef __cplusplus
10643extern "C"
10644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010645char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010646int
10647main ()
10648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 ;
10651 return 0;
10652}
10653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010656else
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010659rm -f core conftest.err conftest.$ac_objext \
10660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10664$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010665if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010667 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010668 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010669
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010670else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10673$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010674if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010676else
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010678LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682/* Override any GCC internal prototype to avoid an error.
10683 Use char because int might match the return type of a GCC
10684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010685#ifdef __cplusplus
10686extern "C"
10687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010688char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010689int
10690main ()
10691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ;
10694 return 0;
10695}
10696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010697if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010699else
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702rm -f core conftest.err conftest.$ac_objext \
10703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010704LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10707$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010708if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010709
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010710 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010711 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010712
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010713else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10716$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010717if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010719else
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010721LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010725/* Override any GCC internal prototype to avoid an error.
10726 Use char because int might match the return type of a GCC
10727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010728#ifdef __cplusplus
10729extern "C"
10730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010731char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010732int
10733main ()
10734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 ;
10737 return 0;
10738}
10739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010740if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010742else
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010745rm -f core conftest.err conftest.$ac_objext \
10746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010747LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10750$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010751if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010752
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010753 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010754 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010755
Guido van Rossumb93a8621998-05-07 13:27:32 +000010756else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010757
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010758 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10759
Guido van Rossum2d38f911996-06-26 19:47:01 +000010760fi
10761
Guido van Rossum627b2d71993-12-24 10:39:16 +000010762
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010763fi
10764
Guido van Rossum0be3e491997-05-22 20:33:33 +000010765fi
10766
Guido van Rossum49545951997-12-02 19:28:29 +000010767fi
10768
Guido van Rossumb93a8621998-05-07 13:27:32 +000010769fi
10770
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10776$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010777if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779else
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010781LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785/* Override any GCC internal prototype to avoid an error.
10786 Use char because int might match the return type of a GCC
10787 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010788#ifdef __cplusplus
10789extern "C"
10790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010791char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010792int
10793main ()
10794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 ;
10797 return 0;
10798}
10799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010805rm -f core conftest.err conftest.$ac_objext \
10806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010807LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10810$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010811if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010812
Martin v. Löwis130fb172001-07-19 11:00:41 +000010813 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010814
Guido van Rossum627b2d71993-12-24 10:39:16 +000010815fi
10816
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010817
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010819
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010820if test "$posix_threads" = "yes"; then
10821 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010824
10825 fi
10826
10827 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10828 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010829 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010830$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010831
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010832 ;;
10833 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010834$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010835
10836 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010837 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010838$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010839
10840 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841 esac
10842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10844$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010845 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847else
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849 ac_cv_pthread_system_supported=no
10850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010853
10854 #include <stdio.h>
10855 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010856 void *foo(void *parm) {
10857 return NULL;
10858 }
10859 main() {
10860 pthread_attr_t attr;
10861 pthread_t id;
10862 if (pthread_attr_init(&attr)) exit(-1);
10863 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10864 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10865 exit(0);
10866 }
10867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010868if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010869 ac_cv_pthread_system_supported=yes
10870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877
Guido van Rossum627b2d71993-12-24 10:39:16 +000010878fi
10879
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10881$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010882 if test "$ac_cv_pthread_system_supported" = "yes"; then
10883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885
10886 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010887 for ac_func in pthread_sigmask
10888do :
10889 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010890if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010891 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010892#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010893_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010894 case $ac_sys_system in
10895 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010898
10899 ;;
10900 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010901fi
10902done
10903
pdoxe14679c2017-10-05 00:01:56 -070010904 for ac_func in pthread_getcpuclockid
10905do :
10906 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10907if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10908 cat >>confdefs.h <<_ACEOF
10909#define HAVE_PTHREAD_GETCPUCLOCKID 1
10910_ACEOF
10911
10912fi
10913done
10914
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010915fi
10916
10917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10921$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010923if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10927$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928 ipv6=no
10929 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10931$as_echo "yes" >&6; }
10932 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933
10934 ipv6=yes
10935 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937else
Martin v. Löwis11437992002-04-12 09:54:03 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941 /* AF_INET6 available check */
10942#include <sys/types.h>
10943#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010944int
10945main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010947int domain = AF_INET6;
10948 ;
10949 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950}
Martin v. Löwis11437992002-04-12 09:54:03 +000010951_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010952if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10955$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958else
Matthias Kloseb159a552010-04-25 21:00:44 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10961$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010967if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10969$as_echo_n "checking if RFC2553 API is available... " >&6; }
10970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010971/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010972
10973 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010974#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010975int
10976main ()
10977{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010978struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010979 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ;
10981 return 0;
10982}
Matthias Kloseb159a552010-04-25 21:00:44 +000010983
Martin v. Löwis11437992002-04-12 09:54:03 +000010984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010989 ipv6=yes
10990
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010991else
Matthias Kloseb159a552010-04-25 21:00:44 +000010992
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010995 ipv6=no
10996
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010999fi
11000
11001if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011003
11004fi
11005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006fi
11007
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008
11009ipv6type=unknown
11010ipv6lib=none
11011ipv6trylibc=no
11012
11013if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11015$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011016 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11017 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011018 case $i in
11019 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023#include <netinet/in.h>
11024#ifdef IPV6_INRIA_VERSION
11025yes
11026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011030 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011032rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033
11034 ;;
11035 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039#include <netinet/in.h>
11040#ifdef __KAME__
11041yes
11042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011043_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046 ipv6type=$i;
11047 ipv6lib=inet6
11048 ipv6libdir=/usr/local/v6/lib
11049 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011051rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052
11053 ;;
11054 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011056/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011057
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058#include <features.h>
11059#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11060yes
11061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011062_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011065 ipv6type=$i;
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-inet6)
11072 if test -d /usr/inet6; then
11073 ipv6type=$i
11074 ipv6lib=inet6
11075 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011076 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077 fi
11078 ;;
11079 solaris)
11080 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011081 if $GREP -q tcp6 /etc/netconfig; 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 +000011084 fi
11085 fi
11086 ;;
11087 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011089/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011090
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091#include <sys/param.h>
11092#ifdef _TOSHIBA_INET6
11093yes
11094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011095_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011098 ipv6type=$i;
11099 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011100 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011102rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103
11104 ;;
11105 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011107/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011108
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109#include </usr/local/v6/include/sys/v6config.h>
11110#ifdef __V6D__
11111yes
11112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011113_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116 ipv6type=$i;
11117 ipv6lib=v6;
11118 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011119 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011121rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011122
11123 ;;
11124 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128#include <sys/param.h>
11129#ifdef _ZETA_MINAMI_INET6
11130yes
11131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011135 ipv6type=$i;
11136 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011137 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011139rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140
11141 ;;
11142 esac
11143 if test "$ipv6type" != "unknown"; then
11144 break
11145 fi
11146 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11148$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149fi
11150
11151if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11152 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11153 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11154 echo "using lib$ipv6lib"
11155 else
11156 if test $ipv6trylibc = "yes"; then
11157 echo "using libc"
11158 else
11159 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11160 echo "You need to fetch lib$ipv6lib.a from appropriate"
11161 echo 'ipv6 kit and compile beforehand.'
11162 exit 1
11163 fi
11164 fi
11165fi
11166
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11168$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11170/* end confdefs.h. */
11171 /* CAN_RAW_FD_FRAMES available check */
11172#include <linux/can/raw.h>
11173int
11174main ()
11175{
11176int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11177 ;
11178 return 0;
11179}
11180_ACEOF
11181if ac_fn_c_try_compile "$LINENO"; then :
11182
11183
11184$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11185
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11187$as_echo "yes" >&6; }
11188
11189else
11190
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11192$as_echo "no" >&6; }
11193
11194fi
11195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11196
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011197# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11199$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011202if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203 withval=$with_doc_strings;
11204fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011205
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011206
11207if test -z "$with_doc_strings"
11208then with_doc_strings="yes"
11209fi
11210if test "$with_doc_strings" != "no"
11211then
11212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011214
11215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11217$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011218
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011219# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11221$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225 withval=$with_pymalloc;
11226fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011227
Neil Schemenauera35c6882001-02-27 04:45:05 +000011228
Neil Schemenauer16c22972002-03-22 15:34:49 +000011229if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011230then
11231 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011232fi
11233if test "$with_pymalloc" != "no"
11234then
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011237
11238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11240$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011241
Nick Coghlan6ea41862017-06-11 13:16:15 +100011242# Check for --with-c-locale-coercion
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11244$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11245
11246# Check whether --with-c-locale-coercion was given.
11247if test "${with_c_locale_coercion+set}" = set; then :
11248 withval=$with_c_locale_coercion;
11249fi
11250
11251
11252if test -z "$with_c_locale_coercion"
11253then
11254 with_c_locale_coercion="yes"
11255fi
11256if test "$with_c_locale_coercion" != "no"
11257then
11258
11259$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11260
11261fi
11262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11263$as_echo "$with_c_locale_coercion" >&6; }
11264
Benjamin Peterson05159c42009-12-03 03:01:27 +000011265# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11267$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011268
11269# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011270if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011271 withval=$with_valgrind;
11272else
11273 with_valgrind=no
11274fi
11275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11277$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011278if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 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 +020011280if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011283
11284else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011285 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011286
11287fi
11288
11289
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011290 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011291fi
11292
Łukasz Langaa785c872016-09-09 17:37:37 -070011293# Check for DTrace support
11294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11295$as_echo_n "checking for --with-dtrace... " >&6; }
11296
11297# Check whether --with-dtrace was given.
11298if test "${with_dtrace+set}" = set; then :
11299 withval=$with_dtrace;
11300else
11301 with_dtrace=no
11302fi
11303
11304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11305$as_echo "$with_dtrace" >&6; }
11306
11307
11308
11309
11310
11311DTRACE=
11312DFLAGS=
11313DTRACE_HEADERS=
11314DTRACE_OBJS=
11315
11316if test "$with_dtrace" = "yes"
11317then
11318 # Extract the first word of "dtrace", so it can be a program name with args.
11319set dummy dtrace; ac_word=$2
11320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11321$as_echo_n "checking for $ac_word... " >&6; }
11322if ${ac_cv_path_DTRACE+:} false; then :
11323 $as_echo_n "(cached) " >&6
11324else
11325 case $DTRACE in
11326 [\\/]* | ?:[\\/]*)
11327 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11328 ;;
11329 *)
11330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11331for as_dir in $PATH
11332do
11333 IFS=$as_save_IFS
11334 test -z "$as_dir" && as_dir=.
11335 for ac_exec_ext in '' $ac_executable_extensions; do
11336 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11337 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11339 break 2
11340 fi
11341done
11342 done
11343IFS=$as_save_IFS
11344
11345 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11346 ;;
11347esac
11348fi
11349DTRACE=$ac_cv_path_DTRACE
11350if test -n "$DTRACE"; then
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11352$as_echo "$DTRACE" >&6; }
11353else
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
11356fi
11357
11358
11359 if test "$DTRACE" = "not found"; then
11360 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11361 fi
11362
11363$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11364
11365 DTRACE_HEADERS="Include/pydtrace_probes.h"
11366
11367 # On OS X, DTrace providers do not need to be explicitly compiled and
11368 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11369 # generation flag '-G'. We check for presence of this flag, rather than
11370 # hardcoding support by OS, in the interest of robustness.
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11372$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11373if ${ac_cv_dtrace_link+:} false; then :
11374 $as_echo_n "(cached) " >&6
11375else
11376 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011377 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011378 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11379 ac_cv_dtrace_link=yes
11380
11381fi
11382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11383$as_echo "$ac_cv_dtrace_link" >&6; }
11384 if test "$ac_cv_dtrace_link" = "yes"; then
11385 DTRACE_OBJS="Python/pydtrace.o"
11386 fi
11387fi
11388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011389# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011390
Guido van Rossum98935bf2001-09-05 19:13:16 +000011391DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011392
Guido van Rossume97ee181999-12-20 21:27:22 +000011393# the dlopen() function means we might want to use dynload_shlib.o. some
11394# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011395for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011396do :
11397 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011398if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011400#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011401_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011402
Guido van Rossume97ee181999-12-20 21:27:22 +000011403fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011404done
Guido van Rossume97ee181999-12-20 21:27:22 +000011405
Michael W. Hudson54241132001-12-07 15:38:26 +000011406
Guido van Rossume97ee181999-12-20 21:27:22 +000011407# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11408# loading of modules.
11409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11411$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011412if test -z "$DYNLOADFILE"
11413then
11414 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011415 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11416 if test "$ac_cv_func_dlopen" = yes
11417 then DYNLOADFILE="dynload_shlib.o"
11418 else DYNLOADFILE="dynload_aix.o"
11419 fi
11420 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011421 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011422 *)
11423 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11424 # out any dynamic loading
11425 if test "$ac_cv_func_dlopen" = yes
11426 then DYNLOADFILE="dynload_shlib.o"
11427 else DYNLOADFILE="dynload_stub.o"
11428 fi
11429 ;;
11430 esac
11431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11433$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011434if test "$DYNLOADFILE" != "dynload_stub.o"
11435then
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011438
11439fi
11440
Neil Schemenauer4e425612001-06-19 15:44:15 +000011441# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11442
Michael W. Hudson54241132001-12-07 15:38:26 +000011443
Matthias Kloseb9621712010-04-24 17:59:49 +000011444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11445$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011446if test -z "$MACHDEP_OBJS"
11447then
Jack Jansene578a632001-08-15 01:27:14 +000011448 MACHDEP_OBJS=$extra_machdep_objs
11449else
11450 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011451fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011452if test -z "$MACHDEP_OBJS"; then
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11454$as_echo "none" >&6; }
11455else
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11457$as_echo "$MACHDEP_OBJS" >&6; }
11458fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011459
Guido van Rossum627b2d71993-12-24 10:39:16 +000011460# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011461for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011462 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11463 faccessat fchmod fchmodat fchown fchownat \
Miss Islington (bot)84eb42e2019-09-12 04:19:21 -070011464 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011465 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011466 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011467 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011468 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011469 if_nameindex \
Miss Islington (bot)12acb5b2019-09-09 06:01:41 -070011470 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011471 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011472 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011473 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011474 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11475 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011476 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011477 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011478 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011479 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11480 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011481 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011482 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011483 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011484 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011485 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011486do :
11487 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11488ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011489if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011491#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011492_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011493
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011494fi
11495done
11496
Michael W. Hudson54241132001-12-07 15:38:26 +000011497
Benjamin Peterson40caa052018-09-12 15:52:40 -070011498# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11499# links. Some libc implementations have a stub lchmod implementation that always
11500# returns an error.
11501if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011502 for ac_func in lchmod
11503do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011504 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11505if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011506 cat >>confdefs.h <<_ACEOF
11507#define HAVE_LCHMOD 1
11508_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011509
11510fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011511done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011512
11513fi
11514
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011515ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11516 #include <dirent.h>
11517"
11518if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11519
11520$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11521
11522fi
11523
11524
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011525# For some functions, having a definition is not sufficient, since
11526# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11528$as_echo_n "checking for chroot... " >&6; }
11529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011530/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011531#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011532int
11533main ()
11534{
11535void *x=chroot
11536 ;
11537 return 0;
11538}
11539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011541
Matthias Kloseb9621712010-04-24 17:59:49 +000011542$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543
Matthias Kloseb159a552010-04-25 21:00:44 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011546else
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011549
11550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11553$as_echo_n "checking for link... " >&6; }
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011556#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557int
11558main ()
11559{
11560void *x=link
11561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
Matthias Kloseb159a552010-04-25 21:00:44 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011574
11575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11578$as_echo_n "checking for symlink... " >&6; }
11579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011580/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011581#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582int
11583main ()
11584{
11585void *x=symlink
11586 ;
11587 return 0;
11588}
11589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
Matthias Kloseb159a552010-04-25 21:00:44 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596else
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11598$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011599
11600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11603$as_echo_n "checking for fchdir... " >&6; }
11604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011606#include <unistd.h>
11607int
11608main ()
11609{
11610void *x=fchdir
11611 ;
11612 return 0;
11613}
11614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011618
Matthias Kloseb159a552010-04-25 21:00:44 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011621else
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11623$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011624
11625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11628$as_echo_n "checking for fsync... " >&6; }
11629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011631#include <unistd.h>
11632int
11633main ()
11634{
11635void *x=fsync
11636 ;
11637 return 0;
11638}
11639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
Matthias Kloseb159a552010-04-25 21:00:44 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011646else
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011649
11650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11653$as_echo_n "checking for fdatasync... " >&6; }
11654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011656#include <unistd.h>
11657int
11658main ()
11659{
11660void *x=fdatasync
11661 ;
11662 return 0;
11663}
11664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
Matthias Kloseb159a552010-04-25 21:00:44 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011674
11675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11678$as_echo_n "checking for epoll... " >&6; }
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011680/* end confdefs.h. */
11681#include <sys/epoll.h>
11682int
11683main ()
11684{
11685void *x=epoll_create
11686 ;
11687 return 0;
11688}
11689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011691
Matthias Kloseb9621712010-04-24 17:59:49 +000011692$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011693
Matthias Kloseb159a552010-04-25 21:00:44 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11698$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011699
11700fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11703$as_echo_n "checking for epoll_create1... " >&6; }
11704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11705/* end confdefs.h. */
11706#include <sys/epoll.h>
11707int
11708main ()
11709{
11710void *x=epoll_create1
11711 ;
11712 return 0;
11713}
11714_ACEOF
11715if ac_fn_c_try_compile "$LINENO"; then :
11716
11717$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11718
11719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11720$as_echo "yes" >&6; }
11721else
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
11724
11725fi
11726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11728$as_echo_n "checking for kqueue... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011730/* end confdefs.h. */
11731
11732#include <sys/types.h>
11733#include <sys/event.h>
11734
11735int
11736main ()
11737{
11738int x=kqueue()
11739 ;
11740 return 0;
11741}
11742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011746
Matthias Kloseb159a552010-04-25 21:00:44 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011752
11753fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11756$as_echo_n "checking for prlimit... " >&6; }
11757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11758/* end confdefs.h. */
11759
11760#include <sys/time.h>
11761#include <sys/resource.h>
11762
11763int
11764main ()
11765{
11766void *x=prlimit
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771if ac_fn_c_try_compile "$LINENO"; then :
11772
11773$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11774
11775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11776$as_echo "yes" >&6; }
11777else
11778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
11780
11781fi
11782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11783
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11785$as_echo_n "checking for memfd_create... " >&6; }
11786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11787/* end confdefs.h. */
11788
11789#ifdef HAVE_SYS_MMAN_H
11790#include <sys/mman.h>
11791#endif
11792#ifdef HAVE_SYS_MEMFD_H
11793#include <sys/memfd.h>
11794#endif
11795
11796int
11797main ()
11798{
11799void *x=memfd_create
11800 ;
11801 return 0;
11802}
11803_ACEOF
11804if ac_fn_c_try_compile "$LINENO"; then :
11805
11806$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11807
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11809$as_echo "yes" >&6; }
11810else
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11812$as_echo "no" >&6; }
11813
11814fi
11815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11816
Martin v. Löwisd5843682002-11-21 20:41:28 +000011817# On some systems (eg. FreeBSD 5), we would find a definition of the
11818# functions ctermid_r, setgroups in the library, but no prototype
11819# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11820# address to avoid compiler warnings and potential miscompilations
11821# because of the missing prototypes.
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11824$as_echo_n "checking for ctermid_r... " >&6; }
11825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011827
Martin v. Löwisd5843682002-11-21 20:41:28 +000011828#include <stdio.h>
11829
Martin v. Löwisd5843682002-11-21 20:41:28 +000011830int
11831main ()
11832{
11833void* p = ctermid_r
11834 ;
11835 return 0;
11836}
11837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839
Matthias Kloseb9621712010-04-24 17:59:49 +000011840$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011841
Matthias Kloseb159a552010-04-25 21:00:44 +000011842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011843$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11846$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011847
11848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11850
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11852$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011854 $as_echo_n "(cached) " >&6
11855else
11856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011857/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011858#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011859int
11860main ()
11861{
11862void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011863
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011864 ;
11865 return 0;
11866}
11867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011869 ac_cv_flock_decl=yes
11870else
11871 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011872
11873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011875
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011876fi
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11878$as_echo "$ac_cv_flock_decl" >&6; }
11879if test "x${ac_cv_flock_decl}" = xyes; then
11880 for ac_func in flock
11881do :
11882 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011883if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011884 cat >>confdefs.h <<_ACEOF
11885#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011886_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011887
Antoine Pitroua3000072010-09-07 14:52:42 +000011888else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011890$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011891if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011892 $as_echo_n "(cached) " >&6
11893else
11894 ac_check_lib_save_LIBS=$LIBS
11895LIBS="-lbsd $LIBS"
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897/* end confdefs.h. */
11898
11899/* Override any GCC internal prototype to avoid an error.
11900 Use char because int might match the return type of a GCC
11901 builtin and then its argument prototype would still apply. */
11902#ifdef __cplusplus
11903extern "C"
11904#endif
11905char flock ();
11906int
11907main ()
11908{
11909return flock ();
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914if ac_fn_c_try_link "$LINENO"; then :
11915 ac_cv_lib_bsd_flock=yes
11916else
11917 ac_cv_lib_bsd_flock=no
11918fi
11919rm -f core conftest.err conftest.$ac_objext \
11920 conftest$ac_exeext conftest.$ac_ext
11921LIBS=$ac_check_lib_save_LIBS
11922fi
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11924$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011925if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011926 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011927
11928
11929$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11930
11931
11932fi
11933
11934
11935fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011936done
11937
Antoine Pitroua3000072010-09-07 14:52:42 +000011938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11941$as_echo_n "checking for getpagesize... " >&6; }
11942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011943/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011944
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011945#include <unistd.h>
11946
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011947int
11948main ()
11949{
11950void* p = getpagesize
11951 ;
11952 return 0;
11953}
11954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011958
Matthias Kloseb159a552010-04-25 21:00:44 +000011959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11963$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011964
11965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011967
Victor Stinner984890f2011-11-24 13:53:38 +010011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11969$as_echo_n "checking for broken unsetenv... " >&6; }
11970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971/* end confdefs.h. */
11972
11973#include <stdlib.h>
11974
11975int
11976main ()
11977{
11978int res = unsetenv("DUMMY")
11979 ;
11980 return 0;
11981}
11982_ACEOF
11983if ac_fn_c_try_compile "$LINENO"; then :
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11985$as_echo "no" >&6; }
11986else
11987
11988$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11989
11990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11991$as_echo "yes" >&6; }
11992
11993fi
11994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11995
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011996for ac_prog in true
11997do
11998 # Extract the first word of "$ac_prog", so it can be a program name with args.
11999set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12001$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012004else
12005 if test -n "$TRUE"; then
12006 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12007else
12008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12009for as_dir in $PATH
12010do
12011 IFS=$as_save_IFS
12012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012015 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 $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 +000012017 break 2
12018 fi
12019done
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012022
12023fi
12024fi
12025TRUE=$ac_cv_prog_TRUE
12026if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12028$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12031$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012032fi
12033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012034
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012035 test -n "$TRUE" && break
12036done
12037test -n "$TRUE" || TRUE="/bin/true"
12038
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12041$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012042if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044else
12045 ac_check_lib_save_LIBS=$LIBS
12046LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012048/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012050/* Override any GCC internal prototype to avoid an error.
12051 Use char because int might match the return type of a GCC
12052 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053#ifdef __cplusplus
12054extern "C"
12055#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057int
12058main ()
12059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061 ;
12062 return 0;
12063}
12064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066 ac_cv_lib_c_inet_aton=yes
12067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012070rm -f core conftest.err conftest.$ac_objext \
12071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012072LIBS=$ac_check_lib_save_LIBS
12073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12075$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012077 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12080$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012081if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083else
12084 ac_check_lib_save_LIBS=$LIBS
12085LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012087/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089/* Override any GCC internal prototype to avoid an error.
12090 Use char because int might match the return type of a GCC
12091 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012092#ifdef __cplusplus
12093extern "C"
12094#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012095char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012096int
12097main ()
12098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100 ;
12101 return 0;
12102}
12103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105 ac_cv_lib_resolv_inet_aton=yes
12106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012109rm -f core conftest.err conftest.$ac_objext \
12110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012111LIBS=$ac_check_lib_save_LIBS
12112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12114$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012115if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012116 cat >>confdefs.h <<_ACEOF
12117#define HAVE_LIBRESOLV 1
12118_ACEOF
12119
12120 LIBS="-lresolv $LIBS"
12121
12122fi
12123
12124
12125fi
12126
12127
Christian Heimesd0764e22007-12-04 15:00:33 +000012128# On Tru64, chflags seems to be present, but calling it will
12129# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12131$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012132if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012136 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012139/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012140
Christian Heimesd0764e22007-12-04 15:00:33 +000012141#include <sys/stat.h>
12142#include <unistd.h>
12143int main(int argc, char*argv[])
12144{
12145 if(chflags(argv[0], 0) != 0)
12146 return 1;
12147 return 0;
12148}
Ned Deily3eb67d52011-06-28 00:00:28 -070012149
Christian Heimesd0764e22007-12-04 15:00:33 +000012150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012152 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012158fi
12159
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12163$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012164if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012166if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012167 ac_cv_have_chflags="yes"
12168else
12169 ac_cv_have_chflags="no"
12170fi
12171
12172fi
12173if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012174
Matthias Kloseb9621712010-04-24 17:59:49 +000012175$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012176
12177fi
12178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12180$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012185 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012188/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012189
Christian Heimesd0764e22007-12-04 15:00:33 +000012190#include <sys/stat.h>
12191#include <unistd.h>
12192int main(int argc, char*argv[])
12193{
12194 if(lchflags(argv[0], 0) != 0)
12195 return 1;
12196 return 0;
12197}
Ned Deily3eb67d52011-06-28 00:00:28 -070012198
Christian Heimesd0764e22007-12-04 15:00:33 +000012199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012201 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012207fi
12208
12209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12212$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012213if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012215if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012216 ac_cv_have_lchflags="yes"
12217else
12218 ac_cv_have_lchflags="no"
12219fi
12220
12221fi
12222if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012225
12226fi
12227
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012228case $ac_sys_system/$ac_sys_release in
12229Darwin/*)
12230 _CUR_CFLAGS="${CFLAGS}"
12231 _CUR_LDFLAGS="${LDFLAGS}"
12232 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12233 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12234 ;;
12235esac
12236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12238$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012241else
12242 ac_check_lib_save_LIBS=$LIBS
12243LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012245/* end confdefs.h. */
12246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247/* Override any GCC internal prototype to avoid an error.
12248 Use char because int might match the return type of a GCC
12249 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012250#ifdef __cplusplus
12251extern "C"
12252#endif
12253char inflateCopy ();
12254int
12255main ()
12256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012258 ;
12259 return 0;
12260}
12261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012263 ac_cv_lib_z_inflateCopy=yes
12264else
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012267rm -f core conftest.err conftest.$ac_objext \
12268 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012269LIBS=$ac_check_lib_save_LIBS
12270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12272$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012273if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012276
12277fi
12278
12279
12280case $ac_sys_system/$ac_sys_release in
12281Darwin/*)
12282 CFLAGS="${_CUR_CFLAGS}"
12283 LDFLAGS="${_CUR_LDFLAGS}"
12284 ;;
12285esac
12286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12288$as_echo_n "checking for hstrerror... " >&6; }
12289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012290/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012291
Martin v. Löwise9416172003-05-03 10:12:45 +000012292#include <netdb.h>
12293
Martin v. Löwise9416172003-05-03 10:12:45 +000012294int
12295main ()
12296{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012297void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012298 ;
12299 return 0;
12300}
12301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012305
Matthias Kloseb159a552010-04-25 21:00:44 +000012306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012307$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12310$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012311
12312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313rm -f core conftest.err conftest.$ac_objext \
12314 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12317$as_echo_n "checking for inet_aton... " >&6; }
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012320
Martin v. Löwis86d66262006-02-17 08:40:11 +000012321#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012322#include <sys/socket.h>
12323#include <netinet/in.h>
12324#include <arpa/inet.h>
12325
Martin v. Löwise9416172003-05-03 10:12:45 +000012326int
12327main ()
12328{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012329void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012337
Matthias Kloseb159a552010-04-25 21:00:44 +000012338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012339$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012340else
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012343
12344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012345rm -f core conftest.err conftest.$ac_objext \
12346 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12349$as_echo_n "checking for inet_pton... " >&6; }
12350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012351/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012352
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012353#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012354#include <sys/socket.h>
12355#include <netinet/in.h>
12356#include <arpa/inet.h>
12357
Martin v. Löwise9416172003-05-03 10:12:45 +000012358int
12359main ()
12360{
12361void* p = inet_pton
12362 ;
12363 return 0;
12364}
12365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012369
Matthias Kloseb159a552010-04-25 21:00:44 +000012370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012371$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12374$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012375
12376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012378
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012379# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12381$as_echo_n "checking for setgroups... " >&6; }
12382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012383/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012384
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012385#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012386#ifdef HAVE_GRP_H
12387#include <grp.h>
12388#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012389
Martin v. Löwisd5843682002-11-21 20:41:28 +000012390int
12391main ()
12392{
12393void* p = setgroups
12394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012399
Matthias Kloseb9621712010-04-24 17:59:49 +000012400$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012401
Matthias Kloseb159a552010-04-25 21:00:44 +000012402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012403$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012404else
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012407
12408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012410
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012411# check for openpty and forkpty
12412
12413for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012414do :
12415 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012416if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012418#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012419_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012420
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012421else
Matthias Kloseb9621712010-04-24 17:59:49 +000012422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12423$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012424if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012426else
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012428LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432/* Override any GCC internal prototype to avoid an error.
12433 Use char because int might match the return type of a GCC
12434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012435#ifdef __cplusplus
12436extern "C"
12437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012438char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012439int
12440main ()
12441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ;
12444 return 0;
12445}
12446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012447if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012449else
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012452rm -f core conftest.err conftest.$ac_objext \
12453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012454LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12457$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012458if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12463$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012464if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012466else
12467 ac_check_lib_save_LIBS=$LIBS
12468LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012470/* end confdefs.h. */
12471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472/* Override any GCC internal prototype to avoid an error.
12473 Use char because int might match the return type of a GCC
12474 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012475#ifdef __cplusplus
12476extern "C"
12477#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012478char openpty ();
12479int
12480main ()
12481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012488 ac_cv_lib_bsd_openpty=yes
12489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012494LIBS=$ac_check_lib_save_LIBS
12495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12497$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012498if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012500 LIBS="$LIBS -lbsd"
12501fi
12502
12503
12504fi
12505
Fred Drake8cef4cf2000-06-28 16:40:38 +000012506
12507fi
12508done
12509
12510for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012511do :
12512 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012513if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012516_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12520$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012521if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012523else
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012525LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529/* Override any GCC internal prototype to avoid an error.
12530 Use char because int might match the return type of a GCC
12531 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012532#ifdef __cplusplus
12533extern "C"
12534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012535char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012536int
12537main ()
12538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ;
12541 return 0;
12542}
12543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012544if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012546else
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012549rm -f core conftest.err conftest.$ac_objext \
12550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012551LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12554$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012555if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12560$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012561if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012563else
12564 ac_check_lib_save_LIBS=$LIBS
12565LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012567/* end confdefs.h. */
12568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569/* Override any GCC internal prototype to avoid an error.
12570 Use char because int might match the return type of a GCC
12571 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012572#ifdef __cplusplus
12573extern "C"
12574#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012575char forkpty ();
12576int
12577main ()
12578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012580 ;
12581 return 0;
12582}
12583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012585 ac_cv_lib_bsd_forkpty=yes
12586else
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012589rm -f core conftest.err conftest.$ac_objext \
12590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012591LIBS=$ac_check_lib_save_LIBS
12592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12594$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012595if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012597 LIBS="$LIBS -lbsd"
12598fi
12599
12600
12601fi
12602
Fred Drake8cef4cf2000-06-28 16:40:38 +000012603
12604fi
12605done
12606
Jack Jansendd19cf82001-12-06 22:36:17 +000012607
Michael W. Hudson54241132001-12-07 15:38:26 +000012608# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012609for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012610do :
12611 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12612ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012613if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012615#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012616_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012617
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012618fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619done
12620
Michael W. Hudson54241132001-12-07 15:38:26 +000012621
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012622ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012623if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012624 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012625
Martin v. Löwis1142de32002-03-29 16:28:31 +000012626else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012628 *" dup2.$ac_objext "* ) ;;
12629 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012631esac
12632
Martin v. Löwis1142de32002-03-29 16:28:31 +000012633fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012634
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012635ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012636if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012637 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12638
12639else
12640 case " $LIBOBJS " in
12641 *" strdup.$ac_objext "* ) ;;
12642 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12643 ;;
12644esac
12645
12646fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012647
12648
12649for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012650do :
12651 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012652if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012658#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012659int
12660main ()
12661{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012670
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012673
Guido van Rossum627b2d71993-12-24 10:39:16 +000012674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012675done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012676
Jack Jansen150753c2003-03-29 22:07:47 +000012677for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012678do :
12679 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012680if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012681 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012682#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012686#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012687int
12688main ()
12689{
12690setpgrp(0,0);
12691 ;
12692 return 0;
12693}
12694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012698
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012701
12702fi
12703done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012704
Thomas Wouters3a584202000-08-05 23:28:51 +000012705for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012706do :
12707 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012708if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012714#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012715int
12716main ()
12717{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012723if ac_fn_c_try_compile "$LINENO"; then :
12724
Guido van Rossum627b2d71993-12-24 10:39:16 +000012725else
Skip Montanaro6dead952003-09-25 14:50:04 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012728
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012732
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012733fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012734done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012735
Michael W. Hudson54241132001-12-07 15:38:26 +000012736
Gregory P. Smith387512c2018-12-30 15:42:32 -080012737# We search for both crypt and crypt_r as one or the other may be defined
12738# This gets us our -lcrypt in LIBS when required on the target platform.
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12740$as_echo_n "checking for library containing crypt... " >&6; }
12741if ${ac_cv_search_crypt+:} false; then :
12742 $as_echo_n "(cached) " >&6
12743else
12744 ac_func_search_save_LIBS=$LIBS
12745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746/* end confdefs.h. */
12747
12748/* Override any GCC internal prototype to avoid an error.
12749 Use char because int might match the return type of a GCC
12750 builtin and then its argument prototype would still apply. */
12751#ifdef __cplusplus
12752extern "C"
12753#endif
12754char crypt ();
12755int
12756main ()
12757{
12758return crypt ();
12759 ;
12760 return 0;
12761}
12762_ACEOF
12763for ac_lib in '' crypt; do
12764 if test -z "$ac_lib"; then
12765 ac_res="none required"
12766 else
12767 ac_res=-l$ac_lib
12768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12769 fi
12770 if ac_fn_c_try_link "$LINENO"; then :
12771 ac_cv_search_crypt=$ac_res
12772fi
12773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext
12775 if ${ac_cv_search_crypt+:} false; then :
12776 break
12777fi
12778done
12779if ${ac_cv_search_crypt+:} false; then :
12780
12781else
12782 ac_cv_search_crypt=no
12783fi
12784rm conftest.$ac_ext
12785LIBS=$ac_func_search_save_LIBS
12786fi
12787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12788$as_echo "$ac_cv_search_crypt" >&6; }
12789ac_res=$ac_cv_search_crypt
12790if test "$ac_res" != no; then :
12791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12792
12793fi
12794
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12796$as_echo_n "checking for library containing crypt_r... " >&6; }
12797if ${ac_cv_search_crypt_r+:} false; then :
12798 $as_echo_n "(cached) " >&6
12799else
12800 ac_func_search_save_LIBS=$LIBS
12801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802/* end confdefs.h. */
12803
12804/* Override any GCC internal prototype to avoid an error.
12805 Use char because int might match the return type of a GCC
12806 builtin and then its argument prototype would still apply. */
12807#ifdef __cplusplus
12808extern "C"
12809#endif
12810char crypt_r ();
12811int
12812main ()
12813{
12814return crypt_r ();
12815 ;
12816 return 0;
12817}
12818_ACEOF
12819for ac_lib in '' crypt; do
12820 if test -z "$ac_lib"; then
12821 ac_res="none required"
12822 else
12823 ac_res=-l$ac_lib
12824 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12825 fi
12826 if ac_fn_c_try_link "$LINENO"; then :
12827 ac_cv_search_crypt_r=$ac_res
12828fi
12829rm -f core conftest.err conftest.$ac_objext \
12830 conftest$ac_exeext
12831 if ${ac_cv_search_crypt_r+:} false; then :
12832 break
12833fi
12834done
12835if ${ac_cv_search_crypt_r+:} false; then :
12836
12837else
12838 ac_cv_search_crypt_r=no
12839fi
12840rm conftest.$ac_ext
12841LIBS=$ac_func_search_save_LIBS
12842fi
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12844$as_echo "$ac_cv_search_crypt_r" >&6; }
12845ac_res=$ac_cv_search_crypt_r
12846if test "$ac_res" != no; then :
12847 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12848
12849fi
12850
12851
12852ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12853if test "x$ac_cv_func_crypt_r" = xyes; then :
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855/* end confdefs.h. */
12856
12857#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12858#include <crypt.h>
12859
12860int
12861main ()
12862{
12863
12864struct crypt_data d;
12865char *r = crypt_r("", "", &d);
12866
12867 ;
12868 return 0;
12869}
12870_ACEOF
12871if ac_fn_c_try_compile "$LINENO"; then :
12872
12873$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12874
12875fi
12876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12877
12878fi
12879
12880
Victor Stinnere0be4232011-10-25 13:06:09 +020012881for ac_func in clock_gettime
12882do :
12883 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12884if test "x$ac_cv_func_clock_gettime" = xyes; then :
12885 cat >>confdefs.h <<_ACEOF
12886#define HAVE_CLOCK_GETTIME 1
12887_ACEOF
12888
12889else
12890
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12892$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12893if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12894 $as_echo_n "(cached) " >&6
12895else
12896 ac_check_lib_save_LIBS=$LIBS
12897LIBS="-lrt $LIBS"
12898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12899/* end confdefs.h. */
12900
12901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
12904#ifdef __cplusplus
12905extern "C"
12906#endif
12907char clock_gettime ();
12908int
12909main ()
12910{
12911return clock_gettime ();
12912 ;
12913 return 0;
12914}
12915_ACEOF
12916if ac_fn_c_try_link "$LINENO"; then :
12917 ac_cv_lib_rt_clock_gettime=yes
12918else
12919 ac_cv_lib_rt_clock_gettime=no
12920fi
12921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
12923LIBS=$ac_check_lib_save_LIBS
12924fi
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12926$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12927if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12928
Victor Stinner7efb8332014-08-29 15:41:08 +020012929 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012930 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12931
12932
12933$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12934
12935
12936fi
12937
12938
12939fi
12940done
12941
12942
12943for ac_func in clock_getres
12944do :
12945 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12946if test "x$ac_cv_func_clock_getres" = xyes; then :
12947 cat >>confdefs.h <<_ACEOF
12948#define HAVE_CLOCK_GETRES 1
12949_ACEOF
12950
12951else
12952
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12954$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12955if ${ac_cv_lib_rt_clock_getres+:} false; then :
12956 $as_echo_n "(cached) " >&6
12957else
12958 ac_check_lib_save_LIBS=$LIBS
12959LIBS="-lrt $LIBS"
12960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961/* end confdefs.h. */
12962
12963/* Override any GCC internal prototype to avoid an error.
12964 Use char because int might match the return type of a GCC
12965 builtin and then its argument prototype would still apply. */
12966#ifdef __cplusplus
12967extern "C"
12968#endif
12969char clock_getres ();
12970int
12971main ()
12972{
12973return clock_getres ();
12974 ;
12975 return 0;
12976}
12977_ACEOF
12978if ac_fn_c_try_link "$LINENO"; then :
12979 ac_cv_lib_rt_clock_getres=yes
12980else
12981 ac_cv_lib_rt_clock_getres=no
12982fi
12983rm -f core conftest.err conftest.$ac_objext \
12984 conftest$ac_exeext conftest.$ac_ext
12985LIBS=$ac_check_lib_save_LIBS
12986fi
12987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12988$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12989if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12990
12991 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12992
12993
12994fi
12995
12996
12997fi
12998done
12999
13000
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013001for ac_func in clock_settime
13002do :
13003 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13004if test "x$ac_cv_func_clock_settime" = xyes; then :
13005 cat >>confdefs.h <<_ACEOF
13006#define HAVE_CLOCK_SETTIME 1
13007_ACEOF
13008
13009else
13010
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13012$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13013if ${ac_cv_lib_rt_clock_settime+:} false; then :
13014 $as_echo_n "(cached) " >&6
13015else
13016 ac_check_lib_save_LIBS=$LIBS
13017LIBS="-lrt $LIBS"
13018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13019/* end confdefs.h. */
13020
13021/* Override any GCC internal prototype to avoid an error.
13022 Use char because int might match the return type of a GCC
13023 builtin and then its argument prototype would still apply. */
13024#ifdef __cplusplus
13025extern "C"
13026#endif
13027char clock_settime ();
13028int
13029main ()
13030{
13031return clock_settime ();
13032 ;
13033 return 0;
13034}
13035_ACEOF
13036if ac_fn_c_try_link "$LINENO"; then :
13037 ac_cv_lib_rt_clock_settime=yes
13038else
13039 ac_cv_lib_rt_clock_settime=no
13040fi
13041rm -f core conftest.err conftest.$ac_objext \
13042 conftest$ac_exeext conftest.$ac_ext
13043LIBS=$ac_check_lib_save_LIBS
13044fi
13045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13046$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13047if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13048
13049 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13050
13051
13052fi
13053
13054
13055fi
13056done
13057
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13060$as_echo_n "checking for major... " >&6; }
13061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013062/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013063
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013064#if defined(MAJOR_IN_MKDEV)
13065#include <sys/mkdev.h>
13066#elif defined(MAJOR_IN_SYSMACROS)
13067#include <sys/sysmacros.h>
13068#else
13069#include <sys/types.h>
13070#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013071
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013072int
13073main ()
13074{
13075
13076 makedev(major(0),minor(0));
13077
13078 ;
13079 return 0;
13080}
13081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013083
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13088$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013089
13090else
Skip Montanaro6dead952003-09-25 14:50:04 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13093$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013094
13095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013096rm -f core conftest.err conftest.$ac_objext \
13097 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013098
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013099# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013100# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13102$as_echo_n "checking for getaddrinfo... " >&6; }
13103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013105
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013106#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013107#include <sys/socket.h>
13108#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013109#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111int
13112main ()
13113{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013114getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 ;
13116 return 0;
13117}
13118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120 have_getaddrinfo=yes
13121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013124rm -f core conftest.err conftest.$ac_objext \
13125 conftest$ac_exeext conftest.$ac_ext
13126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13127$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128if test $have_getaddrinfo = yes
13129then
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13131$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013132 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134else
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013136
13137if test "${enable_ipv6+set}" = set; then
13138 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13139else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013141fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013144/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145
Stefan Krah19c21392012-11-22 23:47:32 +010013146#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147#include <sys/types.h>
13148#include <netdb.h>
13149#include <string.h>
13150#include <sys/socket.h>
13151#include <netinet/in.h>
13152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154{
13155 int passive, gaierr, inet4 = 0, inet6 = 0;
13156 struct addrinfo hints, *ai, *aitop;
13157 char straddr[INET6_ADDRSTRLEN], strport[16];
13158
13159 for (passive = 0; passive <= 1; passive++) {
13160 memset(&hints, 0, sizeof(hints));
13161 hints.ai_family = AF_UNSPEC;
13162 hints.ai_flags = passive ? AI_PASSIVE : 0;
13163 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013164 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013165 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13166 (void)gai_strerror(gaierr);
13167 goto bad;
13168 }
13169 for (ai = aitop; ai; ai = ai->ai_next) {
13170 if (ai->ai_addr == NULL ||
13171 ai->ai_addrlen == 0 ||
13172 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13173 straddr, sizeof(straddr), strport, sizeof(strport),
13174 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13175 goto bad;
13176 }
13177 switch (ai->ai_family) {
13178 case AF_INET:
13179 if (strcmp(strport, "54321") != 0) {
13180 goto bad;
13181 }
13182 if (passive) {
13183 if (strcmp(straddr, "0.0.0.0") != 0) {
13184 goto bad;
13185 }
13186 } else {
13187 if (strcmp(straddr, "127.0.0.1") != 0) {
13188 goto bad;
13189 }
13190 }
13191 inet4++;
13192 break;
13193 case AF_INET6:
13194 if (strcmp(strport, "54321") != 0) {
13195 goto bad;
13196 }
13197 if (passive) {
13198 if (strcmp(straddr, "::") != 0) {
13199 goto bad;
13200 }
13201 } else {
13202 if (strcmp(straddr, "::1") != 0) {
13203 goto bad;
13204 }
13205 }
13206 inet6++;
13207 break;
13208 case AF_UNSPEC:
13209 goto bad;
13210 break;
13211 default:
13212 /* another family support? */
13213 break;
13214 }
13215 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013216 freeaddrinfo(aitop);
13217 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013218 }
13219
13220 if (!(inet4 == 0 || inet4 == 2))
13221 goto bad;
13222 if (!(inet6 == 0 || inet6 == 2))
13223 goto bad;
13224
13225 if (aitop)
13226 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013227 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228
13229 bad:
13230 if (aitop)
13231 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013232 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233}
13234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013237 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238else
Matthias Kloseb9621712010-04-24 17:59:49 +000013239 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013245fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013246
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13250$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13251
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013252if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253then
13254 if test $ipv6 = yes
13255 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256 echo 'Fatal: You must get working getaddrinfo() function.'
13257 echo ' or you can specify "--disable-ipv6"'.
13258 exit 1
13259 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013260else
Martin v. Löwis11437992002-04-12 09:54:03 +000013261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013263
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013264fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013265
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013266for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013267do :
13268 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013269if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013271#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013272_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013274fi
13275done
13276
Michael W. Hudson54241132001-12-07 15:38:26 +000013277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013278# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13280$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013286#include <sys/types.h>
13287#include <sys/time.h>
13288#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290int
13291main ()
13292{
13293if ((struct tm *) 0)
13294return 0;
13295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13307$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013308if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311
13312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13315$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013316if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321#include <sys/types.h>
13322#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
Martin v. Löwis11437992002-04-12 09:54:03 +000013324int
13325main ()
13326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327struct tm tm;
13328 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 ;
13331 return 0;
13332}
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335 ac_cv_struct_tm=time.h
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13342$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013343if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346
13347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349ac_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 +000013350#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352"
Victor Stinnere0be4232011-10-25 13:06:09 +020013353if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
13355cat >>confdefs.h <<_ACEOF
13356#define HAVE_STRUCT_TM_TM_ZONE 1
13357_ACEOF
13358
13359
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013361
Martin v. Löwis11437992002-04-12 09:54:03 +000013362if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365
13366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13368"
Victor Stinnere0be4232011-10-25 13:06:09 +020013369if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373fi
13374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013376#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377_ACEOF
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13380$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013381if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013385/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013386#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387#if !HAVE_DECL_TZNAME
13388extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391int
13392main ()
13393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 ;
13396 return 0;
13397}
13398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013399if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400 ac_cv_var_tzname=yes
13401else
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013404rm -f core conftest.err conftest.$ac_objext \
13405 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13408$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013409 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013413 fi
13414fi
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416ac_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 +020013417if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
13419cat >>confdefs.h <<_ACEOF
13420#define HAVE_STRUCT_STAT_ST_RDEV 1
13421_ACEOF
13422
13423
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013424fi
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426ac_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 +020013427if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429cat >>confdefs.h <<_ACEOF
13430#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13431_ACEOF
13432
13433
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013434fi
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436ac_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 +020013437if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013438
13439cat >>confdefs.h <<_ACEOF
13440#define HAVE_STRUCT_STAT_ST_FLAGS 1
13441_ACEOF
13442
13443
13444fi
13445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446ac_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 +020013447if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013448
13449cat >>confdefs.h <<_ACEOF
13450#define HAVE_STRUCT_STAT_ST_GEN 1
13451_ACEOF
13452
13453
13454fi
13455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456ac_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 +020013457if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013458
13459cat >>confdefs.h <<_ACEOF
13460#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13461_ACEOF
13462
13463
13464fi
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466ac_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 +020013467if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013468
Martin v. Löwis11437992002-04-12 09:54:03 +000013469cat >>confdefs.h <<_ACEOF
13470#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13471_ACEOF
13472
13473
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013474fi
13475
Stefan Krah267b6392016-04-26 01:09:18 +020013476ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13477 #include <sys/types.h>
13478 #include <pwd.h>
13479
13480"
13481if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13482
13483cat >>confdefs.h <<_ACEOF
13484#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13485_ACEOF
13486
13487
13488fi
13489ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13490 #include <sys/types.h>
13491 #include <pwd.h>
13492
13493"
13494if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13495
13496cat >>confdefs.h <<_ACEOF
13497#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13498_ACEOF
13499
13500
13501fi
13502
Zachary Ware6a6967e2016-10-01 00:47:27 -050013503# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13504ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13505"
13506if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13507
13508cat >>confdefs.h <<_ACEOF
13509#define HAVE_SIGINFO_T_SI_BAND 1
13510_ACEOF
13511
13512
13513fi
13514
Michael W. Hudson54241132001-12-07 15:38:26 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13517$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013518if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013520else
Matthias Kloseb159a552010-04-25 21:00:44 +000013521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013523/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013524#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534 ac_cv_header_time_altzone=yes
13535else
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540fi
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13543$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547
13548fi
13549
Guido van Rossumda88dad1995-01-26 00:46:29 +000013550was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13552$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013554/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013555
13556#include <sys/types.h>
13557#include <sys/select.h>
13558#include <sys/time.h>
13559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560int
13561main ()
13562{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563;
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ;
13565 return 0;
13566}
13567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013569
13570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013573 was_it_defined=yes
13574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13578$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13581$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013582if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013586/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013587#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013588int
13589main ()
13590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013591struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ;
13593 return 0;
13594}
13595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013597 ac_cv_struct_addrinfo=yes
13598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13602fi
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13605$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013606if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609
13610fi
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13613$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013614if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616else
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013618/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619
13620# include <sys/types.h>
13621# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013622int
13623main ()
13624{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013625struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 ;
13627 return 0;
13628}
13629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013631 ac_cv_struct_sockaddr_storage=yes
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13636fi
13637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13639$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013640if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013643
13644fi
13645
Christian Heimesdffa3942016-09-05 23:54:41 +020013646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13647$as_echo_n "checking for sockaddr_alg... " >&6; }
13648if ${ac_cv_struct_sockaddr_alg+:} false; then :
13649 $as_echo_n "(cached) " >&6
13650else
13651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653
13654# include <sys/types.h>
13655# include <sys/socket.h>
13656# include <linux/if_alg.h>
13657int
13658main ()
13659{
13660struct sockaddr_alg s
13661 ;
13662 return 0;
13663}
13664_ACEOF
13665if ac_fn_c_try_compile "$LINENO"; then :
13666 ac_cv_struct_sockaddr_alg=yes
13667else
13668 ac_cv_struct_sockaddr_alg=no
13669fi
13670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13671fi
13672
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13674$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13675if test $ac_cv_struct_sockaddr_alg = yes; then
13676
13677$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13678
13679fi
13680
Guido van Rossum627b2d71993-12-24 10:39:16 +000013681# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13684$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013685if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013691int
13692main ()
13693{
13694static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013695test_array [0] = 0;
13696return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
13698 ;
13699 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013700}
Martin v. Löwis11437992002-04-12 09:54:03 +000013701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013703 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13710$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713
13714fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13717$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013718if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013722/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013723
Martin v. Löwis11437992002-04-12 09:54:03 +000013724int
13725main ()
13726{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013729 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013731 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733 char const *const *pcpcc;
13734 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 /* NEC SVR4.0.2 mips cc rejects this. */
13736 struct point {int x, y;};
13737 static struct point const zero = {0,0};
13738 /* AIX XL C 1.02.0.0 rejects this.
13739 It does not let you subtract one const X* pointer from another in
13740 an arm of an if-expression whose if-part is not a constant
13741 expression */
13742 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 ++pcpcc;
13746 ppc = (char**) pcpcc;
13747 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013748 { /* SCO 3.2v4 cc rejects this sort of thing. */
13749 char tx;
13750 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 }
13756 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13757 int x[] = {25, 17};
13758 const int *foo = &x[0];
13759 ++foo;
13760 }
13761 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13762 typedef const int *iptr;
13763 iptr p = 0;
13764 ++p;
13765 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013766 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013768 struct s { int j; const int *ap[3]; } bx;
13769 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 }
13771 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13772 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013773 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013774 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013775 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013776#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 ;
13779 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013780}
Martin v. Löwis11437992002-04-12 09:54:03 +000013781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013782if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783 ac_cv_c_const=yes
13784else
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13790$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013792
Matthias Kloseb9621712010-04-24 17:59:49 +000013793$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794
13795fi
13796
Michael W. Hudson54241132001-12-07 15:38:26 +000013797
Guido van Rossumda88dad1995-01-26 00:46:29 +000013798works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13800$as_echo_n "checking for working signed char... " >&6; }
13801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013802/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013803
Martin v. Löwis11437992002-04-12 09:54:03 +000013804int
13805main ()
13806{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013807signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 ;
13809 return 0;
13810}
13811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013813 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013814else
Skip Montanaro6dead952003-09-25 14:50:04 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013817
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013818
Guido van Rossum7f43da71994-08-01 12:15:30 +000013819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13822$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013823
Guido van Rossumda88dad1995-01-26 00:46:29 +000013824have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13826$as_echo_n "checking for prototypes... " >&6; }
13827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013828/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013833return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
Matthias Kloseb159a552010-04-25 21:00:44 +000013842 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13846$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013847
Guido van Rossumda88dad1995-01-26 00:46:29 +000013848works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13850$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013852/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013853
13854#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013855int foo(int x, ...) {
13856 va_list va;
13857 va_start(va, x);
13858 va_arg(va, int);
13859 va_arg(va, char *);
13860 va_arg(va, double);
13861 return 0;
13862}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863
Martin v. Löwis11437992002-04-12 09:54:03 +000013864int
13865main ()
13866{
Guido van Rossum90eea071996-08-30 20:58:57 +000013867return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 ;
13869 return 0;
13870}
13871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013872if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
13874
Matthias Kloseb9621712010-04-24 17:59:49 +000013875$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013877 works=yes
13878
Guido van Rossum627b2d71993-12-24 10:39:16 +000013879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13882$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883
Martin v. Löwisd6320502004-08-12 13:45:08 +000013884# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13886$as_echo_n "checking for socketpair... " >&6; }
13887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013888/* end confdefs.h. */
13889
13890#include <sys/types.h>
13891#include <sys/socket.h>
13892
13893int
13894main ()
13895{
13896void *x=socketpair
13897 ;
13898 return 0;
13899}
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013904
Matthias Kloseb159a552010-04-25 21:00:44 +000013905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013906$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13909$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013910
13911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013913
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013914# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13916$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013918/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919#include <sys/types.h>
13920#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013921int
13922main ()
13923{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013924struct sockaddr x;
13925x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 ;
13927 return 0;
13928}
13929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013930if ac_fn_c_try_compile "$LINENO"; then :
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13932$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935
13936else
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13938$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013939
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013942
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013944
13945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13952$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013953 OLD_CFLAGS=$CFLAGS
13954 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013956/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013957
13958# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960int
13961main ()
13962{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013963
13964 char *name;
13965 struct hostent *he, *res;
13966 char buffer[2048];
13967 int buflen = 2048;
13968 int h_errnop;
13969
13970 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
13972 ;
13973 return 0;
13974}
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013979
Martin v. Löwis11437992002-04-12 09:54:03 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13984$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013985
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013986else
Skip Montanaro6dead952003-09-25 14:50:04 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13989$as_echo "no" >&6; }
13990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13991$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013993/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013995# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Martin v. Löwis11437992002-04-12 09:54:03 +000013997int
13998main ()
13999{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000
14001 char *name;
14002 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014003 char buffer[2048];
14004 int buflen = 2048;
14005 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006
Matthias Kloseb159a552010-04-25 21:00:44 +000014007 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
14009 ;
14010 return 0;
14011}
14012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014016
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
Matthias Kloseb159a552010-04-25 21:00:44 +000014018$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14021$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014023else
Skip Montanaro6dead952003-09-25 14:50:04 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14026$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14028$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030/* end confdefs.h. */
14031
14032# include <netdb.h>
14033
14034int
14035main ()
14036{
14037
14038 char *name;
14039 struct hostent *he;
14040 struct hostent_data data;
14041
14042 (void) gethostbyname_r(name, he, &data);
14043
14044 ;
14045 return 0;
14046}
14047_ACEOF
14048if ac_fn_c_try_compile "$LINENO"; then :
14049
14050 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14051
14052
14053$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14054
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14056$as_echo "yes" >&6; }
14057
14058else
14059
14060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014062
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014068
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071 CFLAGS=$OLD_CFLAGS
14072
14073else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 for ac_func in gethostbyname
14076do :
14077 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014078if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014080#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014081_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014083fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014084done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085
Michael W. Hudson54241132001-12-07 15:38:26 +000014086
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087fi
14088
Michael W. Hudson54241132001-12-07 15:38:26 +000014089
14090
14091
14092
14093
14094
Guido van Rossum627b2d71993-12-24 10:39:16 +000014095# checks for system services
14096# (none yet)
14097
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014098# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014099ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014100if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014101
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014102else
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14104$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014105if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014107else
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014109LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113/* Override any GCC internal prototype to avoid an error.
14114 Use char because int might match the return type of a GCC
14115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014116#ifdef __cplusplus
14117extern "C"
14118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014119char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014120int
14121main ()
14122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ;
14125 return 0;
14126}
14127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014130else
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014133rm -f core conftest.err conftest.$ac_objext \
14134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014135LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14138$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014139if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 cat >>confdefs.h <<_ACEOF
14141#define HAVE_LIBIEEE 1
14142_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014144 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014145
Guido van Rossum627b2d71993-12-24 10:39:16 +000014146fi
14147
Michael W. Hudson54241132001-12-07 15:38:26 +000014148
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014149fi
14150
Michael W. Hudson54241132001-12-07 15:38:26 +000014151
Guido van Rossum7f43da71994-08-01 12:15:30 +000014152# check for --with-libm=...
14153
Guido van Rossum563e7081996-09-10 18:20:48 +000014154case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014155Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014156*) LIBM=-lm
14157esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14159$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014162if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014164if test "$withval" = no
14165then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14167$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014168elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014169then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14171$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014172else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014173fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014174else
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14176$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177fi
14178
Guido van Rossum7f43da71994-08-01 12:15:30 +000014179
14180# check for --with-libc=...
14181
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14183$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014186if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014188if test "$withval" = no
14189then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14191$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014192elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014193then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14195$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014196else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014197fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14200$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201fi
14202
Guido van Rossum7f43da71994-08-01 12:15:30 +000014203
Stefan Krah1919b7e2012-03-21 18:25:23 +010014204# **************************************
14205# * Check for gcc x64 inline assembler *
14206# **************************************
14207
14208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14209$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14211/* end confdefs.h. */
14212
14213int
14214main ()
14215{
14216
14217 __asm__ __volatile__ ("movq %rcx, %rax");
14218
14219 ;
14220 return 0;
14221}
14222_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014223if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014224 have_gcc_asm_for_x64=yes
14225else
14226 have_gcc_asm_for_x64=no
14227fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014228rm -f core conftest.err conftest.$ac_objext \
14229 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14231$as_echo "$have_gcc_asm_for_x64" >&6; }
14232if test "$have_gcc_asm_for_x64" = yes
14233then
14234
14235$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14236
14237fi
14238
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014239# **************************************************
14240# * Check for various properties of floating point *
14241# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014242
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14244$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14245if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247else
14248
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014249
14250ax_cv_c_float_words_bigendian=unknown
14251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252/* end confdefs.h. */
14253
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014254
14255double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14256
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014257
14258_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014259if ac_fn_c_try_compile "$LINENO"; then :
14260
14261
14262if grep noonsees conftest.$ac_objext >/dev/null ; then
14263 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014264fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014265if grep seesnoon conftest.$ac_objext >/dev/null ; then
14266 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14267 ax_cv_c_float_words_bigendian=no
14268 else
14269 ax_cv_c_float_words_bigendian=unknown
14270 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014271fi
14272
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014273
14274fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014276fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14278$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014280case $ax_cv_c_float_words_bigendian in
14281 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014282
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014283$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14284 ;;
14285 no)
14286 ;;
14287 *)
14288 as_fn_error $? "
14289
14290Unknown float word ordering. You need to manually preset
14291ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14292
14293 " "$LINENO" 5 ;;
14294esac
14295
14296
14297if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298then
14299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014302elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014303then
14304
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014305$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14306
14307else
14308 # Some ARM platforms use a mixed-endian representation for doubles.
14309 # While Python doesn't currently have full support for these platforms
14310 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14311 # conversions work.
14312 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14313 # or little, then it must be this?
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014316
14317fi
14318
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014319# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014320# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014321# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014322# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014323# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014324# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014325
14326# This inline assembler syntax may also work for suncc and icc,
14327# so we try it on all platforms.
14328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14330$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014332/* end confdefs.h. */
14333
14334int
14335main ()
14336{
14337
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014338 unsigned short cw;
14339 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14340 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014341
14342 ;
14343 return 0;
14344}
14345_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014346if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014347 have_gcc_asm_for_x87=yes
14348else
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014350fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014351rm -f core conftest.err conftest.$ac_objext \
14352 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14354$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014355if test "$have_gcc_asm_for_x87" = yes
14356then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014357
Matthias Kloseb9621712010-04-24 17:59:49 +000014358$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014359
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14363$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14365/* end confdefs.h. */
14366
14367int
14368main ()
14369{
14370
14371 unsigned int fpcr;
14372 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14373 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14374
14375 ;
14376 return 0;
14377}
14378_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014379if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014380 have_gcc_asm_for_mc68881=yes
14381else
14382 have_gcc_asm_for_mc68881=no
14383fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014384rm -f core conftest.err conftest.$ac_objext \
14385 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14387$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14388if test "$have_gcc_asm_for_mc68881" = yes
14389then
14390
14391$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14392
14393fi
14394
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014395# Detect whether system arithmetic is subject to x87-style double
14396# rounding issues. The result of this test has little meaning on non
14397# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14398# mode is round-to-nearest and double rounding issues are present, and
14399# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14401$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014402# $BASECFLAGS may affect the result
14403ac_save_cc="$CC"
14404CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014405if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014406 ac_cv_x87_double_rounding=no
14407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014409/* end confdefs.h. */
14410
14411#include <stdlib.h>
14412#include <math.h>
14413int main() {
14414 volatile double x, y, z;
14415 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14416 x = 0.99999999999999989; /* 1-2**-53 */
14417 y = 1./x;
14418 if (y != 1.)
14419 exit(0);
14420 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14421 x = 1e16;
14422 y = 2.99999;
14423 z = x + y;
14424 if (z != 1e16+4.)
14425 exit(0);
14426 /* both tests show evidence of double rounding */
14427 exit(1);
14428}
14429
14430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014431if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014432 ac_cv_x87_double_rounding=no
14433else
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14437 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014438fi
14439
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014440CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14442$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014443if test "$ac_cv_x87_double_rounding" = yes
14444then
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014447
14448fi
14449
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014450# ************************************
14451# * Check for mathematical functions *
14452# ************************************
14453
14454LIBS_SAVE=$LIBS
14455LIBS="$LIBS $LIBM"
14456
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014457for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14458do :
14459 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14460ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014461if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014462 cat >>confdefs.h <<_ACEOF
14463#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14464_ACEOF
14465
14466fi
14467done
14468
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014469for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014470do :
14471 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14472ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014473if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014474 cat >>confdefs.h <<_ACEOF
14475#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14476_ACEOF
14477
14478fi
14479done
14480
14481ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14482"
Victor Stinnere0be4232011-10-25 13:06:09 +020014483if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014484 ac_have_decl=1
14485else
14486 ac_have_decl=0
14487fi
14488
14489cat >>confdefs.h <<_ACEOF
14490#define HAVE_DECL_ISINF $ac_have_decl
14491_ACEOF
14492ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14493"
Victor Stinnere0be4232011-10-25 13:06:09 +020014494if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014495 ac_have_decl=1
14496else
14497 ac_have_decl=0
14498fi
14499
14500cat >>confdefs.h <<_ACEOF
14501#define HAVE_DECL_ISNAN $ac_have_decl
14502_ACEOF
14503ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14504"
Victor Stinnere0be4232011-10-25 13:06:09 +020014505if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014506 ac_have_decl=1
14507else
14508 ac_have_decl=0
14509fi
14510
14511cat >>confdefs.h <<_ACEOF
14512#define HAVE_DECL_ISFINITE $ac_have_decl
14513_ACEOF
14514
14515
Mark Dickinsona614f042009-11-28 12:48:43 +000014516# For multiprocessing module, check that sem_open
14517# actually works. For FreeBSD versions <= 7.2,
14518# the kernel module that provides POSIX semaphores
14519# isn't loaded by default, so an attempt to call
14520# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14522$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014523if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014525else
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014527 ac_cv_posix_semaphores_enabled=yes
14528else
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014530/* end confdefs.h. */
14531
14532#include <unistd.h>
14533#include <fcntl.h>
14534#include <stdio.h>
14535#include <semaphore.h>
14536#include <sys/stat.h>
14537
14538int main(void) {
14539 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14540 if (a == SEM_FAILED) {
14541 perror("sem_open");
14542 return 1;
14543 }
14544 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014545 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014546 return 0;
14547}
14548
14549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014550if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014551 ac_cv_posix_semaphores_enabled=yes
14552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14556 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014557fi
14558
14559
Mark Dickinsona614f042009-11-28 12:48:43 +000014560fi
14561
Matthias Kloseb9621712010-04-24 17:59:49 +000014562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14563$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014564if test $ac_cv_posix_semaphores_enabled = no
14565then
14566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014568
14569fi
14570
Mark Dickinson10683072009-04-18 21:18:19 +000014571# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14573$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014574if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014578 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014581/* end confdefs.h. */
14582
14583#include <unistd.h>
14584#include <fcntl.h>
14585#include <stdio.h>
14586#include <semaphore.h>
14587#include <sys/stat.h>
14588
14589int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014590 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014591 int count;
14592 int res;
14593 if(a==SEM_FAILED){
14594 perror("sem_open");
14595 return 1;
14596
14597 }
14598 res = sem_getvalue(a, &count);
14599 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014600 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014601 return res==-1 ? 1 : 0;
14602}
14603
Mark Dickinson10683072009-04-18 21:18:19 +000014604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014605if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014606 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014607else
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014612fi
14613
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014614
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014615fi
14616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14618$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014619if test $ac_cv_broken_sem_getvalue = yes
14620then
14621
Matthias Kloseb9621712010-04-24 17:59:49 +000014622$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014623
14624fi
14625
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014626ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14627"
14628if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14629 ac_have_decl=1
14630else
14631 ac_have_decl=0
14632fi
14633
14634cat >>confdefs.h <<_ACEOF
14635#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14636_ACEOF
14637ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14638"
14639if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14640 ac_have_decl=1
14641else
14642 ac_have_decl=0
14643fi
14644
14645cat >>confdefs.h <<_ACEOF
14646#define HAVE_DECL_RTLD_NOW $ac_have_decl
14647_ACEOF
14648ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14649"
14650if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14651 ac_have_decl=1
14652else
14653 ac_have_decl=0
14654fi
14655
14656cat >>confdefs.h <<_ACEOF
14657#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14658_ACEOF
14659ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14660"
14661if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14662 ac_have_decl=1
14663else
14664 ac_have_decl=0
14665fi
14666
14667cat >>confdefs.h <<_ACEOF
14668#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14669_ACEOF
14670ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14671"
14672if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14673 ac_have_decl=1
14674else
14675 ac_have_decl=0
14676fi
14677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14680_ACEOF
14681ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14682"
14683if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14684 ac_have_decl=1
14685else
14686 ac_have_decl=0
14687fi
14688
14689cat >>confdefs.h <<_ACEOF
14690#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14691_ACEOF
14692ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14693"
14694if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14695 ac_have_decl=1
14696else
14697 ac_have_decl=0
14698fi
14699
14700cat >>confdefs.h <<_ACEOF
14701#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14702_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014703ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14704"
14705if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14706 ac_have_decl=1
14707else
14708 ac_have_decl=0
14709fi
14710
14711cat >>confdefs.h <<_ACEOF
14712#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14713_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014714
14715
Mark Dickinsonbd792642009-03-18 20:06:12 +000014716# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14718$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014719# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014720if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014721 enableval=$enable_big_digits; case $enable_big_digits in
14722yes)
14723 enable_big_digits=30 ;;
14724no)
14725 enable_big_digits=15 ;;
1472615|30)
14727 ;;
14728*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014729 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 +000014730esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14732$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014733
14734cat >>confdefs.h <<_ACEOF
14735#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14736_ACEOF
14737
14738
14739else
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14741$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014742fi
14743
14744
Guido van Rossumef2255b2000-03-10 22:30:29 +000014745# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014746ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014747if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014748
14749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014751
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014752 wchar_h="yes"
14753
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754else
Martin v. Löwis11437992002-04-12 09:54:03 +000014755 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014756
14757fi
14758
Michael W. Hudson54241132001-12-07 15:38:26 +000014759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014761# determine wchar_t size
14762if test "$wchar_h" = yes
14763then
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14769$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014770if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014772else
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14774"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014775
Martin v. Löwis11437992002-04-12 09:54:03 +000014776else
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 if test "$ac_cv_type_wchar_t" = yes; then
14778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014780as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014781See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782 else
14783 ac_cv_sizeof_wchar_t=0
14784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014786
Martin v. Löwis11437992002-04-12 09:54:03 +000014787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14789$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790
14791
14792
Martin v. Löwis11437992002-04-12 09:54:03 +000014793cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014794#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014795_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014796
Michael W. Hudson54241132001-12-07 15:38:26 +000014797
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014798fi
14799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14801$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014802have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014805
14806#include <tcl.h>
14807#if TCL_UTF_MAX != 6
14808# error "NOT UCS4_TCL"
14809#endif
14810int
14811main ()
14812{
14813
14814 ;
14815 return 0;
14816}
14817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014818if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014819
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014822
14823 have_ucs4_tcl=yes
14824
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14828$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014829
Skip Montanaro6dead952003-09-25 14:50:04 +000014830# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014831if test "$wchar_h" = yes
14832then
14833 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14835$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014836 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014838else
14839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014841 ac_cv_wchar_t_signed=yes
14842else
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014844/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014845
14846 #include <wchar.h>
14847 int main()
14848 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014849 /* Success: exit code 0 */
14850 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014851 }
14852
14853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014854if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014855 ac_cv_wchar_t_signed=yes
14856else
Matthias Kloseb9621712010-04-24 17:59:49 +000014857 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014861fi
14862
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014863fi
14864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14866$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867fi
14868
Michael Osipov3738fad2018-08-24 18:17:19 +020014869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14870$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014871# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014872if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014873 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014874then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014875
Matthias Kloseb9621712010-04-24 17:59:49 +000014876$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014877
Michael Osipov3738fad2018-08-24 18:17:19 +020014878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14879$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014880else
Michael Osipov3738fad2018-08-24 18:17:19 +020014881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14882$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014883fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014884
14885# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14887$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014888if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014890else
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 ac_cv_c_bigendian=unknown
14892 # See if we're dealing with a universal compiler.
14893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894/* end confdefs.h. */
14895#ifndef __APPLE_CC__
14896 not a universal capable compiler
14897 #endif
14898 typedef int dummy;
14899
Skip Montanaro6dead952003-09-25 14:50:04 +000014900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014901if ac_fn_c_try_compile "$LINENO"; then :
14902
14903 # Check for potential -arch flags. It is not universal unless
14904 # there are at least two -arch flags with different values.
14905 ac_arch=
14906 ac_prev=
14907 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14908 if test -n "$ac_prev"; then
14909 case $ac_word in
14910 i?86 | x86_64 | ppc | ppc64)
14911 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14912 ac_arch=$ac_word
14913 else
14914 ac_cv_c_bigendian=universal
14915 break
14916 fi
14917 ;;
14918 esac
14919 ac_prev=
14920 elif test "x$ac_word" = "x-arch"; then
14921 ac_prev=arch
14922 fi
14923 done
14924fi
14925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14926 if test $ac_cv_c_bigendian = unknown; then
14927 # See if sys/param.h defines the BYTE_ORDER macro.
14928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014929/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014930#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014932
Martin v. Löwis11437992002-04-12 09:54:03 +000014933int
14934main ()
14935{
Matthias Kloseb9621712010-04-24 17:59:49 +000014936#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14937 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14938 && LITTLE_ENDIAN)
14939 bogus endian macros
14940 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
14942 ;
14943 return 0;
14944}
14945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014946if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014947 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014950#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014952
Martin v. Löwis11437992002-04-12 09:54:03 +000014953int
14954main ()
14955{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014956#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 not big endian
14958 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014959
14960 ;
14961 return 0;
14962}
14963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014964if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014965 ac_cv_c_bigendian=yes
14966else
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014970fi
14971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14972 fi
14973 if test $ac_cv_c_bigendian = unknown; then
14974 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014977#include <limits.h>
14978
Martin v. Löwis11437992002-04-12 09:54:03 +000014979int
14980main ()
14981{
Matthias Kloseb9621712010-04-24 17:59:49 +000014982#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14983 bogus endian macros
14984 #endif
14985
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 ;
14987 return 0;
14988}
14989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if ac_fn_c_try_compile "$LINENO"; then :
14991 # It does; now see whether it defined to _BIG_ENDIAN or not.
14992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14993/* end confdefs.h. */
14994#include <limits.h>
14995
14996int
14997main ()
14998{
14999#ifndef _BIG_ENDIAN
15000 not big endian
15001 #endif
15002
15003 ;
15004 return 0;
15005}
15006_ACEOF
15007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015009else
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15013fi
15014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15015 fi
15016 if test $ac_cv_c_bigendian = unknown; then
15017 # Compile a test program.
15018 if test "$cross_compiling" = yes; then :
15019 # Try to guess by grepping values from an object file.
15020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15021/* end confdefs.h. */
15022short int ascii_mm[] =
15023 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15024 short int ascii_ii[] =
15025 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15026 int use_ascii (int i) {
15027 return ascii_mm[i] + ascii_ii[i];
15028 }
15029 short int ebcdic_ii[] =
15030 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15031 short int ebcdic_mm[] =
15032 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15033 int use_ebcdic (int i) {
15034 return ebcdic_mm[i] + ebcdic_ii[i];
15035 }
15036 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038int
15039main ()
15040{
15041return use_ascii (foo) == use_ebcdic (foo);
15042 ;
15043 return 0;
15044}
15045_ACEOF
15046if ac_fn_c_try_compile "$LINENO"; then :
15047 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15048 ac_cv_c_bigendian=yes
15049 fi
15050 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15051 if test "$ac_cv_c_bigendian" = unknown; then
15052 ac_cv_c_bigendian=no
15053 else
15054 # finding both strings is unlikely to happen, but who knows?
15055 ac_cv_c_bigendian=unknown
15056 fi
15057 fi
15058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015060else
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015064int
15065main ()
15066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068 /* Are we little or big endian? From Harbison&Steele. */
15069 union
15070 {
15071 long int l;
15072 char c[sizeof (long int)];
15073 } u;
15074 u.l = 1;
15075 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076
15077 ;
15078 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015079}
Martin v. Löwis11437992002-04-12 09:54:03 +000015080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015081if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015082 ac_cv_c_bigendian=no
15083else
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15093$as_echo "$ac_cv_c_bigendian" >&6; }
15094 case $ac_cv_c_bigendian in #(
15095 yes)
15096 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15097;; #(
15098 no)
15099 ;; #(
15100 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015101
Matthias Kloseb9621712010-04-24 17:59:49 +000015102$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 ;; #(
15105 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015106 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015107 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015109
Michael W. Hudson54241132001-12-07 15:38:26 +000015110
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015111# ABI version string for Python extension modules. This appears between the
15112# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15113# from the following attributes which affect the ABI of this Python build (in
15114# this order):
15115#
15116# * The Python implementation (always 'cpython-' for us)
15117# * The major and minor version numbers
15118# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015119#
15120# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015121# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15122# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015123#
15124# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15125# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015126
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15128$as_echo_n "checking ABIFLAGS... " >&6; }
15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15130$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15132$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015133SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15135$as_echo "$SOABI" >&6; }
15136
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015137# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15138if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015139 # Similar to SOABI but remove "d" flag from ABIFLAGS
15140
15141 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15142
15143cat >>confdefs.h <<_ACEOF
15144#define ALT_SOABI "${ALT_SOABI}"
15145_ACEOF
15146
15147fi
15148
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015149
15150case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015151 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015152 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15153 *)
15154 EXT_SUFFIX=${SHLIB_SUFFIX};;
15155esac
15156
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15158$as_echo_n "checking LDVERSION... " >&6; }
15159LDVERSION='$(VERSION)$(ABIFLAGS)'
15160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15161$as_echo "$LDVERSION" >&6; }
15162
E. M. Brayc994c8f2019-05-24 17:33:47 +020015163# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015164
E. M. Brayb1fc4172019-05-24 18:39:39 +020015165if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015166 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015167else
15168 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015169fi
15170
doko@python.org87421192013-01-26 11:39:31 +010015171
doko@ubuntu.com55532312016-06-14 08:55:19 +020015172if test x$PLATFORM_TRIPLET = x; then
15173 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15174else
15175 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15176fi
doko@python.org87421192013-01-26 11:39:31 +010015177
15178
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015179# Check whether right shifting a negative integer extends the sign bit
15180# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15182$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015183if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015185else
Martin v. Löwis11437992002-04-12 09:54:03 +000015186
Matthias Kloseb9621712010-04-24 17:59:49 +000015187if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015188 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015189else
Matthias Kloseb9621712010-04-24 17:59:49 +000015190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015191/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015192
15193int main()
15194{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015195 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015196}
15197
Martin v. Löwis11437992002-04-12 09:54:03 +000015198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015199if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015200 ac_cv_rshift_extends_sign=yes
15201else
Matthias Kloseb9621712010-04-24 17:59:49 +000015202 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015206fi
15207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208fi
15209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15211$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015212if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015213then
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015216
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015217fi
15218
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015219# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15221$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015222if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015224else
Martin v. Löwis11437992002-04-12 09:54:03 +000015225
Matthias Kloseb9621712010-04-24 17:59:49 +000015226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015227/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015228#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015229int
15230main ()
15231{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015232
15233 FILE *f = fopen("/dev/null", "r");
15234 flockfile(f);
15235 getc_unlocked(f);
15236 funlockfile(f);
15237
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 ;
15239 return 0;
15240}
15241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015243 ac_cv_have_getc_unlocked=yes
15244else
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 ac_cv_have_getc_unlocked=no
15246fi
15247rm -f core conftest.err conftest.$ac_objext \
15248 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15252$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015253if test "$ac_cv_have_getc_unlocked" = yes
15254then
Martin v. Löwis11437992002-04-12 09:54:03 +000015255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015257
15258fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015259
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015260# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015261# save the value of LIBS so we don't actually link Python with readline
15262LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015263
Gregory P. Smith18820942008-09-07 06:24:49 +000015264# On some systems we need to link readline to a termcap compatible
15265# library. NOTE: Keep the precedence of listed libraries synchronised
15266# with setup.py.
15267py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15269$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015270for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015271 if test -z "$py_libtermcap"; then
15272 READLINE_LIBS="-lreadline"
15273 else
15274 READLINE_LIBS="-lreadline -l$py_libtermcap"
15275 fi
15276 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015278/* end confdefs.h. */
15279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280/* Override any GCC internal prototype to avoid an error.
15281 Use char because int might match the return type of a GCC
15282 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015283#ifdef __cplusplus
15284extern "C"
15285#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015286char readline ();
15287int
15288main ()
15289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015291 ;
15292 return 0;
15293}
15294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015296 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015298rm -f core conftest.err conftest.$ac_objext \
15299 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015300 if test $py_cv_lib_readline = yes; then
15301 break
15302 fi
15303done
15304# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15305#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015306if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15308$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15311$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015312
Matthias Kloseb9621712010-04-24 17:59:49 +000015313$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015314
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015315fi
15316
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015317# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015319/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015320#include <readline/readline.h>
15321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015323 have_readline=yes
15324else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015325 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015326
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015327fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015328rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015329if test $have_readline = yes
15330then
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015332/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015333#include <readline/readline.h>
15334
15335_ACEOF
15336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015340
15341fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015342rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015345/* end confdefs.h. */
15346#include <readline/readline.h>
15347
15348_ACEOF
15349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015351
Matthias Kloseb9621712010-04-24 17:59:49 +000015352$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015353
15354fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015355rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015356
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015357fi
15358
Martin v. Löwis0daad592001-09-30 21:09:59 +000015359# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15361$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015364else
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015366LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370/* Override any GCC internal prototype to avoid an error.
15371 Use char because int might match the return type of a GCC
15372 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015373#ifdef __cplusplus
15374extern "C"
15375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015376char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015377int
15378main ()
15379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ;
15382 return 0;
15383}
15384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015387else
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015390rm -f core conftest.err conftest.$ac_objext \
15391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015392LIBS=$ac_check_lib_save_LIBS
15393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15395$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015396if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015399
Martin v. Löwis0daad592001-09-30 21:09:59 +000015400fi
15401
Michael W. Hudson54241132001-12-07 15:38:26 +000015402
Thomas Wouters89d996e2007-09-08 17:39:28 +000015403# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15405$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015406if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015408else
15409 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015410LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015412/* end confdefs.h. */
15413
15414/* Override any GCC internal prototype to avoid an error.
15415 Use char because int might match the return type of a GCC
15416 builtin and then its argument prototype would still apply. */
15417#ifdef __cplusplus
15418extern "C"
15419#endif
15420char rl_completion_display_matches_hook ();
15421int
15422main ()
15423{
15424return rl_completion_display_matches_hook ();
15425 ;
15426 return 0;
15427}
15428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015429if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015430 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015434rm -f core conftest.err conftest.$ac_objext \
15435 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015436LIBS=$ac_check_lib_save_LIBS
15437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15439$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015440if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015441
Matthias Kloseb9621712010-04-24 17:59:49 +000015442$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015443
15444fi
15445
15446
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015447# also in 4.0, but not in editline
15448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15449$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15450if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15451 $as_echo_n "(cached) " >&6
15452else
15453 ac_check_lib_save_LIBS=$LIBS
15454LIBS="-lreadline $READLINE_LIBS $LIBS"
15455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15456/* end confdefs.h. */
15457
15458/* Override any GCC internal prototype to avoid an error.
15459 Use char because int might match the return type of a GCC
15460 builtin and then its argument prototype would still apply. */
15461#ifdef __cplusplus
15462extern "C"
15463#endif
15464char rl_resize_terminal ();
15465int
15466main ()
15467{
15468return rl_resize_terminal ();
15469 ;
15470 return 0;
15471}
15472_ACEOF
15473if ac_fn_c_try_link "$LINENO"; then :
15474 ac_cv_lib_readline_rl_resize_terminal=yes
15475else
15476 ac_cv_lib_readline_rl_resize_terminal=no
15477fi
15478rm -f core conftest.err conftest.$ac_objext \
15479 conftest$ac_exeext conftest.$ac_ext
15480LIBS=$ac_check_lib_save_LIBS
15481fi
15482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15483$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15484if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15485
15486$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15487
15488fi
15489
15490
Martin v. Löwis0daad592001-09-30 21:09:59 +000015491# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15493$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015494if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015496else
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015498LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502/* Override any GCC internal prototype to avoid an error.
15503 Use char because int might match the return type of a GCC
15504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015505#ifdef __cplusplus
15506extern "C"
15507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015508char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015509int
15510main ()
15511{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ;
15514 return 0;
15515}
15516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015522rm -f core conftest.err conftest.$ac_objext \
15523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015524LIBS=$ac_check_lib_save_LIBS
15525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15527$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015528if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015531
Guido van Rossum353ae582001-07-10 16:45:32 +000015532fi
15533
Jack Jansendd19cf82001-12-06 22:36:17 +000015534
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015535# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015537/* end confdefs.h. */
15538#include <readline/readline.h>
15539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015540if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015541 have_readline=yes
15542else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015543 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015544
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015545fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015546rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015547if test $have_readline = yes
15548then
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015550/* end confdefs.h. */
15551#include <readline/readline.h>
15552
15553_ACEOF
15554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015556
Matthias Kloseb9621712010-04-24 17:59:49 +000015557$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015558
15559fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015560rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015561
15562fi
15563
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15565$as_echo_n "checking for append_history in -lreadline... " >&6; }
15566if ${ac_cv_lib_readline_append_history+:} false; then :
15567 $as_echo_n "(cached) " >&6
15568else
15569 ac_check_lib_save_LIBS=$LIBS
15570LIBS="-lreadline $READLINE_LIBS $LIBS"
15571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15572/* end confdefs.h. */
15573
15574/* Override any GCC internal prototype to avoid an error.
15575 Use char because int might match the return type of a GCC
15576 builtin and then its argument prototype would still apply. */
15577#ifdef __cplusplus
15578extern "C"
15579#endif
15580char append_history ();
15581int
15582main ()
15583{
15584return append_history ();
15585 ;
15586 return 0;
15587}
15588_ACEOF
15589if ac_fn_c_try_link "$LINENO"; then :
15590 ac_cv_lib_readline_append_history=yes
15591else
15592 ac_cv_lib_readline_append_history=no
15593fi
15594rm -f core conftest.err conftest.$ac_objext \
15595 conftest$ac_exeext conftest.$ac_ext
15596LIBS=$ac_check_lib_save_LIBS
15597fi
15598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15599$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15600if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15601
15602$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15603
15604fi
15605
15606
Martin v. Löwis82bca632006-02-10 20:49:30 +000015607# End of readline checks: restore LIBS
15608LIBS=$LIBS_no_readline
15609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15611$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015612if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015614else
Martin v. Löwis11437992002-04-12 09:54:03 +000015615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015617 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015618else
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015620/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015621
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015622#include <stdlib.h>
15623#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015624int main()
15625{
15626 int val1 = nice(1);
15627 if (val1 != -1 && val1 == nice(2))
15628 exit(0);
15629 exit(1);
15630}
15631
Martin v. Löwis11437992002-04-12 09:54:03 +000015632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015633if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015634 ac_cv_broken_nice=yes
15635else
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015640fi
15641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642fi
15643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15645$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015646if test "$ac_cv_broken_nice" = yes
15647then
Martin v. Löwis11437992002-04-12 09:54:03 +000015648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015650
15651fi
15652
Matthias Kloseb9621712010-04-24 17:59:49 +000015653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15654$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015655if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015657else
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659 ac_cv_broken_poll=no
15660else
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015662/* end confdefs.h. */
15663
15664#include <poll.h>
15665
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015666int main()
15667{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015668 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015669 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015670
15671 close (42);
15672
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015673 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015674 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015675 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015676 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015677 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015678 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015679 return 1;
15680}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015681
15682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015683if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015684 ac_cv_broken_poll=yes
15685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15689 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015692fi
15693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15695$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015696if test "$ac_cv_broken_poll" = yes
15697then
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015700
15701fi
15702
Martin v. Löwis1d459062005-03-14 21:23:33 +000015703# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15705$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015706if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015708else
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015711 ac_cv_working_tzset=no
15712else
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015714/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015715
15716#include <stdlib.h>
15717#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015718#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015719
15720#if HAVE_TZNAME
15721extern char *tzname[];
15722#endif
15723
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724int main()
15725{
Brett Cannon18367812003-09-19 00:59:16 +000015726 /* Note that we need to ensure that not only does tzset(3)
15727 do 'something' with localtime, but it works as documented
15728 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015729 This includes making sure that tzname is set properly if
15730 tm->tm_zone does not exist since it is the alternative way
15731 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015732
15733 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015734 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015735 */
15736
Martin v. Löwis1d459062005-03-14 21:23:33 +000015737 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015738 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15739
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015740 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015741 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015742 if (localtime(&groundhogday)->tm_hour != 0)
15743 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015744#if HAVE_TZNAME
15745 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15746 if (strcmp(tzname[0], "UTC") ||
15747 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15748 exit(1);
15749#endif
Brett Cannon18367812003-09-19 00:59:16 +000015750
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015751 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015752 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015753 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015755#if HAVE_TZNAME
15756 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15757 exit(1);
15758#endif
Brett Cannon18367812003-09-19 00:59:16 +000015759
15760 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15761 tzset();
15762 if (localtime(&groundhogday)->tm_hour != 11)
15763 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015764#if HAVE_TZNAME
15765 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15766 exit(1);
15767#endif
15768
15769#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015770 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15771 exit(1);
15772 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15773 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015774#endif
Brett Cannon18367812003-09-19 00:59:16 +000015775
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015776 exit(0);
15777}
15778
15779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015780if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015781 ac_cv_working_tzset=yes
15782else
Matthias Kloseb9621712010-04-24 17:59:49 +000015783 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015787fi
15788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789fi
15790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15792$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015793if test "$ac_cv_working_tzset" = yes
15794then
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015797
15798fi
15799
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015800# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15802$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015803if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015805else
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015807/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015808#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015809int
15810main ()
15811{
15812
15813struct stat st;
15814st.st_mtim.tv_nsec = 1;
15815
15816 ;
15817 return 0;
15818}
15819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015821 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015822else
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15826fi
15827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15829$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015830if test "$ac_cv_stat_tv_nsec" = yes
15831then
15832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015834
15835fi
15836
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015837# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15839$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015840if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015842else
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015844/* end confdefs.h. */
15845#include <sys/stat.h>
15846int
15847main ()
15848{
15849
15850struct stat st;
15851st.st_mtimespec.tv_nsec = 1;
15852
15853 ;
15854 return 0;
15855}
15856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015858 ac_cv_stat_tv_nsec2=yes
15859else
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15863fi
15864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15866$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015867if test "$ac_cv_stat_tv_nsec2" = yes
15868then
15869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015871
15872fi
15873
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015874# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015875ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015876if test "$cross_compiling" = no; then
15877 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15878fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015879
15880for ac_header in curses.h ncurses.h
15881do :
15882 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15883ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15884if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15885 cat >>confdefs.h <<_ACEOF
15886#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15887_ACEOF
15888
15889fi
15890
15891done
15892
15893
15894# On Solaris, term.h requires curses.h
15895for ac_header in term.h
15896do :
15897 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15898#ifdef HAVE_CURSES_H
15899#include <curses.h>
15900#endif
15901
15902"
15903if test "x$ac_cv_header_term_h" = xyes; then :
15904 cat >>confdefs.h <<_ACEOF
15905#define HAVE_TERM_H 1
15906_ACEOF
15907
15908fi
15909
15910done
15911
15912
Jack Jansen666b1e72001-10-31 12:11:48 +000015913# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15915$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015916if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015918else
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015920/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015921#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015922int
15923main ()
15924{
Jack Jansen666b1e72001-10-31 12:11:48 +000015925
15926 int rtn;
15927 rtn = mvwdelch(0,0,0);
15928
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 ;
15930 return 0;
15931}
15932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015933if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015934 ac_cv_mvwdelch_is_expression=yes
15935else
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15939fi
15940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15942$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015943
15944if test "$ac_cv_mvwdelch_is_expression" = yes
15945then
Martin v. Löwis11437992002-04-12 09:54:03 +000015946
Matthias Kloseb9621712010-04-24 17:59:49 +000015947$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015948
15949fi
15950
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015951# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15952# structs since version 5.7. If the macro is defined as zero before including
15953# [n]curses.h, ncurses will expose fields of the structs regardless of the
15954# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15956$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015957if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015959else
Matthias Kloseb9621712010-04-24 17:59:49 +000015960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015961/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015962
15963 #define NCURSES_OPAQUE 0
15964 #include <curses.h>
15965
Martin v. Löwis11437992002-04-12 09:54:03 +000015966int
15967main ()
15968{
Jack Jansen666b1e72001-10-31 12:11:48 +000015969
15970 WINDOW *w;
15971 w->_flags = 0;
15972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 ;
15974 return 0;
15975}
15976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015977if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015978 ac_cv_window_has_flags=yes
15979else
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15983fi
15984
Matthias Kloseb9621712010-04-24 17:59:49 +000015985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15986$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015987
Jack Jansen666b1e72001-10-31 12:11:48 +000015988
15989if test "$ac_cv_window_has_flags" = yes
15990then
Martin v. Löwis11437992002-04-12 09:54:03 +000015991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015993
15994fi
15995
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15997$as_echo_n "checking for is_pad... " >&6; }
15998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15999/* end confdefs.h. */
16000#include <curses.h>
16001int
16002main ()
16003{
16004
16005#ifndef is_pad
16006void *x=is_pad
16007#endif
16008
16009 ;
16010 return 0;
16011}
16012_ACEOF
16013if ac_fn_c_try_compile "$LINENO"; then :
16014
16015$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16016
16017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16018$as_echo "yes" >&6; }
16019else
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16021$as_echo "no" >&6; }
16022
16023fi
16024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16025
Matthias Kloseb9621712010-04-24 17:59:49 +000016026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16027$as_echo_n "checking for is_term_resized... " >&6; }
16028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016029/* end confdefs.h. */
16030#include <curses.h>
16031int
16032main ()
16033{
16034void *x=is_term_resized
16035 ;
16036 return 0;
16037}
16038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016039if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016040
Matthias Kloseb9621712010-04-24 17:59:49 +000016041$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016042
Matthias Kloseb159a552010-04-25 21:00:44 +000016043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016044$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016045else
Matthias Kloseb9621712010-04-24 17:59:49 +000016046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16047$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016048
16049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16053$as_echo_n "checking for resize_term... " >&6; }
16054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016055/* end confdefs.h. */
16056#include <curses.h>
16057int
16058main ()
16059{
16060void *x=resize_term
16061 ;
16062 return 0;
16063}
16064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016065if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016068
Matthias Kloseb159a552010-04-25 21:00:44 +000016069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016070$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016071else
Matthias Kloseb9621712010-04-24 17:59:49 +000016072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16073$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016074
16075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16077
Matthias Kloseb9621712010-04-24 17:59:49 +000016078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16079$as_echo_n "checking for resizeterm... " >&6; }
16080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016081/* end confdefs.h. */
16082#include <curses.h>
16083int
16084main ()
16085{
16086void *x=resizeterm
16087 ;
16088 return 0;
16089}
16090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016091if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016092
Matthias Kloseb9621712010-04-24 17:59:49 +000016093$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016094
Matthias Kloseb159a552010-04-25 21:00:44 +000016095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016096$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016097else
Matthias Kloseb9621712010-04-24 17:59:49 +000016098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16099$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016100
16101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016103
16104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16105$as_echo_n "checking for immedok... " >&6; }
16106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16107/* end confdefs.h. */
16108#include <curses.h>
16109int
16110main ()
16111{
16112
16113#ifndef immedok
16114void *x=immedok
16115#endif
16116
16117 ;
16118 return 0;
16119}
16120_ACEOF
16121if ac_fn_c_try_compile "$LINENO"; then :
16122
16123$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16124
16125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16126$as_echo "yes" >&6; }
16127else
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16129$as_echo "no" >&6; }
16130
16131fi
16132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16133
16134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16135$as_echo_n "checking for syncok... " >&6; }
16136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137/* end confdefs.h. */
16138#include <curses.h>
16139int
16140main ()
16141{
16142
16143#ifndef syncok
16144void *x=syncok
16145#endif
16146
16147 ;
16148 return 0;
16149}
16150_ACEOF
16151if ac_fn_c_try_compile "$LINENO"; then :
16152
16153$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16154
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16156$as_echo "yes" >&6; }
16157else
16158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16159$as_echo "no" >&6; }
16160
16161fi
16162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16163
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16165$as_echo_n "checking for wchgat... " >&6; }
16166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16167/* end confdefs.h. */
16168#include <curses.h>
16169int
16170main ()
16171{
16172
16173#ifndef wchgat
16174void *x=wchgat
16175#endif
16176
16177 ;
16178 return 0;
16179}
16180_ACEOF
16181if ac_fn_c_try_compile "$LINENO"; then :
16182
16183$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16184
16185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16186$as_echo "yes" >&6; }
16187else
16188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16189$as_echo "no" >&6; }
16190
16191fi
16192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16195$as_echo_n "checking for filter... " >&6; }
16196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16197/* end confdefs.h. */
16198#include <curses.h>
16199int
16200main ()
16201{
16202
16203#ifndef filter
16204void *x=filter
16205#endif
16206
16207 ;
16208 return 0;
16209}
16210_ACEOF
16211if ac_fn_c_try_compile "$LINENO"; then :
16212
16213$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16214
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16216$as_echo "yes" >&6; }
16217else
16218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16219$as_echo "no" >&6; }
16220
16221fi
16222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16223
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16225$as_echo_n "checking for has_key... " >&6; }
16226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16227/* end confdefs.h. */
16228#include <curses.h>
16229int
16230main ()
16231{
16232
16233#ifndef has_key
16234void *x=has_key
16235#endif
16236
16237 ;
16238 return 0;
16239}
16240_ACEOF
16241if ac_fn_c_try_compile "$LINENO"; then :
16242
16243$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16244
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16246$as_echo "yes" >&6; }
16247else
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16249$as_echo "no" >&6; }
16250
16251fi
16252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16253
16254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16255$as_echo_n "checking for typeahead... " >&6; }
16256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257/* end confdefs.h. */
16258#include <curses.h>
16259int
16260main ()
16261{
16262
16263#ifndef typeahead
16264void *x=typeahead
16265#endif
16266
16267 ;
16268 return 0;
16269}
16270_ACEOF
16271if ac_fn_c_try_compile "$LINENO"; then :
16272
16273$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16274
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16276$as_echo "yes" >&6; }
16277else
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16279$as_echo "no" >&6; }
16280
16281fi
16282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16283
16284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16285$as_echo_n "checking for use_env... " >&6; }
16286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287/* end confdefs.h. */
16288#include <curses.h>
16289int
16290main ()
16291{
16292
16293#ifndef use_env
16294void *x=use_env
16295#endif
16296
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301if ac_fn_c_try_compile "$LINENO"; then :
16302
16303$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16304
16305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16306$as_echo "yes" >&6; }
16307else
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16309$as_echo "no" >&6; }
16310
16311fi
16312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016313# last curses configure check
16314CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16317$as_echo "$as_me: checking for device files" >&6;}
16318
16319if test "x$cross_compiling" = xyes; then
16320 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16322$as_echo_n "checking for /dev/ptmx... " >&6; }
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16324$as_echo "not set" >&6; }
16325 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16326 fi
16327 if test "${ac_cv_file__dev_ptc+set}" != set; then
16328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16329$as_echo_n "checking for /dev/ptc... " >&6; }
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16331$as_echo "not set" >&6; }
16332 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16333 fi
16334fi
16335
Matthias Kloseb9621712010-04-24 17:59:49 +000016336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16337$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016338if ${ac_cv_file__dev_ptmx+:} false; then :
16339 $as_echo_n "(cached) " >&6
16340else
16341 test "$cross_compiling" = yes &&
16342 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16343if test -r "/dev/ptmx"; then
16344 ac_cv_file__dev_ptmx=yes
16345else
16346 ac_cv_file__dev_ptmx=no
16347fi
16348fi
16349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16350$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16351if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016352
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016353fi
16354
16355if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016356
Matthias Kloseb9621712010-04-24 17:59:49 +000016357$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016358
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16361$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016362if ${ac_cv_file__dev_ptc+:} false; then :
16363 $as_echo_n "(cached) " >&6
16364else
16365 test "$cross_compiling" = yes &&
16366 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16367if test -r "/dev/ptc"; then
16368 ac_cv_file__dev_ptc=yes
16369else
16370 ac_cv_file__dev_ptc=no
16371fi
16372fi
16373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16374$as_echo "$ac_cv_file__dev_ptc" >&6; }
16375if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016376
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016377fi
16378
16379if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016380
Matthias Kloseb9621712010-04-24 17:59:49 +000016381$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016382
Neal Norwitz865400f2003-03-21 01:42:58 +000016383fi
16384
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016385if test $ac_sys_system = Darwin
16386then
16387 LIBS="$LIBS -framework CoreFoundation"
16388fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016389
Matthias Kloseb9621712010-04-24 17:59:49 +000016390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16391$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016392if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016393 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016394else
Matthias Kloseb9621712010-04-24 17:59:49 +000016395 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016396 ac_cv_have_size_t_format="cross -- assuming yes"
16397
Thomas Wouters477c8d52006-05-27 19:21:47 +000016398else
Matthias Kloseb9621712010-04-24 17:59:49 +000016399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016400/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016401
Thomas Wouters477c8d52006-05-27 19:21:47 +000016402#include <stdio.h>
16403#include <stddef.h>
16404#include <string.h>
16405
Christian Heimes2c181612007-12-17 20:04:13 +000016406#ifdef HAVE_SYS_TYPES_H
16407#include <sys/types.h>
16408#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016409
16410#ifdef HAVE_SSIZE_T
16411typedef ssize_t Py_ssize_t;
16412#elif SIZEOF_VOID_P == SIZEOF_LONG
16413typedef long Py_ssize_t;
16414#else
16415typedef int Py_ssize_t;
16416#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016417
Christian Heimes2c181612007-12-17 20:04:13 +000016418int main()
16419{
16420 char buffer[256];
16421
Thomas Wouters477c8d52006-05-27 19:21:47 +000016422 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16423 return 1;
16424
Thomas Wouters89f507f2006-12-13 04:49:30 +000016425 if (strcmp(buffer, "123"))
16426 return 1;
16427
16428 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16429 return 1;
16430
16431 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016432 return 1;
16433
16434 return 0;
16435}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016436
Thomas Wouters477c8d52006-05-27 19:21:47 +000016437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016438if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016439 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016440else
Matthias Kloseb9621712010-04-24 17:59:49 +000016441 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16444 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016445fi
16446
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16449$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016450if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016451
Matthias Kloseb9621712010-04-24 17:59:49 +000016452$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016453
16454fi
16455
Matthias Kloseb9621712010-04-24 17:59:49 +000016456ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016457#ifdef HAVE_SYS_TYPES_H
16458#include <sys/types.h>
16459#endif
16460#ifdef HAVE_SYS_SOCKET_H
16461#include <sys/socket.h>
16462#endif
16463
Matthias Kloseb9621712010-04-24 17:59:49 +000016464"
Victor Stinnere0be4232011-10-25 13:06:09 +020016465if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016466
Martin v. Löwis11437992002-04-12 09:54:03 +000016467else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016468
Matthias Kloseb9621712010-04-24 17:59:49 +000016469$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016470
16471fi
16472
Michael W. Hudson54241132001-12-07 15:38:26 +000016473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16475$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016476if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016477 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016478else
Matthias Kloseb9621712010-04-24 17:59:49 +000016479 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016480 ac_cv_broken_mbstowcs=no
16481else
Matthias Kloseb9621712010-04-24 17:59:49 +000016482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016483/* end confdefs.h. */
16484
Stefan Krah19c21392012-11-22 23:47:32 +010016485#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016486#include<stdlib.h>
16487int main() {
16488 size_t len = -1;
16489 const char *str = "text";
16490 len = mbstowcs(NULL, str, 0);
16491 return (len != 4);
16492}
16493
16494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016495if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016496 ac_cv_broken_mbstowcs=no
16497else
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016502fi
16503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016504fi
16505
Matthias Kloseb9621712010-04-24 17:59:49 +000016506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16507$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016508if test "$ac_cv_broken_mbstowcs" = yes
16509then
16510
Matthias Kloseb9621712010-04-24 17:59:49 +000016511$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016512
16513fi
16514
Antoine Pitroub52ec782009-01-25 16:34:23 +000016515# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16517$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016518
16519# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016520if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016521 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016522if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016523then
16524
Matthias Kloseb9621712010-04-24 17:59:49 +000016525$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016526
Matthias Kloseb9621712010-04-24 17:59:49 +000016527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16528$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016529fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016530if test "$withval" = no
16531then
16532
16533$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16534
Matthias Kloseb9621712010-04-24 17:59:49 +000016535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16536$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016537fi
16538
Antoine Pitrou042b1282010-08-13 21:15:58 +000016539else
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16541$as_echo "no value specified" >&6; }
16542fi
16543
Antoine Pitroub52ec782009-01-25 16:34:23 +000016544
Matthias Kloseb17289e2012-03-15 19:51:34 +010016545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16546$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16547if ${ac_cv_computed_gotos+:} false; then :
16548 $as_echo_n "(cached) " >&6
16549else
16550 if test "$cross_compiling" = yes; then :
16551 if test "${with_computed_gotos+set}" = set; then
16552 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16553 else
16554 ac_cv_computed_gotos=no
16555 fi
16556else
16557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16558/* end confdefs.h. */
16559
16560int main(int argc, char **argv)
16561{
16562 static void *targets[1] = { &&LABEL1 };
16563 goto LABEL2;
16564LABEL1:
16565 return 0;
16566LABEL2:
16567 goto *targets[0];
16568 return 1;
16569}
16570
16571_ACEOF
16572if ac_fn_c_try_run "$LINENO"; then :
16573 ac_cv_computed_gotos=yes
16574else
16575 ac_cv_computed_gotos=no
16576fi
16577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16578 conftest.$ac_objext conftest.beam conftest.$ac_ext
16579fi
16580
16581fi
16582
16583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16584$as_echo "$ac_cv_computed_gotos" >&6; }
16585case "$ac_cv_computed_gotos" in yes*)
16586
16587$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16588
16589esac
16590
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016591case $ac_sys_system in
16592AIX*)
16593
16594$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16595 ;;
16596esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016597
Michael W. Hudson54241132001-12-07 15:38:26 +000016598
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016599
16600
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016601for h in `(cd $srcdir;echo Python/thread_*.h)`
16602do
16603 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16604done
16605
Michael W. Hudson54241132001-12-07 15:38:26 +000016606
Victor Stinner21a74a92019-04-11 22:28:12 +020016607SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16609$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016610for dir in $SRCDIRS; do
16611 if test ! -d $dir; then
16612 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016613 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016614done
Matthias Kloseb9621712010-04-24 17:59:49 +000016615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16616$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016617
Stefan Krah1919b7e2012-03-21 18:25:23 +010016618# Availability of -O2:
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16620$as_echo_n "checking for -O2... " >&6; }
16621saved_cflags="$CFLAGS"
16622CFLAGS="-O2"
16623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16624/* end confdefs.h. */
16625
16626int
16627main ()
16628{
16629
16630
16631 ;
16632 return 0;
16633}
16634_ACEOF
16635if ac_fn_c_try_compile "$LINENO"; then :
16636 have_O2=yes
16637else
16638 have_O2=no
16639fi
16640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16642$as_echo "$have_O2" >&6; }
16643CFLAGS="$saved_cflags"
16644
16645# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16646# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16648$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16649saved_cflags="$CFLAGS"
16650CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16651if test "$have_O2" = no; then
16652 CFLAGS=""
16653fi
16654if test "$cross_compiling" = yes; then :
16655 have_glibc_memmove_bug=undefined
16656else
16657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16658/* end confdefs.h. */
16659
16660#include <stdio.h>
16661#include <stdlib.h>
16662#include <string.h>
16663void foo(void *p, void *q) { memmove(p, q, 19); }
16664int main() {
16665 char a[32] = "123456789000000000";
16666 foo(&a[9], a);
16667 if (strcmp(a, "123456789123456789000000000") != 0)
16668 return 1;
16669 foo(a, &a[9]);
16670 if (strcmp(a, "123456789000000000") != 0)
16671 return 1;
16672 return 0;
16673}
16674
16675_ACEOF
16676if ac_fn_c_try_run "$LINENO"; then :
16677 have_glibc_memmove_bug=no
16678else
16679 have_glibc_memmove_bug=yes
16680fi
16681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16682 conftest.$ac_objext conftest.beam conftest.$ac_ext
16683fi
16684
16685CFLAGS="$saved_cflags"
16686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16687$as_echo "$have_glibc_memmove_bug" >&6; }
16688if test "$have_glibc_memmove_bug" = yes; then
16689
16690$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16691
16692fi
16693
16694if test "$have_gcc_asm_for_x87" = yes; then
16695 # Some versions of gcc miscompile inline asm:
16696 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16697 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16698 case $CC in
16699 *gcc*)
16700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16701$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16702 saved_cflags="$CFLAGS"
16703 CFLAGS="-O2"
16704 if test "$cross_compiling" = yes; then :
16705 have_ipa_pure_const_bug=undefined
16706else
16707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16708/* end confdefs.h. */
16709
16710 __attribute__((noinline)) int
16711 foo(int *p) {
16712 int r;
16713 asm ( "movl \$6, (%1)\n\t"
16714 "xorl %0, %0\n\t"
16715 : "=r" (r) : "r" (p) : "memory"
16716 );
16717 return r;
16718 }
16719 int main() {
16720 int p = 8;
16721 if ((foo(&p) ? : p) != 6)
16722 return 1;
16723 return 0;
16724 }
16725
16726_ACEOF
16727if ac_fn_c_try_run "$LINENO"; then :
16728 have_ipa_pure_const_bug=no
16729else
16730 have_ipa_pure_const_bug=yes
16731fi
16732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16733 conftest.$ac_objext conftest.beam conftest.$ac_ext
16734fi
16735
16736 CFLAGS="$saved_cflags"
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16738$as_echo "$have_ipa_pure_const_bug" >&6; }
16739 if test "$have_ipa_pure_const_bug" = yes; then
16740
16741$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16742
16743 fi
16744 ;;
16745 esac
16746fi
16747
Victor Stinner4f5366e2015-01-09 02:13:19 +010016748# Check for stdatomic.h
16749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16750$as_echo_n "checking for stdatomic.h... " >&6; }
16751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16752/* end confdefs.h. */
16753
16754
16755 #include <stdatomic.h>
Miss Skeleton (bot)dbcea392019-10-22 13:19:32 -070016756 atomic_int int_var;
16757 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016758 int main() {
Miss Skeleton (bot)dbcea392019-10-22 13:19:32 -070016759 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16760 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16761 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016762 return 0;
16763 }
16764
16765
16766_ACEOF
16767if ac_fn_c_try_link "$LINENO"; then :
16768 have_stdatomic_h=yes
16769else
16770 have_stdatomic_h=no
16771fi
16772rm -f core conftest.err conftest.$ac_objext \
16773 conftest$ac_exeext conftest.$ac_ext
16774
16775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16776$as_echo "$have_stdatomic_h" >&6; }
16777
16778if test "$have_stdatomic_h" = yes; then
16779
16780$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16781
16782fi
16783
16784# Check for GCC >= 4.7 __atomic builtins
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16786$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16788/* end confdefs.h. */
16789
16790
16791 volatile int val = 1;
16792 int main() {
16793 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16794 return 0;
16795 }
16796
16797
16798_ACEOF
16799if ac_fn_c_try_link "$LINENO"; then :
16800 have_builtin_atomic=yes
16801else
16802 have_builtin_atomic=no
16803fi
16804rm -f core conftest.err conftest.$ac_objext \
16805 conftest$ac_exeext conftest.$ac_ext
16806
16807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16808$as_echo "$have_builtin_atomic" >&6; }
16809
16810if test "$have_builtin_atomic" = yes; then
16811
16812$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16813
16814fi
16815
Ned Deily322f5ba2013-11-21 23:01:59 -080016816# ensurepip option
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16818$as_echo_n "checking for ensurepip... " >&6; }
16819
16820# Check whether --with-ensurepip was given.
16821if test "${with_ensurepip+set}" = set; then :
16822 withval=$with_ensurepip;
16823else
16824 with_ensurepip=upgrade
16825fi
16826
16827case $with_ensurepip in #(
16828 yes|upgrade) :
16829 ENSUREPIP=upgrade ;; #(
16830 install) :
16831 ENSUREPIP=install ;; #(
16832 no) :
16833 ENSUREPIP=no ;; #(
16834 *) :
16835 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16836esac
16837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16838$as_echo "$ENSUREPIP" >&6; }
16839
16840
Victor Stinner35a97c02015-03-08 02:59:09 +010016841# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16843$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845/* end confdefs.h. */
16846
16847
16848 #include <dirent.h>
16849
16850 int main() {
16851 struct dirent entry;
16852 return entry.d_type == DT_UNKNOWN;
16853 }
16854
16855
16856_ACEOF
16857if ac_fn_c_try_link "$LINENO"; then :
16858 have_dirent_d_type=yes
16859else
16860 have_dirent_d_type=no
16861fi
16862rm -f core conftest.err conftest.$ac_objext \
16863 conftest$ac_exeext conftest.$ac_ext
16864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16865$as_echo "$have_dirent_d_type" >&6; }
16866
16867if test "$have_dirent_d_type" = yes; then
16868
16869$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16870
16871fi
16872
Victor Stinner9eb57c52015-03-19 22:21:49 +010016873# check if the Linux getrandom() syscall is available
16874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16875$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16877/* end confdefs.h. */
16878
16879
Victor Stinner1b80b242016-04-12 22:34:58 +020016880 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016881 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016882 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016883
16884 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016885 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016886 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016887 const int flags = GRND_NONBLOCK;
16888 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016889 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016890 return 0;
16891 }
16892
16893
16894_ACEOF
16895if ac_fn_c_try_link "$LINENO"; then :
16896 have_getrandom_syscall=yes
16897else
16898 have_getrandom_syscall=no
16899fi
16900rm -f core conftest.err conftest.$ac_objext \
16901 conftest$ac_exeext conftest.$ac_ext
16902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16903$as_echo "$have_getrandom_syscall" >&6; }
16904
16905if test "$have_getrandom_syscall" = yes; then
16906
16907$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16908
16909fi
16910
Victor Stinner3abf44e2015-09-18 15:38:37 +020016911# check if the getrandom() function is available
16912# the test was written for the Solaris function of <sys/random.h>
16913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16914$as_echo_n "checking for the getrandom() function... " >&6; }
16915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16916/* end confdefs.h. */
16917
16918
16919 #include <sys/random.h>
16920
16921 int main() {
16922 char buffer[1];
16923 const size_t buflen = sizeof(buffer);
16924 const int flags = 0;
16925 /* ignore the result, Python checks for ENOSYS at runtime */
16926 (void)getrandom(buffer, buflen, flags);
16927 return 0;
16928 }
16929
16930
16931_ACEOF
16932if ac_fn_c_try_link "$LINENO"; then :
16933 have_getrandom=yes
16934else
16935 have_getrandom=no
16936fi
16937rm -f core conftest.err conftest.$ac_objext \
16938 conftest$ac_exeext conftest.$ac_ext
16939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16940$as_echo "$have_getrandom" >&6; }
16941
16942if test "$have_getrandom" = yes; then
16943
16944$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16945
16946fi
16947
Neil Schemenauer5741c452019-02-08 10:48:46 -080016948# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16949# shm_* may only be available if linking against librt
16950save_LIBS="$LIBS"
16951save_includes_default="$ac_includes_default"
16952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16953$as_echo_n "checking for library containing shm_open... " >&6; }
16954if ${ac_cv_search_shm_open+:} false; then :
16955 $as_echo_n "(cached) " >&6
16956else
16957 ac_func_search_save_LIBS=$LIBS
16958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16959/* end confdefs.h. */
16960
16961/* Override any GCC internal prototype to avoid an error.
16962 Use char because int might match the return type of a GCC
16963 builtin and then its argument prototype would still apply. */
16964#ifdef __cplusplus
16965extern "C"
16966#endif
16967char shm_open ();
16968int
16969main ()
16970{
16971return shm_open ();
16972 ;
16973 return 0;
16974}
16975_ACEOF
16976for ac_lib in '' rt; do
16977 if test -z "$ac_lib"; then
16978 ac_res="none required"
16979 else
16980 ac_res=-l$ac_lib
16981 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16982 fi
16983 if ac_fn_c_try_link "$LINENO"; then :
16984 ac_cv_search_shm_open=$ac_res
16985fi
16986rm -f core conftest.err conftest.$ac_objext \
16987 conftest$ac_exeext
16988 if ${ac_cv_search_shm_open+:} false; then :
16989 break
16990fi
16991done
16992if ${ac_cv_search_shm_open+:} false; then :
16993
16994else
16995 ac_cv_search_shm_open=no
16996fi
16997rm conftest.$ac_ext
16998LIBS=$ac_func_search_save_LIBS
16999fi
17000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17001$as_echo "$ac_cv_search_shm_open" >&6; }
17002ac_res=$ac_cv_search_shm_open
17003if test "$ac_res" != no; then :
17004 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17005
17006fi
17007
17008if test "$ac_cv_search_shm_open" = "-lrt"; then
17009
17010$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17011
17012fi
17013for ac_header in sys/mman.h
17014do :
17015 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17016if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17017 cat >>confdefs.h <<_ACEOF
17018#define HAVE_SYS_MMAN_H 1
17019_ACEOF
17020
17021fi
17022
17023done
17024
17025# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17026ac_includes_default="\
17027${ac_includes_default}
17028#ifndef __cplusplus
17029# ifdef HAVE_SYS_MMAN_H
17030# include <sys/mman.h>
17031# endif
17032#endif
17033"
17034for ac_func in shm_open shm_unlink
17035do :
17036 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17037ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17038if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17039 cat >>confdefs.h <<_ACEOF
17040#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17041_ACEOF
17042
17043fi
17044done
17045
17046# we don't want to link with librt always, restore LIBS
17047LIBS="$save_LIBS"
17048ac_includes_default="$save_includes_default"
17049
Christian Heimesff5be6e2018-01-20 13:19:21 +010017050# Check for usable OpenSSL
17051
17052 found=false
17053
17054# Check whether --with-openssl was given.
17055if test "${with_openssl+set}" = set; then :
17056 withval=$with_openssl;
17057 case "$withval" in
17058 "" | y | ye | yes | n | no)
17059 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17060 ;;
17061 *) ssldirs="$withval"
17062 ;;
17063 esac
17064
17065else
17066
17067 # if pkg-config is installed and openssl has installed a .pc file,
17068 # then use that information and don't search ssldirs
17069 if test -n "$ac_tool_prefix"; then
17070 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17071set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17073$as_echo_n "checking for $ac_word... " >&6; }
17074if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17075 $as_echo_n "(cached) " >&6
17076else
17077 if test -n "$PKG_CONFIG"; then
17078 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17079else
17080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17081for as_dir in $PATH
17082do
17083 IFS=$as_save_IFS
17084 test -z "$as_dir" && as_dir=.
17085 for ac_exec_ext in '' $ac_executable_extensions; do
17086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17087 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17089 break 2
17090 fi
17091done
17092 done
17093IFS=$as_save_IFS
17094
17095fi
17096fi
17097PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17098if test -n "$PKG_CONFIG"; then
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17100$as_echo "$PKG_CONFIG" >&6; }
17101else
17102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17103$as_echo "no" >&6; }
17104fi
17105
17106
17107fi
17108if test -z "$ac_cv_prog_PKG_CONFIG"; then
17109 ac_ct_PKG_CONFIG=$PKG_CONFIG
17110 # Extract the first word of "pkg-config", so it can be a program name with args.
17111set dummy pkg-config; ac_word=$2
17112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17113$as_echo_n "checking for $ac_word... " >&6; }
17114if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17115 $as_echo_n "(cached) " >&6
17116else
17117 if test -n "$ac_ct_PKG_CONFIG"; then
17118 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17119else
17120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17121for as_dir in $PATH
17122do
17123 IFS=$as_save_IFS
17124 test -z "$as_dir" && as_dir=.
17125 for ac_exec_ext in '' $ac_executable_extensions; do
17126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17127 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17129 break 2
17130 fi
17131done
17132 done
17133IFS=$as_save_IFS
17134
17135fi
17136fi
17137ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17138if test -n "$ac_ct_PKG_CONFIG"; then
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17140$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17141else
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17143$as_echo "no" >&6; }
17144fi
17145
17146 if test "x$ac_ct_PKG_CONFIG" = x; then
17147 PKG_CONFIG=""
17148 else
17149 case $cross_compiling:$ac_tool_warned in
17150yes:)
17151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17153ac_tool_warned=yes ;;
17154esac
17155 PKG_CONFIG=$ac_ct_PKG_CONFIG
17156 fi
17157else
17158 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17159fi
17160
17161 if test x"$PKG_CONFIG" != x""; then
17162 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17163 if test $? = 0; then
17164 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17165 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17166 found=true
17167 fi
17168 fi
17169
17170 # no such luck; use some default ssldirs
17171 if ! $found; then
17172 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17173 fi
17174
17175
17176fi
17177
17178
17179
17180 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17181 # an 'openssl' subdirectory
17182
17183 if ! $found; then
17184 OPENSSL_INCLUDES=
17185 for ssldir in $ssldirs; do
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17187$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17188 if test -f "$ssldir/include/openssl/ssl.h"; then
17189 OPENSSL_INCLUDES="-I$ssldir/include"
17190 OPENSSL_LDFLAGS="-L$ssldir/lib"
17191 OPENSSL_LIBS="-lssl -lcrypto"
17192 found=true
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17194$as_echo "yes" >&6; }
17195 break
17196 else
17197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17198$as_echo "no" >&6; }
17199 fi
17200 done
17201
17202 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17203 # it will just work!
17204 fi
17205
17206 # try the preprocessor and linker with our new flags,
17207 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17208
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17210$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17211 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17212 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17213
17214 save_LIBS="$LIBS"
17215 save_LDFLAGS="$LDFLAGS"
17216 save_CPPFLAGS="$CPPFLAGS"
17217 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17218 LIBS="$OPENSSL_LIBS $LIBS"
17219 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17221/* end confdefs.h. */
17222#include <openssl/ssl.h>
17223int
17224main ()
17225{
17226SSL_new(NULL)
17227 ;
17228 return 0;
17229}
17230_ACEOF
17231if ac_fn_c_try_link "$LINENO"; then :
17232
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17234$as_echo "yes" >&6; }
17235 have_openssl=yes
17236
17237else
17238
17239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17240$as_echo "no" >&6; }
17241 have_openssl=no
17242
17243fi
17244rm -f core conftest.err conftest.$ac_objext \
17245 conftest$ac_exeext conftest.$ac_ext
17246 CPPFLAGS="$save_CPPFLAGS"
17247 LDFLAGS="$save_LDFLAGS"
17248 LIBS="$save_LIBS"
17249
17250
17251
17252
17253
17254
17255if test "$have_openssl" = yes; then
17256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17257$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17258
17259 save_LIBS="$LIBS"
17260 save_LDFLAGS="$LDFLAGS"
17261 save_CPPFLAGS="$CPPFLAGS"
17262 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17263 LIBS="$OPENSSL_LIBS $LIBS"
17264 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17265
17266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17267/* end confdefs.h. */
17268
17269 #include <openssl/x509_vfy.h>
17270
17271int
17272main ()
17273{
17274
17275 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17276 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17277 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17278 X509_VERIFY_PARAM_set_hostflags(p, 0);
17279
17280 ;
17281 return 0;
17282}
17283
17284_ACEOF
17285if ac_fn_c_try_link "$LINENO"; then :
17286
17287 ac_cv_has_x509_verify_param_set1_host=yes
17288
17289else
17290
17291 ac_cv_has_x509_verify_param_set1_host=no
17292
17293fi
17294rm -f core conftest.err conftest.$ac_objext \
17295 conftest$ac_exeext conftest.$ac_ext
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17297$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17298 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17299
17300$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17301
17302 fi
17303
17304 CPPFLAGS="$save_CPPFLAGS"
17305 LDFLAGS="$save_LDFLAGS"
17306 LIBS="$save_LIBS"
17307fi
17308
Christian Heimes892d66e2018-01-29 14:10:18 +010017309# ssl module default cipher suite string
17310
17311
17312
17313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17314$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17315
17316# Check whether --with-ssl-default-suites was given.
17317if test "${with_ssl_default_suites+set}" = set; then :
17318 withval=$with_ssl_default_suites;
17319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17320$as_echo "$withval" >&6; }
17321case "$withval" in
17322 python)
17323 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17324
17325 ;;
17326 openssl)
17327 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17328
17329 ;;
17330 *)
17331 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17332
17333 cat >>confdefs.h <<_ACEOF
17334#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17335_ACEOF
17336
17337 ;;
17338esac
17339
17340else
17341
17342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17343$as_echo "python" >&6; }
17344$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17345
17346
17347fi
17348
17349
17350
Guido van Rossum627b2d71993-12-24 10:39:16 +000017351# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017352ac_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 +000017353
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017354ac_config_files="$ac_config_files Modules/ld_so_aix"
17355
Martin v. Löwis11437992002-04-12 09:54:03 +000017356cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017357# This file is a shell script that caches the results of configure
17358# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017359# scripts and configure runs, see configure's option --config-cache.
17360# It is not useful on other systems. If it contains results you don't
17361# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017362#
Martin v. Löwis11437992002-04-12 09:54:03 +000017363# config.status only pays attention to the cache file if you give it
17364# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017365#
Skip Montanaro6dead952003-09-25 14:50:04 +000017366# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017367# loading this file, other *unset* `ac_cv_foo' will be assigned the
17368# following values.
17369
17370_ACEOF
17371
Guido van Rossumf78abae1997-01-21 22:02:36 +000017372# The following way of writing the cache mishandles newlines in values,
17373# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017375# Ultrix sh set writes to stderr and can't be redirected directly,
17376# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377(
17378 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17379 eval ac_val=\$$ac_var
17380 case $ac_val in #(
17381 *${as_nl}*)
17382 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017383 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17384$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 esac
17386 case $ac_var in #(
17387 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017388 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17389 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 esac ;;
17391 esac
17392 done
17393
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17396 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017397 # `set' does not quote correctly, so add quotes: double-quote
17398 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017399 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017400 "s/'/'\\\\''/g;
17401 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 *)
17404 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017406 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 esac |
17408 sort
17409) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17415 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17417 :end' >>confcache
17418if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17419 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017420 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017421 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17422$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017423 if test ! -f "$cache_file" || test -h "$cache_file"; then
17424 cat confcache >"$cache_file"
17425 else
17426 case $cache_file in #(
17427 */* | ?:*)
17428 mv -f confcache "$cache_file"$$ &&
17429 mv -f "$cache_file"$$ "$cache_file" ;; #(
17430 *)
17431 mv -f confcache "$cache_file" ;;
17432 esac
17433 fi
17434 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017435 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17437$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017438 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017439fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017440rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017442test "x$prefix" = xNONE && prefix=$ac_default_prefix
17443# Let make expand exec_prefix.
17444test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017445
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017446DEFS=-DHAVE_CONFIG_H
17447
Skip Montanaro6dead952003-09-25 14:50:04 +000017448ac_libobjs=
17449ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017450U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017451for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17452 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17456 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017457 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17458 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017459done
17460LIBOBJS=$ac_libobjs
17461
17462LTLIBOBJS=$ac_ltlibobjs
17463
17464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465
Matthias Kloseb9621712010-04-24 17:59:49 +000017466
Victor Stinnere0be4232011-10-25 13:06:09 +020017467: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017468ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017469ac_clean_files_save=$ac_clean_files
17470ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017471{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17472$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17473as_write_fail=0
17474cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017475#! $SHELL
17476# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017477# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017478# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017479# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017480
Martin v. Löwis11437992002-04-12 09:54:03 +000017481debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017482ac_cs_recheck=false
17483ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017484
Matthias Kloseb9621712010-04-24 17:59:49 +000017485SHELL=\${CONFIG_SHELL-$SHELL}
17486export SHELL
17487_ASEOF
17488cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17489## -------------------- ##
17490## M4sh Initialization. ##
17491## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493# Be more Bourne compatible
17494DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017495if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 emulate sh
17497 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017498 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017499 # is contrary to our usage. Disable this feature.
17500 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017502else
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 case `(set -o) 2>/dev/null` in #(
17504 *posix*) :
17505 set -o posix ;; #(
17506 *) :
17507 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017509fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017510
17511
Matthias Kloseb9621712010-04-24 17:59:49 +000017512as_nl='
17513'
17514export as_nl
17515# Printing a long string crashes Solaris 7 /usr/bin/printf.
17516as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17517as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17518as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17519# Prefer a ksh shell builtin over an external printf program on Solaris,
17520# but without wasting forks for bash or zsh.
17521if test -z "$BASH_VERSION$ZSH_VERSION" \
17522 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17523 as_echo='print -r --'
17524 as_echo_n='print -rn --'
17525elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17526 as_echo='printf %s\n'
17527 as_echo_n='printf %s'
17528else
17529 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17530 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17531 as_echo_n='/usr/ucb/echo -n'
17532 else
17533 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17534 as_echo_n_body='eval
17535 arg=$1;
17536 case $arg in #(
17537 *"$as_nl"*)
17538 expr "X$arg" : "X\\(.*\\)$as_nl";
17539 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17540 esac;
17541 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17542 '
17543 export as_echo_n_body
17544 as_echo_n='sh -c $as_echo_n_body as_echo'
17545 fi
17546 export as_echo_body
17547 as_echo='sh -c $as_echo_body as_echo'
17548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017549
17550# The user is always right.
17551if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017552 PATH_SEPARATOR=:
17553 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17554 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17555 PATH_SEPARATOR=';'
17556 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559
17560# IFS
17561# We need space, tab and new line, in precisely that order. Quoting is
17562# there to prevent editors from complaining about space-tab.
17563# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17564# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565IFS=" "" $as_nl"
17566
17567# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017568as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017569case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570 *[\\/]* ) as_myself=$0 ;;
17571 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017572for as_dir in $PATH
17573do
17574 IFS=$as_save_IFS
17575 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017576 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17577 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580 ;;
17581esac
17582# We did not find ourselves, most probably we were run as `sh COMMAND'
17583# in which case we are not to be found in the path.
17584if test "x$as_myself" = x; then
17585 as_myself=$0
17586fi
17587if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017588 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17589 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590fi
17591
Matthias Kloseb9621712010-04-24 17:59:49 +000017592# Unset variables that we do not need and which cause bugs (e.g. in
17593# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17594# suppresses any "Segmentation fault" message there. '((' could
17595# trigger a bug in pdksh 5.2.14.
17596for as_var in BASH_ENV ENV MAIL MAILPATH
17597do eval test x\${$as_var+set} = xset \
17598 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599done
17600PS1='$ '
17601PS2='> '
17602PS4='+ '
17603
17604# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017605LC_ALL=C
17606export LC_ALL
17607LANGUAGE=C
17608export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609
Matthias Kloseb9621712010-04-24 17:59:49 +000017610# CDPATH.
17611(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17612
17613
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017614# as_fn_error STATUS ERROR [LINENO LOG_FD]
17615# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017616# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17617# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017618# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017619as_fn_error ()
17620{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017621 as_status=$1; test $as_status -eq 0 && as_status=1
17622 if test "$4"; then
17623 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17624 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017625 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017626 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017627 as_fn_exit $as_status
17628} # as_fn_error
17629
17630
17631# as_fn_set_status STATUS
17632# -----------------------
17633# Set $? to STATUS, without forking.
17634as_fn_set_status ()
17635{
17636 return $1
17637} # as_fn_set_status
17638
17639# as_fn_exit STATUS
17640# -----------------
17641# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17642as_fn_exit ()
17643{
17644 set +e
17645 as_fn_set_status $1
17646 exit $1
17647} # as_fn_exit
17648
17649# as_fn_unset VAR
17650# ---------------
17651# Portably unset VAR.
17652as_fn_unset ()
17653{
17654 { eval $1=; unset $1;}
17655}
17656as_unset=as_fn_unset
17657# as_fn_append VAR VALUE
17658# ----------------------
17659# Append the text in VALUE to the end of the definition contained in VAR. Take
17660# advantage of any shell optimizations that allow amortized linear growth over
17661# repeated appends, instead of the typical quadratic growth present in naive
17662# implementations.
17663if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17664 eval 'as_fn_append ()
17665 {
17666 eval $1+=\$2
17667 }'
17668else
17669 as_fn_append ()
17670 {
17671 eval $1=\$$1\$2
17672 }
17673fi # as_fn_append
17674
17675# as_fn_arith ARG...
17676# ------------------
17677# Perform arithmetic evaluation on the ARGs, and store the result in the
17678# global $as_val. Take advantage of shells that can avoid forks. The arguments
17679# must be portable across $(()) and expr.
17680if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17681 eval 'as_fn_arith ()
17682 {
17683 as_val=$(( $* ))
17684 }'
17685else
17686 as_fn_arith ()
17687 {
17688 as_val=`expr "$@" || test $? -eq 1`
17689 }
17690fi # as_fn_arith
17691
17692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693if expr a : '\(a\)' >/dev/null 2>&1 &&
17694 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17695 as_expr=expr
17696else
17697 as_expr=false
17698fi
17699
17700if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17701 as_basename=basename
17702else
17703 as_basename=false
17704fi
17705
Matthias Kloseb9621712010-04-24 17:59:49 +000017706if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17707 as_dirname=dirname
17708else
17709 as_dirname=false
17710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712as_me=`$as_basename -- "$0" ||
17713$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17714 X"$0" : 'X\(//\)$' \| \
17715 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017716$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 sed '/^.*\/\([^/][^/]*\)\/*$/{
17718 s//\1/
17719 q
17720 }
17721 /^X\/\(\/\/\)$/{
17722 s//\1/
17723 q
17724 }
17725 /^X\/\(\/\).*/{
17726 s//\1/
17727 q
17728 }
17729 s/.*/./; q'`
17730
Matthias Kloseb9621712010-04-24 17:59:49 +000017731# Avoid depending upon Character Ranges.
17732as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17733as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17734as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17735as_cr_digits='0123456789'
17736as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737
17738ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017739case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017741 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017743 xy) ECHO_C='\c';;
17744 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17745 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746 esac;;
17747*)
17748 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017749esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017750
Martin v. Löwis11437992002-04-12 09:54:03 +000017751rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752if test -d conf$$.dir; then
17753 rm -f conf$$.dir/conf$$.file
17754else
17755 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017756 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017758if (echo >conf$$.file) 2>/dev/null; then
17759 if ln -s conf$$.file conf$$ 2>/dev/null; then
17760 as_ln_s='ln -s'
17761 # ... but there are two gotchas:
17762 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17763 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017764 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017766 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 elif ln conf$$.file conf$$ 2>/dev/null; then
17768 as_ln_s=ln
17769 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017770 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017772else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017773 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17776rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017777
Matthias Kloseb9621712010-04-24 17:59:49 +000017778
17779# as_fn_mkdir_p
17780# -------------
17781# Create "$as_dir" as a directory, including parents if necessary.
17782as_fn_mkdir_p ()
17783{
17784
17785 case $as_dir in #(
17786 -*) as_dir=./$as_dir;;
17787 esac
17788 test -d "$as_dir" || eval $as_mkdir_p || {
17789 as_dirs=
17790 while :; do
17791 case $as_dir in #(
17792 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17793 *) as_qdir=$as_dir;;
17794 esac
17795 as_dirs="'$as_qdir' $as_dirs"
17796 as_dir=`$as_dirname -- "$as_dir" ||
17797$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17798 X"$as_dir" : 'X\(//\)[^/]' \| \
17799 X"$as_dir" : 'X\(//\)$' \| \
17800 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17801$as_echo X"$as_dir" |
17802 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17803 s//\1/
17804 q
17805 }
17806 /^X\(\/\/\)[^/].*/{
17807 s//\1/
17808 q
17809 }
17810 /^X\(\/\/\)$/{
17811 s//\1/
17812 q
17813 }
17814 /^X\(\/\).*/{
17815 s//\1/
17816 q
17817 }
17818 s/.*/./; q'`
17819 test -d "$as_dir" && break
17820 done
17821 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017822 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017823
17824
17825} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017826if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017827 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017828else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017829 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017830 as_mkdir_p=false
17831fi
17832
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017833
17834# as_fn_executable_p FILE
17835# -----------------------
17836# Test if FILE is an executable regular file.
17837as_fn_executable_p ()
17838{
17839 test -f "$1" && test -x "$1"
17840} # as_fn_executable_p
17841as_test_x='test -x'
17842as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017843
17844# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017845as_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 +000017846
17847# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017848as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017849
17850
Martin v. Löwis11437992002-04-12 09:54:03 +000017851exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017852## ----------------------------------- ##
17853## Main body of $CONFIG_STATUS script. ##
17854## ----------------------------------- ##
17855_ASEOF
17856test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017857
Matthias Kloseb9621712010-04-24 17:59:49 +000017858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17859# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017860# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861# values after options handling.
17862ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017863This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017864generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
17866 CONFIG_FILES = $CONFIG_FILES
17867 CONFIG_HEADERS = $CONFIG_HEADERS
17868 CONFIG_LINKS = $CONFIG_LINKS
17869 CONFIG_COMMANDS = $CONFIG_COMMANDS
17870 $ $0 $@
17871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872on `(hostname || uname -n) 2>/dev/null | sed 1q`
17873"
17874
Martin v. Löwis11437992002-04-12 09:54:03 +000017875_ACEOF
17876
Matthias Kloseb9621712010-04-24 17:59:49 +000017877case $ac_config_files in *"
17878"*) set x $ac_config_files; shift; ac_config_files=$*;;
17879esac
17880
17881case $ac_config_headers in *"
17882"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17883esac
17884
17885
17886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017887# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017888config_files="$ac_config_files"
17889config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017892
Matthias Kloseb9621712010-04-24 17:59:49 +000017893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017894ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017895\`$as_me' instantiates files and other configuration actions
17896from templates according to the current configuration. Unless the files
17897and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017898
Matthias Kloseb9621712010-04-24 17:59:49 +000017899Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017900
17901 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017903 --config print configuration, then exit
17904 -q, --quiet, --silent
17905 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 -d, --debug don't remove temporary files
17907 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 --file=FILE[:TEMPLATE]
17909 instantiate the configuration file FILE
17910 --header=FILE[:TEMPLATE]
17911 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017912
17913Configuration files:
17914$config_files
17915
17916Configuration headers:
17917$config_headers
17918
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017919Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017922cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17923ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017924ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017925python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017926configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017928
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017929Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017930This config.status script is free software; the Free Software Foundation
17931gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932
17933ac_pwd='$ac_pwd'
17934srcdir='$srcdir'
17935INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017936MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017937test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017938_ACEOF
17939
Matthias Kloseb9621712010-04-24 17:59:49 +000017940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17941# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017942ac_need_defaults=:
17943while test $# != 0
17944do
17945 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017946 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17948 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017949 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017951 --*=)
17952 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17953 ac_optarg=
17954 ac_shift=:
17955 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017957 ac_option=$1
17958 ac_optarg=$2
17959 ac_shift=shift
17960 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017961 esac
17962
Skip Montanaro6dead952003-09-25 14:50:04 +000017963 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017965 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17966 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017968 $as_echo "$ac_cs_version"; exit ;;
17969 --config | --confi | --conf | --con | --co | --c )
17970 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 debug=: ;;
17973 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017974 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017975 case $ac_optarg in
17976 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017977 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017978 esac
17979 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 ac_need_defaults=false;;
17981 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017982 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017983 case $ac_optarg in
17984 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17985 esac
17986 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017987 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017988 --he | --h)
17989 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017990 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017991Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017993 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017994 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17995 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17996 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017997
17998 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017999 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018000Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018001
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018004
18005 esac
18006 shift
18007done
18008
Skip Montanaro6dead952003-09-25 14:50:04 +000018009ac_configure_extra_args=
18010
18011if $ac_cs_silent; then
18012 exec 6>/dev/null
18013 ac_configure_extra_args="$ac_configure_extra_args --silent"
18014fi
18015
18016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018018if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018019 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018020 shift
18021 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18022 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018024 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018025fi
18026
Martin v. Löwis11437992002-04-12 09:54:03 +000018027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029exec 5>>config.log
18030{
18031 echo
18032 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18033## Running $as_me. ##
18034_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018035 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018041
Matthias Kloseb9621712010-04-24 17:59:49 +000018042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043
18044# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018045for ac_config_target in $ac_config_targets
18046do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047 case $ac_config_target in
18048 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18049 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18050 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018051 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18052 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018054 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018055 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018056 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018057 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058
Victor Stinnere0be4232011-10-25 13:06:09 +020018059 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018060 esac
18061done
18062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063
Martin v. Löwis11437992002-04-12 09:54:03 +000018064# If the user did not use the arguments to specify the items to instantiate,
18065# then the envvar interface is used. Set only those that are not.
18066# We use the long form for the default assignment because of an extremely
18067# bizarre bug on SunOS 4.1.3.
18068if $ac_need_defaults; then
18069 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18070 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18071fi
18072
Skip Montanaro6dead952003-09-25 14:50:04 +000018073# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018075# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076# Hook for its removal unless debugging.
18077# Note that there is a small window in which the directory will not be cleaned:
18078# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018079$debug ||
18080{
Victor Stinnere0be4232011-10-25 13:06:09 +020018081 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018083 : "${ac_tmp:=$tmp}"
18084 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018085' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018086 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018087}
Martin v. Löwis11437992002-04-12 09:54:03 +000018088# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018089
Martin v. Löwis11437992002-04-12 09:54:03 +000018090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018092 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018093} ||
18094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095 tmp=./conf$$-$RANDOM
18096 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018097} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018098ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018099
Matthias Kloseb9621712010-04-24 17:59:49 +000018100# Set up the scripts for CONFIG_FILES section.
18101# No need to generate them if there are no CONFIG_FILES.
18102# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018103if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018104
Matthias Kloseb9621712010-04-24 17:59:49 +000018105
18106ac_cr=`echo X | tr X '\015'`
18107# On cygwin, bash can eat \r inside `` if the user requested igncr.
18108# But we know of no other shell where ac_cr would be empty at this
18109# point, so we can use a bashism as a fallback.
18110if test "x$ac_cr" = x; then
18111 eval ac_cr=\$\'\\r\'
18112fi
18113ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18114if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018115 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018116else
18117 ac_cs_awk_cr=$ac_cr
18118fi
18119
Victor Stinnere0be4232011-10-25 13:06:09 +020018120echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018121_ACEOF
18122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123
Matthias Kloseb9621712010-04-24 17:59:49 +000018124{
18125 echo "cat >conf$$subs.awk <<_ACEOF" &&
18126 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18127 echo "_ACEOF"
18128} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018129 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18130ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131ac_delim='%!_!# '
18132for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018133 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018134 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135
Matthias Kloseb9621712010-04-24 17:59:49 +000018136 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18137 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138 break
18139 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018140 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 else
18142 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018143 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018144done
Matthias Kloseb9621712010-04-24 17:59:49 +000018145rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146
Matthias Kloseb9621712010-04-24 17:59:49 +000018147cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018148cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018150sed -n '
18151h
18152s/^/S["/; s/!.*/"]=/
18153p
18154g
18155s/^[^!]*!//
18156:repl
18157t repl
18158s/'"$ac_delim"'$//
18159t delim
18160:nl
18161h
18162s/\(.\{148\}\)..*/\1/
18163t more1
18164s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18165p
18166n
18167b repl
18168:more1
18169s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18170p
18171g
18172s/.\{148\}//
18173t nl
18174:delim
18175h
18176s/\(.\{148\}\)..*/\1/
18177t more2
18178s/["\\]/\\&/g; s/^/"/; s/$/"/
18179p
18180b
18181:more2
18182s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18183p
18184g
18185s/.\{148\}//
18186t delim
18187' <conf$$subs.awk | sed '
18188/^[^""]/{
18189 N
18190 s/\n//
18191}
18192' >>$CONFIG_STATUS || ac_write_fail=1
18193rm -f conf$$subs.awk
18194cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18195_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018196cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018197 for (key in S) S_is_set[key] = 1
18198 FS = ""
18199
18200}
18201{
18202 line = $ 0
18203 nfields = split(line, field, "@")
18204 substed = 0
18205 len = length(field[1])
18206 for (i = 2; i < nfields; i++) {
18207 key = field[i]
18208 keylen = length(key)
18209 if (S_is_set[key]) {
18210 value = S[key]
18211 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18212 len += length(value) + length(field[++i])
18213 substed = 1
18214 } else
18215 len += 1 + keylen
18216 }
18217
18218 print line
18219}
18220
18221_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18224if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18225 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18226else
18227 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018228fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018229 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018230_ACEOF
18231
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018232# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18233# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234# trailing colons and then remove the whole line if VPATH becomes empty
18235# (actually we leave an empty line to preserve line numbers).
18236if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018237 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18238h
18239s///
18240s/^/:/
18241s/[ ]*$/:/
18242s/:\$(srcdir):/:/g
18243s/:\${srcdir}:/:/g
18244s/:@srcdir@:/:/g
18245s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018247x
18248s/\(=[ ]*\).*/\1/
18249G
18250s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018251s/^[^=]*=[ ]*$//
18252}'
18253fi
18254
Matthias Kloseb9621712010-04-24 17:59:49 +000018255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018256fi # test -n "$CONFIG_FILES"
18257
Matthias Kloseb9621712010-04-24 17:59:49 +000018258# Set up the scripts for CONFIG_HEADERS section.
18259# No need to generate them if there are no CONFIG_HEADERS.
18260# This happens for instance with `./config.status Makefile'.
18261if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018262cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018263BEGIN {
18264_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265
Matthias Kloseb9621712010-04-24 17:59:49 +000018266# Transform confdefs.h into an awk script `defines.awk', embedded as
18267# here-document in config.status, that substitutes the proper values into
18268# config.h.in to produce config.h.
18269
18270# Create a delimiter string that does not exist in confdefs.h, to ease
18271# handling of long lines.
18272ac_delim='%!_!# '
18273for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018274 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18275 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018276 break
18277 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018278 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018279 else
18280 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18281 fi
18282done
18283
18284# For the awk script, D is an array of macro values keyed by name,
18285# likewise P contains macro parameters if any. Preserve backslash
18286# newline sequences.
18287
18288ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18289sed -n '
18290s/.\{148\}/&'"$ac_delim"'/g
18291t rset
18292:rset
18293s/^[ ]*#[ ]*define[ ][ ]*/ /
18294t def
18295d
18296:def
18297s/\\$//
18298t bsnl
18299s/["\\]/\\&/g
18300s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18301D["\1"]=" \3"/p
18302s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18303d
18304:bsnl
18305s/["\\]/\\&/g
18306s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18307D["\1"]=" \3\\\\\\n"\\/p
18308t cont
18309s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18310t cont
18311d
18312:cont
18313n
18314s/.\{148\}/&'"$ac_delim"'/g
18315t clear
18316:clear
18317s/\\$//
18318t bsnlc
18319s/["\\]/\\&/g; s/^/"/; s/$/"/p
18320d
18321:bsnlc
18322s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18323b cont
18324' <confdefs.h | sed '
18325s/'"$ac_delim"'/"\\\
18326"/g' >>$CONFIG_STATUS || ac_write_fail=1
18327
18328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18329 for (key in D) D_is_set[key] = 1
18330 FS = ""
18331}
18332/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18333 line = \$ 0
18334 split(line, arg, " ")
18335 if (arg[1] == "#") {
18336 defundef = arg[2]
18337 mac1 = arg[3]
18338 } else {
18339 defundef = substr(arg[1], 2)
18340 mac1 = arg[2]
18341 }
18342 split(mac1, mac2, "(") #)
18343 macro = mac2[1]
18344 prefix = substr(line, 1, index(line, defundef) - 1)
18345 if (D_is_set[macro]) {
18346 # Preserve the white space surrounding the "#".
18347 print prefix "define", macro P[macro] D[macro]
18348 next
18349 } else {
18350 # Replace #undef with comments. This is necessary, for example,
18351 # in the case of _POSIX_SOURCE, which is predefined and required
18352 # on some systems where configure will not decide to define it.
18353 if (defundef == "undef") {
18354 print "/*", prefix defundef, macro, "*/"
18355 next
18356 }
18357 }
18358}
18359{ print }
18360_ACAWK
18361_ACEOF
18362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018363 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018364fi # test -n "$CONFIG_HEADERS"
18365
18366
18367eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18368shift
18369for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370do
18371 case $ac_tag in
18372 :[FHLC]) ac_mode=$ac_tag; continue;;
18373 esac
18374 case $ac_mode$ac_tag in
18375 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018376 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377 :[FH]-) ac_tag=-:-;;
18378 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18379 esac
18380 ac_save_IFS=$IFS
18381 IFS=:
18382 set x $ac_tag
18383 IFS=$ac_save_IFS
18384 shift
18385 ac_file=$1
18386 shift
18387
18388 case $ac_mode in
18389 :L) ac_source=$1;;
18390 :[FH])
18391 ac_file_inputs=
18392 for ac_f
18393 do
18394 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018395 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 *) # Look for the file first in the build tree, then in the source tree
18397 # (if the path is not absolute). The absolute path cannot be DOS-style,
18398 # because $ac_f cannot contain `:'.
18399 test -f "$ac_f" ||
18400 case $ac_f in
18401 [\\/$]*) false;;
18402 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18403 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018404 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018406 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18407 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408 done
18409
18410 # Let's still pretend it is `configure' which instantiates (i.e., don't
18411 # use $as_me), people would be surprised to read:
18412 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018413 configure_input='Generated from '`
18414 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18415 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416 if test x"$ac_file" != x-; then
18417 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018418 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18419$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018421 # Neutralize special characters interpreted by sed in replacement strings.
18422 case $configure_input in #(
18423 *\&* | *\|* | *\\* )
18424 ac_sed_conf_input=`$as_echo "$configure_input" |
18425 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18426 *) ac_sed_conf_input=$configure_input;;
18427 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428
18429 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018430 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18431 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432 esac
18433 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018434 esac
18435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018437$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018438 X"$ac_file" : 'X\(//\)[^/]' \| \
18439 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018441$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18443 s//\1/
18444 q
18445 }
18446 /^X\(\/\/\)[^/].*/{
18447 s//\1/
18448 q
18449 }
18450 /^X\(\/\/\)$/{
18451 s//\1/
18452 q
18453 }
18454 /^X\(\/\).*/{
18455 s//\1/
18456 q
18457 }
18458 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018459 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 ac_builddir=.
18461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462case "$ac_dir" in
18463.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18464*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018465 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018467 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018468 case $ac_top_builddir_sub in
18469 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18470 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18471 esac ;;
18472esac
18473ac_abs_top_builddir=$ac_pwd
18474ac_abs_builddir=$ac_pwd$ac_dir_suffix
18475# for backward compatibility:
18476ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018477
18478case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018480 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481 ac_top_srcdir=$ac_top_builddir_sub
18482 ac_abs_top_srcdir=$ac_pwd ;;
18483 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018484 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485 ac_top_srcdir=$srcdir
18486 ac_abs_top_srcdir=$srcdir ;;
18487 *) # Relative name.
18488 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18489 ac_top_srcdir=$ac_top_build_prefix$srcdir
18490 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018491esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018493
Martin v. Löwis11437992002-04-12 09:54:03 +000018494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495 case $ac_mode in
18496 :F)
18497 #
18498 # CONFIG_FILE
18499 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018500
18501 case $INSTALL in
18502 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018505 ac_MKDIR_P=$MKDIR_P
18506 case $MKDIR_P in
18507 [\\/$]* | ?:[\\/]* ) ;;
18508 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18509 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018510_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511
Matthias Kloseb9621712010-04-24 17:59:49 +000018512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513# If the template does not know about datarootdir, expand it.
18514# FIXME: This hack should be removed a few years after 2.60.
18515ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018516ac_sed_dataroot='
18517/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518 p
18519 q
18520}
18521/@datadir@/p
18522/@docdir@/p
18523/@infodir@/p
18524/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018525/@mandir@/p'
18526case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527*datarootdir*) ac_datarootdir_seen=yes;;
18528*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18530$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533 ac_datarootdir_hack='
18534 s&@datadir@&$datadir&g
18535 s&@docdir@&$docdir&g
18536 s&@infodir@&$infodir&g
18537 s&@localedir@&$localedir&g
18538 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018539 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540esac
18541_ACEOF
18542
18543# Neutralize VPATH when `$srcdir' = `.'.
18544# Shell code in configure.ac might set extrasub.
18545# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18547ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018548$extrasub
18549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018551:t
18552/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018553s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018555s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556s&@srcdir@&$ac_srcdir&;t t
18557s&@abs_srcdir@&$ac_abs_srcdir&;t t
18558s&@top_srcdir@&$ac_top_srcdir&;t t
18559s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18560s&@builddir@&$ac_builddir&;t t
18561s&@abs_builddir@&$ac_abs_builddir&;t t
18562s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18563s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018564s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018565$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018566"
Victor Stinnere0be4232011-10-25 13:06:09 +020018567eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18568 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018571 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18572 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18573 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018575which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018576$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018577which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018578
Victor Stinnere0be4232011-10-25 13:06:09 +020018579 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018581 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18582 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018583 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018584 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585 ;;
18586 :H)
18587 #
18588 # CONFIG_HEADER
18589 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018590 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018591 {
18592 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018593 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18594 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018595 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018596 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018597 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18598$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018599 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018600 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018601 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018602 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018603 fi
18604 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018605 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018606 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018607 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611
18612 esac
18613
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018614
18615 case $ac_file$ac_mode in
18616 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18617
18618 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619done # for ac_tag
18620
Guido van Rossum627b2d71993-12-24 10:39:16 +000018621
Matthias Kloseb9621712010-04-24 17:59:49 +000018622as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018623_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018624ac_clean_files=$ac_clean_files_save
18625
Matthias Kloseb9621712010-04-24 17:59:49 +000018626test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018627 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018628
Martin v. Löwis11437992002-04-12 09:54:03 +000018629
18630# configure is writing to config.log, and then calls config.status.
18631# config.status does its own redirection, appending to config.log.
18632# Unfortunately, on DOS this fails, as config.log is still kept open
18633# by configure, so config.status won't be able to write to it; its
18634# output is simply discarded. So we exec the FD to /dev/null,
18635# effectively closing config.log, so it can be properly (re)opened and
18636# appended to by config.status. When coming back to configure, we
18637# need to make the FD available again.
18638if test "$no_create" != yes; then
18639 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018640 ac_config_status_args=
18641 test "$silent" = yes &&
18642 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018643 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018644 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 exec 5>>config.log
18646 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18647 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018648 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018649fi
18650if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18652$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018653fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018654
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018655
Christian Heimes75ed8902013-11-20 01:11:18 +010018656echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018657if test ! -f Modules/Setup.local
18658then
18659 echo "# Edit this file for local setup changes" >Modules/Setup.local
18660fi
18661
Christian Heimes75ed8902013-11-20 01:11:18 +010018662echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018663$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018664 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018665 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018666mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018667
18668if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18669 echo "" >&6
18670 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018671 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 +000018672 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018673 echo "" >&6
18674 echo "" >&6
18675fi
18676