blob: ad74754e9a7215437e4541c62b785d9c84e0c24b [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.
Pablo Galindod4fe0982020-05-19 03:33:01 +01003# Generated by GNU Autoconf 2.69 for python 3.10.
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'
Pablo Galindod4fe0982020-05-19 03:33:01 +0100583PACKAGE_VERSION='3.10'
584PACKAGE_STRING='python 3.10'
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
Victor Stinner8510f432020-03-10 09:53:09 +0100634PLATLIBDIR
Victor Stinner51ae31e2020-06-09 15:32:43 +0200635BINLIBDEST
xdegaye254b3092019-04-29 09:27:40 +0200636LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700637EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200638ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000639SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000640LIBC
641LIBM
642HAVE_GETHOSTBYNAME
643HAVE_GETHOSTBYNAME_R
644HAVE_GETHOSTBYNAME_R_3_ARG
645HAVE_GETHOSTBYNAME_R_5_ARG
646HAVE_GETHOSTBYNAME_R_6_ARG
647LIBOBJS
648TRUE
649MACHDEP_OBJS
650DYNLOADFILE
651DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700652DTRACE_OBJS
653DTRACE_HEADERS
654DFLAGS
655DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700656TCLTK_LIBS
657TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000658LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800659PKG_CONFIG_LIBDIR
660PKG_CONFIG_PATH
661PKG_CONFIG
Paul Ganssle62972d92020-05-16 04:20:06 -0400662TZPATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000663SHLIBS
664CFLAGSFORSHARED
665LINKFORSHARED
666CCSHARED
667BLDSHARED
668LDCXXSHARED
669LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700670SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LIBTOOL_CRUFT
672OTHER_LIBTOOL_OPT
673UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100674LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700675CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000676BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200677CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000678OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700680LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700681LLVM_PROF_ERR
682LLVM_PROF_FILE
683LLVM_PROF_MERGER
684PGO_PROF_USE_FLAG
685PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200686LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200687LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700688PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
Stefan Krahe6dcd372020-08-29 17:00:08 +0200703EXPORTSFROM
704EXPORTSYMS
Matthias Kloseb9621712010-04-24 17:59:49 +0000705LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000706LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000707RUNSHARED
708INSTSONAME
709LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000710PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000711BLDLIBRARY
712DLLLIBRARY
713LDLIBRARY
714LIBRARY
715BUILDEXEEXT
716EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200717NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200718MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719PLATFORM_TRIPLET
720MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200721ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000722MAINCC
723CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700724SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200725GREP
726CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000727OBJEXT
728EXEEXT
729ac_ct_CC
730CPPFLAGS
731LDFLAGS
732CFLAGS
733CC
734EXPORT_MACOSX_DEPLOYMENT_TARGET
735CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000737MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000738FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800740FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000741FRAMEWORKALTINSTALLLAST
742FRAMEWORKALTINSTALLFIRST
743FRAMEWORKINSTALLLAST
744FRAMEWORKINSTALLFIRST
745PYTHONFRAMEWORKINSTALLDIR
746PYTHONFRAMEWORKPREFIX
747PYTHONFRAMEWORKDIR
748PYTHONFRAMEWORKIDENTIFIER
749PYTHONFRAMEWORK
750LIPO_32BIT_FLAGS
751ARCH_RUN_32BIT
752UNIVERSALSDK
753CONFIG_ARGS
754SOVERSION
755VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200756PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200757PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100758host_os
759host_vendor
760host_cpu
761host
762build_os
763build_vendor
764build_cpu
765build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500766HAS_GIT
767GITBRANCH
768GITTAG
769GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400770BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000771target_alias
772host_alias
773build_alias
774LIBS
775ECHO_T
776ECHO_N
777ECHO_C
778DEFS
779mandir
780localedir
781libdir
782psdir
783pdfdir
784dvidir
785htmldir
786infodir
787docdir
788oldincludedir
789includedir
790localstatedir
791sharedstatedir
792sysconfdir
793datadir
794datarootdir
795libexecdir
796sbindir
797bindir
798program_transform_name
799prefix
800exec_prefix
801PACKAGE_URL
802PACKAGE_BUGREPORT
803PACKAGE_STRING
804PACKAGE_VERSION
805PACKAGE_TARNAME
806PACKAGE_NAME
807PATH_SEPARATOR
808SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000809ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000810ac_user_opts='
811enable_option_checking
812enable_universalsdk
813with_universal_archs
814with_framework_name
815enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200821with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200822with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000823enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700824with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100825with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400826with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100827with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800828with_memory_sanitizer
829with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_libs
831with_system_expat
832with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100833with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100834with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000835enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700836with_tcltk_includes
837with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000839enable_ipv6
840with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000842with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700844with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_libm
846with_libc
847enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100848with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000849with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800850with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100851with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100852with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200853with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200854with_experimental_isolated_subinterpreters
Matthias Kloseb9621712010-04-24 17:59:49 +0000855'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 ac_precious_vars='build_alias
857host_alias
858target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100859MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860CC
861CFLAGS
862LDFLAGS
863LIBS
864CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800865CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700866PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800867PKG_CONFIG
868PKG_CONFIG_PATH
869PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000873ac_init_help=
874ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000875ac_unrecognized_opts=
876ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877# The variables have the same names as the options, with
878# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000879cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882no_recursion=
883prefix=NONE
884program_prefix=NONE
885program_suffix=NONE
886program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891x_includes=NONE
892x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000893
894# Installation directory options.
895# These are left unexpanded so users can "make install exec_prefix=/foo"
896# and all the variables that are supposed to be based on exec_prefix
897# by default will actually change.
898# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900bindir='${exec_prefix}/bin'
901sbindir='${exec_prefix}/sbin'
902libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903datarootdir='${prefix}/share'
904datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905sysconfdir='${prefix}/etc'
906sharedstatedir='${prefix}/com'
907localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908includedir='${prefix}/include'
909oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
911infodir='${datarootdir}/info'
912htmldir='${docdir}'
913dvidir='${docdir}'
914pdfdir='${docdir}'
915psdir='${docdir}'
916libdir='${exec_prefix}/lib'
917localedir='${datarootdir}/locale'
918mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 # If the previous option needs an argument, assign it.
925 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927 ac_prev=
928 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000929 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200932 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
933 *=) ac_optarg= ;;
934 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 # Accept the important Cygnus configure options, so we can diagnose typos.
938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 case $ac_dashdash$ac_option in
940 --)
941 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -bindir | --bindir | --bindi | --bind | --bin | --bi)
944 ac_prev=bindir ;;
945 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 -cache-file | --cache-file | --cache-fil | --cache-fi \
954 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
955 ac_prev=cache_file ;;
956 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
957 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 cache_file=$ac_optarg ;;
959
960 --config-cache | -C)
961 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000963 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000965 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
969 | --dataroo | --dataro | --datar)
970 ac_prev=datarootdir ;;
971 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
972 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
973 datarootdir=$ac_optarg ;;
974
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000976 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000978 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200979 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000980 ac_useropt_orig=$ac_useropt
981 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
982 case $ac_user_opts in
983 *"
984"enable_$ac_useropt"
985"*) ;;
986 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
987 ac_unrecognized_sep=', ';;
988 esac
989 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990
991 -docdir | --docdir | --docdi | --doc | --do)
992 ac_prev=docdir ;;
993 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
994 docdir=$ac_optarg ;;
995
996 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
997 ac_prev=dvidir ;;
998 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
999 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001002 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001004 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001005 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001006 ac_useropt_orig=$ac_useropt
1007 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1008 case $ac_user_opts in
1009 *"
1010"enable_$ac_useropt"
1011"*) ;;
1012 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1013 ac_unrecognized_sep=', ';;
1014 esac
1015 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1018 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1019 | --exec | --exe | --ex)
1020 ac_prev=exec_prefix ;;
1021 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1022 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1023 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027 # Obsolete; use --with-gas.
1028 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 -help | --help | --hel | --he | -h)
1031 ac_init_help=long ;;
1032 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1033 ac_init_help=recursive ;;
1034 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1035 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036
1037 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1043 ac_prev=htmldir ;;
1044 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1045 | --ht=*)
1046 htmldir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -includedir | --includedir | --includedi | --included | --include \
1049 | --includ | --inclu | --incl | --inc)
1050 ac_prev=includedir ;;
1051 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1052 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -infodir | --infodir | --infodi | --infod | --info | --inf)
1056 ac_prev=infodir ;;
1057 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -libdir | --libdir | --libdi | --libd)
1061 ac_prev=libdir ;;
1062 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1066 | --libexe | --libex | --libe)
1067 ac_prev=libexecdir ;;
1068 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1069 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 -localedir | --localedir | --localedi | --localed | --locale)
1073 ac_prev=localedir ;;
1074 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1075 localedir=$ac_optarg ;;
1076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001078 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079 ac_prev=localstatedir ;;
1080 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001081 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
1084 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1085 ac_prev=mandir ;;
1086 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 # Obsolete; use --without-fp.
1091 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 no_create=yes ;;
1096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1098 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1099 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1102 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1103 | --oldin | --oldi | --old | --ol | --o)
1104 ac_prev=oldincludedir ;;
1105 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1106 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1107 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1111 ac_prev=prefix ;;
1112 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1116 | --program-pre | --program-pr | --program-p)
1117 ac_prev=program_prefix ;;
1118 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1119 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
1122 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1123 | --program-suf | --program-su | --program-s)
1124 ac_prev=program_suffix ;;
1125 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1126 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
1129 -program-transform-name | --program-transform-name \
1130 | --program-transform-nam | --program-transform-na \
1131 | --program-transform-n | --program-transform- \
1132 | --program-transform | --program-transfor \
1133 | --program-transfo | --program-transf \
1134 | --program-trans | --program-tran \
1135 | --progr-tra | --program-tr | --program-t)
1136 ac_prev=program_transform_name ;;
1137 -program-transform-name=* | --program-transform-name=* \
1138 | --program-transform-nam=* | --program-transform-na=* \
1139 | --program-transform-n=* | --program-transform-=* \
1140 | --program-transform=* | --program-transfor=* \
1141 | --program-transfo=* | --program-transf=* \
1142 | --program-trans=* | --program-tran=* \
1143 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001146 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1147 ac_prev=pdfdir ;;
1148 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1149 pdfdir=$ac_optarg ;;
1150
1151 -psdir | --psdir | --psdi | --psd | --ps)
1152 ac_prev=psdir ;;
1153 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1154 psdir=$ac_optarg ;;
1155
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1157 | -silent | --silent | --silen | --sile | --sil)
1158 silent=yes ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001297 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001410\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1450 --libdir=DIR object code libraries [EPREFIX/lib]
1451 --includedir=DIR C header files [PREFIX/include]
1452 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1453 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1454 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1455 --infodir=DIR info documentation [DATAROOTDIR/info]
1456 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1457 --mandir=DIR man documentation [DATAROOTDIR/man]
1458 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1459 --htmldir=DIR html documentation [DOCDIR]
1460 --dvidir=DIR dvi documentation [DOCDIR]
1461 --pdfdir=DIR pdf documentation [DOCDIR]
1462 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464
1465 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001466
1467System types:
1468 --build=BUILD configure for building on BUILD [guessed]
1469 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001470_ACEOF
1471fi
1472
1473if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001475 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 cat <<\_ACEOF
1478
1479Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001480 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1482 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001483 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001484 create a universal binary build. SDKDIR specifies
1485 which macOS SDK should be used to perform the build,
1486 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001488 create a Python.framework rather than a traditional
1489 Unix install. optional INSTALLDIR specifies the
1490 installation path. see Mac/README.rst (default is
1491 no)
1492 --enable-shared enable building a shared Python library (default is
1493 no)
1494 --enable-profiling enable C-level code profiling with gprof (default is
1495 no)
1496 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1497 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001498 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001499 support loadable extensions in _sqlite module, see
1500 Doc/library/sqlite3.rst (default is no)
1501 --enable-ipv6 enable ipv6 (with ipv4) support, see
1502 Doc/library/socket.rst (default is yes if supported)
1503 --enable-big-digits[=15|30]
1504 use big digits (30 or 15 bits) for Python longs
1505 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507Optional Packages:
1508 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1509 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001510 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001511 specify the kind of universal binary that should be
1512 created. this option is only valid when
1513 --enable-universalsdk is set; options are:
1514 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1515 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001516 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001517 specify the name for the python framework on macOS
1518 only valid when --enable-framework is set. see
1519 Mac/README.rst (default is 'Python')
1520 --with-cxx-main[=COMPILER]
1521 compile main() and link Python executable with C++
1522 compiler specified in COMPILER (default is $CXX)
1523 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1524 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001525 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001526 (default is no)
1527 --with-assertions build with C assertions enabled (default is no)
1528 --with-lto enable Link-Time-Optimization in any build (default
1529 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001530 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001531 select hash algorithm for use in Python/pyhash.c
1532 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001533 --with-tzpath=<list of absolute paths separated by pathsep>
1534 Select the default time zone search path for zoneinfo.TZPATH
1535
Charles-François Natalid30b0222014-05-08 23:08:51 +01001536 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001537 enable AddressSanitizer memory error detector,
1538 'asan' (default is no)
1539 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1540 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001541 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001542 enable UndefinedBehaviorSanitizer undefined
1543 behaviour detector, 'ubsan' (default is no)
1544 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001545 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001546 library, see Doc/library/pyexpat.rst (default is no)
1547 --with-system-ffi build _ctypes module using an installed ffi library,
1548 see Doc/library/ctypes.rst (default is
1549 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001550 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001551 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001552 --with-decimal-contextvar
1553 build _decimal module using a coroutine-local rather
1554 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001555 --with-tcltk-includes='-I...'
1556 override search for Tcl and Tk include files
1557 --with-tcltk-libs='-L...'
1558 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001559 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001560 override order to check db backends for dbm; a valid
1561 value is a colon separated string with the backend
1562 names `ndbm', `gdbm' and `bdb'.
1563 --with-doc-strings enable documentation strings (default is yes)
1564 --with-pymalloc enable specialized mallocs (default is yes)
1565 --with-c-locale-coercion
1566 enable C locale coercion to a UTF-8 based locale
1567 (default is yes)
1568 --with-valgrind enable Valgrind support (default is no)
1569 --with-dtrace enable DTrace support (default is no)
1570 --with-libm=STRING override libm math library to STRING (default is
1571 system-dependent)
1572 --with-libc=STRING override libc C library to STRING (default is
1573 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001574 --with-platlibdir=DIRNAME
1575 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001577 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001578 --with-ensurepip[=install|upgrade|no]
1579 "install" or "upgrade" using bundled pip (default is
1580 upgrade)
1581 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001582 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001583 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001584 Python's preferred selection (default), openssl:
1585 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001586 custom string, PROTOCOL_SSLv2 ignores the setting,
1587 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001588 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1589 builtin hash modules, md5, sha1, sha256, sha512,
1590 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001591 --with-experimental-isolated-subinterpreters
1592 better isolate subinterpreters, experimental build
1593 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001596 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 CC C compiler command
1598 CFLAGS C compiler flags
1599 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1600 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001605 PROFILE_TASK
1606 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001607 PKG_CONFIG path to pkg-config utility
1608 PKG_CONFIG_PATH
1609 directories to add to pkg-config's search path
1610 PKG_CONFIG_LIBDIR
1611 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001612
1613Use these variables to override the choices made by `configure' or to help
1614it to find libraries and programs with nonstandard names/locations.
1615
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001616Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi
1620
1621if test "$ac_init_help" = "recursive"; then
1622 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 test -d "$ac_dir" ||
1625 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1626 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 ac_builddir=.
1628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629case "$ac_dir" in
1630.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1631*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635 case $ac_top_builddir_sub in
1636 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1637 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1638 esac ;;
1639esac
1640ac_abs_top_builddir=$ac_pwd
1641ac_abs_builddir=$ac_pwd$ac_dir_suffix
1642# for backward compatibility:
1643ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001644
1645case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001648 ac_top_srcdir=$ac_top_builddir_sub
1649 ac_abs_top_srcdir=$ac_pwd ;;
1650 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 ac_top_srcdir=$srcdir
1653 ac_abs_top_srcdir=$srcdir ;;
1654 *) # Relative name.
1655 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1656 ac_top_srcdir=$ac_top_build_prefix$srcdir
1657 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001658esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661 cd "$ac_dir" || { ac_status=$?; continue; }
1662 # Check for guested configure.
1663 if test -f "$ac_srcdir/configure.gnu"; then
1664 echo &&
1665 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1666 elif test -f "$ac_srcdir/configure"; then
1667 echo &&
1668 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001670 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001671 fi || ac_status=$?
1672 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 done
1674fi
1675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001676test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001677if $ac_init_version; then
1678 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001679python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001680generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001681
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001682Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001683This configure script is free software; the Free Software Foundation
1684gives unlimited permission to copy, distribute and modify it.
1685_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001686 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001688
1689## ------------------------ ##
1690## Autoconf initialization. ##
1691## ------------------------ ##
1692
1693# ac_fn_c_try_compile LINENO
1694# --------------------------
1695# Try to compile conftest.$ac_ext, and return whether this succeeded.
1696ac_fn_c_try_compile ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 rm -f conftest.$ac_objext
1700 if { { ac_try="$ac_compile"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_compile") 2>conftest.err
1708 ac_status=$?
1709 if test -s conftest.err; then
1710 grep -v '^ *+' conftest.err >conftest.er1
1711 cat conftest.er1 >&5
1712 mv -f conftest.er1 conftest.err
1713 fi
1714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1715 test $ac_status = 0; } && {
1716 test -z "$ac_c_werror_flag" ||
1717 test ! -s conftest.err
1718 } && test -s conftest.$ac_objext; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: failed program was:" >&5
1722sed 's/^/| /' conftest.$ac_ext >&5
1723
1724 ac_retval=1
1725fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001726 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001727 as_fn_set_status $ac_retval
1728
1729} # ac_fn_c_try_compile
1730
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001731# ac_fn_c_try_cpp LINENO
1732# ----------------------
1733# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1734ac_fn_c_try_cpp ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 if { { ac_try="$ac_cpp conftest.$ac_ext"
1738case "(($ac_try" in
1739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740 *) ac_try_echo=$ac_try;;
1741esac
1742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743$as_echo "$ac_try_echo"; } >&5
1744 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1745 ac_status=$?
1746 if test -s conftest.err; then
1747 grep -v '^ *+' conftest.err >conftest.er1
1748 cat conftest.er1 >&5
1749 mv -f conftest.er1 conftest.err
1750 fi
1751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1752 test $ac_status = 0; } > conftest.i && {
1753 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1754 test ! -s conftest.err
1755 }; then :
1756 ac_retval=0
1757else
1758 $as_echo "$as_me: failed program was:" >&5
1759sed 's/^/| /' conftest.$ac_ext >&5
1760
1761 ac_retval=1
1762fi
1763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_cpp
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_try_link LINENO
1769# -----------------------
1770# Try to link conftest.$ac_ext, and return whether this succeeded.
1771ac_fn_c_try_link ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774 rm -f conftest.$ac_objext conftest$ac_exeext
1775 if { { ac_try="$ac_link"
1776case "(($ac_try" in
1777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778 *) ac_try_echo=$ac_try;;
1779esac
1780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781$as_echo "$ac_try_echo"; } >&5
1782 (eval "$ac_link") 2>conftest.err
1783 ac_status=$?
1784 if test -s conftest.err; then
1785 grep -v '^ *+' conftest.err >conftest.er1
1786 cat conftest.er1 >&5
1787 mv -f conftest.er1 conftest.err
1788 fi
1789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1790 test $ac_status = 0; } && {
1791 test -z "$ac_c_werror_flag" ||
1792 test ! -s conftest.err
1793 } && test -s conftest$ac_exeext && {
1794 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001795 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001796 }; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=1
1803fi
1804 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1805 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1806 # interfere with the next link command; also delete a directory that is
1807 # left behind by Apple's compiler. We do this before executing the actions.
1808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810 as_fn_set_status $ac_retval
1811
1812} # ac_fn_c_try_link
1813
Matthias Kloseb9621712010-04-24 17:59:49 +00001814# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1815# -------------------------------------------------------
1816# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1817# the include files in INCLUDES and setting the cache variable VAR
1818# accordingly.
1819ac_fn_c_check_header_mongrel ()
1820{
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001822 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827fi
1828eval ac_res=\$$3
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1830$as_echo "$ac_res" >&6; }
1831else
1832 # Is the header compilable?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1834$as_echo_n "checking $2 usability... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838#include <$2>
1839_ACEOF
1840if ac_fn_c_try_compile "$LINENO"; then :
1841 ac_header_compiler=yes
1842else
1843 ac_header_compiler=no
1844fi
1845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1847$as_echo "$ac_header_compiler" >&6; }
1848
1849# Is the header present?
1850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1851$as_echo_n "checking $2 presence... " >&6; }
1852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h. */
1854#include <$2>
1855_ACEOF
1856if ac_fn_c_try_cpp "$LINENO"; then :
1857 ac_header_preproc=yes
1858else
1859 ac_header_preproc=no
1860fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001861rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1863$as_echo "$ac_header_preproc" >&6; }
1864
1865# So? What about this header?
1866case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1867 yes:no: )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1869$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1871$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1872 ;;
1873 no:yes:* )
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1875$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1877$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1879$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1881$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1883$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001884( $as_echo "## --------------------------------------- ##
1885## Report this to https://bugs.python.org/ ##
1886## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 ) | sed "s/^/$as_me: WARNING: /" >&2
1888 ;;
1889esac
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 $as_echo_n "(cached) " >&6
1894else
1895 eval "$3=\$ac_header_compiler"
1896fi
1897eval ac_res=\$$3
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899$as_echo "$ac_res" >&6; }
1900fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001902
1903} # ac_fn_c_check_header_mongrel
1904
1905# ac_fn_c_try_run LINENO
1906# ----------------------
1907# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1908# that executables *can* be run.
1909ac_fn_c_try_run ()
1910{
1911 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912 if { { ac_try="$ac_link"
1913case "(($ac_try" in
1914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915 *) ac_try_echo=$ac_try;;
1916esac
1917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918$as_echo "$ac_try_echo"; } >&5
1919 (eval "$ac_link") 2>&5
1920 ac_status=$?
1921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1922 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1923 { { case "(($ac_try" in
1924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1925 *) ac_try_echo=$ac_try;;
1926esac
1927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1928$as_echo "$ac_try_echo"; } >&5
1929 (eval "$ac_try") 2>&5
1930 ac_status=$?
1931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932 test $ac_status = 0; }; }; then :
1933 ac_retval=0
1934else
1935 $as_echo "$as_me: program exited with status $ac_status" >&5
1936 $as_echo "$as_me: failed program was:" >&5
1937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939 ac_retval=$ac_status
1940fi
1941 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001942 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 as_fn_set_status $ac_retval
1944
1945} # ac_fn_c_try_run
1946
1947# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1948# -------------------------------------------------------
1949# Tests whether HEADER exists and can be compiled using the include files in
1950# INCLUDES, setting the cache variable VAR accordingly.
1951ac_fn_c_check_header_compile ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001956if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001957 $as_echo_n "(cached) " >&6
1958else
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962#include <$2>
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965 eval "$3=yes"
1966else
1967 eval "$3=no"
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976} # ac_fn_c_check_header_compile
1977
Matthias Kloseb9621712010-04-24 17:59:49 +00001978# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1979# -------------------------------------------
1980# Tests whether TYPE exists after having included INCLUDES, setting cache
1981# variable VAR accordingly.
1982ac_fn_c_check_type ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1986$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988 $as_echo_n "(cached) " >&6
1989else
1990 eval "$3=no"
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$4
1994int
1995main ()
1996{
1997if (sizeof ($2))
1998 return 0;
1999 ;
2000 return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_compile "$LINENO"; then :
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010if (sizeof (($2)))
2011 return 0;
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017
2018else
2019 eval "$3=yes"
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022fi
2023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2024fi
2025eval ac_res=\$$3
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002029
2030} # ac_fn_c_check_type
2031
Matthias Kloseb9621712010-04-24 17:59:49 +00002032# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2033# --------------------------------------------
2034# Tries to find the compile-time value of EXPR in a program that includes
2035# INCLUDES, setting VAR accordingly. Returns whether the value could be
2036# computed
2037ac_fn_c_compute_int ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 if test "$cross_compiling" = yes; then
2041 # Depending upon the size, compute the lo and hi bounds.
2042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_lo=0 ac_mid=0
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_hi=$ac_mid; break
2075else
2076 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2077 if test $ac_lo -le $ac_mid; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002093test_array [0] = 0;
2094return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_hi=-1 ac_mid=-1
2102 while :; do
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002110test_array [0] = 0;
2111return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_lo=$ac_mid; break
2119else
2120 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2121 if test $ac_mid -le $ac_hi; then
2122 ac_lo= ac_hi=
2123 break
2124 fi
2125 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128 done
2129else
2130 ac_lo= ac_hi=
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135# Binary search between lo and hi bounds.
2136while test "x$ac_lo" != "x$ac_hi"; do
2137 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002145test_array [0] = 0;
2146return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=$ac_mid
2154else
2155 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2156fi
2157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158done
2159case $ac_lo in #((
2160?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2161'') ac_retval=1 ;;
2162esac
2163 else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167static long int longval () { return $2; }
2168static unsigned long int ulongval () { return $2; }
2169#include <stdio.h>
2170#include <stdlib.h>
2171int
2172main ()
2173{
2174
2175 FILE *f = fopen ("conftest.val", "w");
2176 if (! f)
2177 return 1;
2178 if (($2) < 0)
2179 {
2180 long int i = longval ();
2181 if (i != ($2))
2182 return 1;
2183 fprintf (f, "%ld", i);
2184 }
2185 else
2186 {
2187 unsigned long int i = ulongval ();
2188 if (i != ($2))
2189 return 1;
2190 fprintf (f, "%lu", i);
2191 }
2192 /* Do not output a trailing newline, as this causes \r\n confusion
2193 on some platforms. */
2194 return ferror (f) || fclose (f) != 0;
2195
2196 ;
2197 return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_run "$LINENO"; then :
2201 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2202else
2203 ac_retval=1
2204fi
2205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2206 conftest.$ac_objext conftest.beam conftest.$ac_ext
2207rm -f conftest.val
2208
2209 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002210 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002211 as_fn_set_status $ac_retval
2212
2213} # ac_fn_c_compute_int
2214
2215# ac_fn_c_check_func LINENO FUNC VAR
2216# ----------------------------------
2217# Tests whether FUNC exists, setting the cache variable VAR accordingly
2218ac_fn_c_check_func ()
2219{
2220 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2222$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002224 $as_echo_n "(cached) " >&6
2225else
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2229 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2230#define $2 innocuous_$2
2231
2232/* System header to define __stub macros and hopefully few prototypes,
2233 which can conflict with char $2 (); below.
2234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2235 <limits.h> exists even on freestanding compilers. */
2236
2237#ifdef __STDC__
2238# include <limits.h>
2239#else
2240# include <assert.h>
2241#endif
2242
2243#undef $2
2244
2245/* Override any GCC internal prototype to avoid an error.
2246 Use char because int might match the return type of a GCC
2247 builtin and then its argument prototype would still apply. */
2248#ifdef __cplusplus
2249extern "C"
2250#endif
2251char $2 ();
2252/* The GNU C library defines this for functions which it implements
2253 to always fail with ENOSYS. Some functions are actually named
2254 something starting with __ and the normal name is an alias. */
2255#if defined __stub_$2 || defined __stub___$2
2256choke me
2257#endif
2258
2259int
2260main ()
2261{
2262return $2 ();
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_link "$LINENO"; then :
2268 eval "$3=yes"
2269else
2270 eval "$3=no"
2271fi
2272rm -f core conftest.err conftest.$ac_objext \
2273 conftest$ac_exeext 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; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002279
2280} # ac_fn_c_check_func
2281
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002282# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2283# ---------------------------------------------
2284# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2285# accordingly.
2286ac_fn_c_check_decl ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 as_decl_name=`echo $2|sed 's/ *(.*//'`
2290 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2292$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2293if eval \${$3+:} false; then :
2294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$4
2299int
2300main ()
2301{
2302#ifndef $as_decl_name
2303#ifdef __cplusplus
2304 (void) $as_decl_use;
2305#else
2306 (void) $as_decl_name;
2307#endif
2308#endif
2309
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$3=yes"
2316else
2317 eval "$3=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2325
2326} # ac_fn_c_check_decl
2327
Matthias Kloseb9621712010-04-24 17:59:49 +00002328# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2329# ----------------------------------------------------
2330# Tries to find if the field MEMBER exists in type AGGR, after including
2331# INCLUDES, setting cache variable VAR accordingly.
2332ac_fn_c_check_member ()
2333{
2334 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2336$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002338 $as_echo_n "(cached) " >&6
2339else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h. */
2342$5
2343int
2344main ()
2345{
2346static $2 ac_aggr;
2347if (ac_aggr.$3)
2348return 0;
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$4=yes"
2355else
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$5
2359int
2360main ()
2361{
2362static $2 ac_aggr;
2363if (sizeof ac_aggr.$3)
2364return 0;
2365 ;
2366 return 0;
2367}
2368_ACEOF
2369if ac_fn_c_try_compile "$LINENO"; then :
2370 eval "$4=yes"
2371else
2372 eval "$4=no"
2373fi
2374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375fi
2376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2377fi
2378eval ac_res=\$$4
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2380$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002381 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002382
2383} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002385This file contains any messages produced by compilers while
2386running configure, to aid debugging if configure makes a mistake.
2387
Pablo Galindod4fe0982020-05-19 03:33:01 +01002388It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002389generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002390
2391 $ $0 $@
2392
2393_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002395{
2396cat <<_ASUNAME
2397## --------- ##
2398## Platform. ##
2399## --------- ##
2400
2401hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2402uname -m = `(uname -m) 2>/dev/null || echo unknown`
2403uname -r = `(uname -r) 2>/dev/null || echo unknown`
2404uname -s = `(uname -s) 2>/dev/null || echo unknown`
2405uname -v = `(uname -v) 2>/dev/null || echo unknown`
2406
2407/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2408/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2409
2410/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2411/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2412/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002414/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2415/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2416/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2417
2418_ASUNAME
2419
2420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421for as_dir in $PATH
2422do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 $as_echo "PATH: $as_dir"
2426 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002427IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429} >&5
2430
2431cat >&5 <<_ACEOF
2432
2433
2434## ----------- ##
2435## Core tests. ##
2436## ----------- ##
2437
2438_ACEOF
2439
2440
2441# Keep a trace of the command line.
2442# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002443# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002444# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002445# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002446ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002447ac_configure_args0=
2448ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002449ac_must_keep_next=false
2450for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002451do
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 for ac_arg
2453 do
2454 case $ac_arg in
2455 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2456 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2457 | -silent | --silent | --silen | --sile | --sil)
2458 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 esac
2462 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002467 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002469 case $ac_arg in
2470 *=* | --config-cache | -C | -disable-* | --disable-* \
2471 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2472 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2473 | -with-* | --with-* | -without-* | --without-* | --x)
2474 case "$ac_configure_args0 " in
2475 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2476 esac
2477 ;;
2478 -* ) ac_must_keep_next=true ;;
2479 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485done
Matthias Kloseb9621712010-04-24 17:59:49 +00002486{ ac_configure_args0=; unset ac_configure_args0;}
2487{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
2489# When interrupted or exit'd, cleanup temporary files, and complete
2490# config.log. We remove comments because anyway the quotes in there
2491# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492# WARNING: Use '\'' to represent an apostrophe within the trap.
2493# 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 +00002494trap 'exit_status=$?
2495 # Save into config.log some information that might help in debugging.
2496 {
2497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002500## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 echo
2503 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504(
2505 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2506 eval ac_val=\$$ac_var
2507 case $ac_val in #(
2508 *${as_nl}*)
2509 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2511$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 esac
2513 case $ac_var in #(
2514 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2516 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 esac ;;
2518 esac
2519 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2522 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 "s/'\''/'\''\\\\'\'''\''/g;
2525 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2526 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002527 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002529 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac |
2531 sort
2532)
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002534
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002536## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 echo
2539 for ac_var in $ac_subst_vars
2540 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 eval ac_val=\$$ac_var
2542 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 done | sort
2547 echo
2548
2549 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 echo
2554 for ac_var in $ac_subst_files
2555 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 eval ac_val=\$$ac_var
2557 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002561 done | sort
2562 echo
2563 fi
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002567## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 echo
2572 fi
2573 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 $as_echo "$as_me: caught signal $ac_signal"
2575 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 rm -f core *.core core.conftest.* &&
2578 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002581for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002583done
2584ac_signal=0
2585
2586# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002588
Matthias Kloseb9621712010-04-24 17:59:49 +00002589$as_echo "/* confdefs.h */" > confdefs.h
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591# Predefined preprocessor variables.
2592
2593cat >>confdefs.h <<_ACEOF
2594#define PACKAGE_NAME "$PACKAGE_NAME"
2595_ACEOF
2596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597cat >>confdefs.h <<_ACEOF
2598#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2599_ACEOF
2600
Martin v. Löwis11437992002-04-12 09:54:03 +00002601cat >>confdefs.h <<_ACEOF
2602#define PACKAGE_VERSION "$PACKAGE_VERSION"
2603_ACEOF
2604
Martin v. Löwis11437992002-04-12 09:54:03 +00002605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_STRING "$PACKAGE_STRING"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2611_ACEOF
2612
Matthias Kloseb9621712010-04-24 17:59:49 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_URL "$PACKAGE_URL"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617
2618# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002619# Prefer an explicitly selected file to automatically selected ones.
2620ac_site_file1=NONE
2621ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002623 # We do not want a PATH search for config.site.
2624 case $CONFIG_SITE in #((
2625 -*) ac_site_file1=./$CONFIG_SITE;;
2626 */*) ac_site_file1=$CONFIG_SITE;;
2627 *) ac_site_file1=./$CONFIG_SITE;;
2628 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 ac_site_file1=$prefix/share/config.site
2631 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632else
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 ac_site_file1=$ac_default_prefix/share/config.site
2634 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002636for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637do
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 test "x$ac_site_file" = xNONE && continue
2639 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2641$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643 . "$ac_site_file" \
2644 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2646as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002647See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648 fi
2649done
2650
2651if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # Some versions of bash will fail to source /dev/null (special files
2653 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2654 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2656$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2659 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002662else
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2664$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 >$cache_file
2666fi
2667
2668# Check that the precious variables saved in the cache have kept the same
2669# value.
2670ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2673 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2675 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 case $ac_old_set,$ac_new_set in
2677 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2679$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 +00002680 ac_cache_corrupted=: ;;
2681 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2683$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 ac_cache_corrupted=: ;;
2685 ,);;
2686 *)
2687 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 # differences in whitespace do not lead to failure.
2689 ac_old_val_w=`echo x $ac_old_val`
2690 ac_new_val_w=`echo x $ac_new_val`
2691 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2693$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2694 ac_cache_corrupted=:
2695 else
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2697$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2698 eval $ac_var=\$ac_old_val
2699 fi
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2701$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2703$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 fi;;
2705 esac
2706 # Pass precious variables to config.status.
2707 if test "$ac_new_set" = set; then
2708 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002709 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 *) ac_arg=$ac_var=$ac_new_val ;;
2711 esac
2712 case " $ac_configure_args " in
2713 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 esac
2716 fi
2717done
2718if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002719 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2722$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002723 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002725## -------------------- ##
2726## Main body of script. ##
2727## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728
Guido van Rossum7f43da71994-08-01 12:15:30 +00002729ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002730ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002731ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2732ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2733ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734
Guido van Rossum627b2d71993-12-24 10:39:16 +00002735
Michael W. Hudson54241132001-12-07 15:38:26 +00002736
Trent Nelson4d4ec652012-10-16 08:51:24 -04002737
Christian Heimesff5be6e2018-01-20 13:19:21 +01002738
2739
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002740if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002741 # If we're building out-of-tree, we need to make sure the following
2742 # resources get picked up before their $srcdir counterparts.
2743 # Objects/ -> typeslots.inc
Lysandros Nikolaou314858e2020-06-20 21:07:25 +03002744 # Include/ -> Python-ast.h
Trent Nelson4d4ec652012-10-16 08:51:24 -04002745 # Python/ -> importlib.h
2746 # (A side effect of this is that these resources will automatically be
2747 # regenerated when building out-of-tree, regardless of whether or not
2748 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2749 # off.)
2750 BASECPPFLAGS="-IObjects -IInclude -IPython"
2751else
2752 BASECPPFLAGS=""
2753fi
2754
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755
2756
2757
2758
Victor Stinner9ed34a82017-05-02 22:35:58 +02002759if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761# Extract the first word of "git", so it can be a program name with args.
2762set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2764$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766 $as_echo_n "(cached) " >&6
2767else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768 if test -n "$HAS_GIT"; then
2769 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770else
2771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2772for as_dir in $PATH
2773do
2774 IFS=$as_save_IFS
2775 test -z "$as_dir" && as_dir=.
2776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002778 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2780 break 2
2781 fi
2782done
2783 done
2784IFS=$as_save_IFS
2785
Ned Deily5c4b0d02017-03-04 00:19:55 -05002786 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787fi
2788fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002789HAS_GIT=$ac_cv_prog_HAS_GIT
2790if test -n "$HAS_GIT"; then
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2792$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793else
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2795$as_echo "no" >&6; }
2796fi
2797
2798
2799else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002800HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002801fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002802if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803then
Xiang Zhang4c855572018-08-20 22:36:19 +08002804 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2805 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2806 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002807else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002808 GITVERSION=""
2809 GITTAG=""
2810 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811fi
2812
2813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002815
2816
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002817ac_aux_dir=
2818for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2819 if test -f "$ac_dir/install-sh"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/install-sh -c"
2822 break
2823 elif test -f "$ac_dir/install.sh"; then
2824 ac_aux_dir=$ac_dir
2825 ac_install_sh="$ac_aux_dir/install.sh -c"
2826 break
2827 elif test -f "$ac_dir/shtool"; then
2828 ac_aux_dir=$ac_dir
2829 ac_install_sh="$ac_aux_dir/shtool install -c"
2830 break
2831 fi
2832done
2833if test -z "$ac_aux_dir"; then
2834 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2835fi
2836
2837# These three variables are undocumented and unsupported,
2838# and are intended to be withdrawn in a future Autoconf release.
2839# They can cause serious problems if a builder's source tree is in a directory
2840# whose full name contains unusual characters.
2841ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2842ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2843ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2844
2845
2846# Make sure we can run config.sub.
2847$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2848 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2851$as_echo_n "checking build system type... " >&6; }
2852if ${ac_cv_build+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 ac_build_alias=$build_alias
2856test "x$ac_build_alias" = x &&
2857 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2858test "x$ac_build_alias" = x &&
2859 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2860ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2861 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2862
2863fi
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2865$as_echo "$ac_cv_build" >&6; }
2866case $ac_cv_build in
2867*-*-*) ;;
2868*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2869esac
2870build=$ac_cv_build
2871ac_save_IFS=$IFS; IFS='-'
2872set x $ac_cv_build
2873shift
2874build_cpu=$1
2875build_vendor=$2
2876shift; shift
2877# Remember, the first character of IFS is used to create $*,
2878# except with old shells:
2879build_os=$*
2880IFS=$ac_save_IFS
2881case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2882
2883
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2885$as_echo_n "checking host system type... " >&6; }
2886if ${ac_cv_host+:} false; then :
2887 $as_echo_n "(cached) " >&6
2888else
2889 if test "x$host_alias" = x; then
2890 ac_cv_host=$ac_cv_build
2891else
2892 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2893 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2894fi
2895
2896fi
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2898$as_echo "$ac_cv_host" >&6; }
2899case $ac_cv_host in
2900*-*-*) ;;
2901*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2902esac
2903host=$ac_cv_host
2904ac_save_IFS=$IFS; IFS='-'
2905set x $ac_cv_host
2906shift
2907host_cpu=$1
2908host_vendor=$2
2909shift; shift
2910# Remember, the first character of IFS is used to create $*,
2911# except with old shells:
2912host_os=$*
2913IFS=$ac_save_IFS
2914case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2915
2916
2917
doko@python.orga10e4a92013-01-25 18:45:12 +01002918
2919
Ned Deilyfcbc2462014-08-22 13:32:49 -07002920# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2921rm -f pybuilddir.txt
2922
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002923for ac_prog in python$PACKAGE_VERSION python3 python
2924do
2925 # Extract the first word of "$ac_prog", so it can be a program name with args.
2926set dummy $ac_prog; ac_word=$2
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2928$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002929if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002930 $as_echo_n "(cached) " >&6
2931else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002932 if test -n "$PYTHON_FOR_REGEN"; then
2933 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002934else
2935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2936for as_dir in $PATH
2937do
2938 IFS=$as_save_IFS
2939 test -z "$as_dir" && as_dir=.
2940 for ac_exec_ext in '' $ac_executable_extensions; do
2941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002942 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2944 break 2
2945 fi
2946done
2947 done
2948IFS=$as_save_IFS
2949
2950fi
2951fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002952PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2953if test -n "$PYTHON_FOR_REGEN"; then
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2955$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002956else
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2958$as_echo "no" >&6; }
2959fi
2960
2961
Victor Stinnera5c62a82017-05-03 18:21:48 +02002962 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002963done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002964test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002965
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002966
2967
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002968if test "$cross_compiling" = yes; then
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2970$as_echo_n "checking for python interpreter for cross build... " >&6; }
2971 if test -z "$PYTHON_FOR_BUILD"; then
2972 for interp in python$PACKAGE_VERSION python3 python; do
2973 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002974 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 +02002975 break
2976 fi
2977 interp=
2978 done
2979 if test x$interp = x; then
2980 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2981 fi
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2983$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002984 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 +02002985 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002986elif test "$cross_compiling" = maybe; then
2987 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002988else
2989 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2990fi
2991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993
Benjamin Petersond23f8222009-04-05 19:13:16 +00002994if test "$prefix" != "/"; then
2995 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2996fi
2997
2998
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
3000
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003001# We don't use PACKAGE_ variables, and they cause conflicts
3002# with other autoconf-based packages that include Python.h
3003grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3004rm confdefs.h
3005mv confdefs.h.new confdefs.h
3006
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003007
Pablo Galindod4fe0982020-05-19 03:33:01 +01003008VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003009
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003010# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003011
3012SOVERSION=1.0
3013
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014# The later defininition of _XOPEN_SOURCE disables certain features
3015# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003018
3019
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003020# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3021# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3022# them.
3023
Matthias Kloseb9621712010-04-24 17:59:49 +00003024$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003025
3026
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003027# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3028# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3029# them.
3030
Matthias Kloseb9621712010-04-24 17:59:49 +00003031$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003032
3033
Martin v. Löwisd6320502004-08-12 13:45:08 +00003034# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003035# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3036# them.
3037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003039
3040
3041
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003042define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003043
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003044# Arguments passed to configure.
3045
3046CONFIG_ARGS="$ac_configure_args"
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3049$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003051if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053 case $enableval in
3054 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003055 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056 # information
3057 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003058 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3061 if test ! -d "${enableval}"
3062 then
3063 enableval=/
3064 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066 ;;
3067 esac
3068 case $enableval in
3069 no)
3070 UNIVERSALSDK=
3071 enable_universalsdk=
3072 ;;
3073 *)
3074 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 if test ! -d "${UNIVERSALSDK}"
3076 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003077 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003078 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079 ;;
3080 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003081
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083else
3084
3085 UNIVERSALSDK=
3086 enable_universalsdk=
3087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003090if test -n "${UNIVERSALSDK}"
3091then
Matthias Kloseb9621712010-04-24 17:59:49 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3093$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003094else
Matthias Kloseb9621712010-04-24 17:59:49 +00003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3096$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003099
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003100
Ned Deily87adb6e2013-10-18 21:09:56 -07003101ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003102
Ned Deilycbfb9a52012-06-23 16:02:19 -07003103# For backward compatibility reasons we prefer to select '32-bit' if available,
3104# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003106if test "`uname -s`" = "Darwin"
3107then
3108 if test -n "${UNIVERSALSDK}"
3109 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003110 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111 then
3112 UNIVERSAL_ARCHS="intel"
3113 fi
3114 fi
3115fi
3116
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003117
Matthias Kloseb9621712010-04-24 17:59:49 +00003118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3119$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120
3121# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124 UNIVERSAL_ARCHS="$withval"
3125
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126fi
3127
Ned Deily87adb6e2013-10-18 21:09:56 -07003128if test -n "${UNIVERSALSDK}"
3129then
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3131$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3132else
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3134$as_echo "no" >&6; }
3135fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003137
3138# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003140 withval=$with_framework_name;
3141 PYTHONFRAMEWORK=${withval}
3142 PYTHONFRAMEWORKDIR=${withval}.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3144
3145else
3146
3147 PYTHONFRAMEWORK=Python
3148 PYTHONFRAMEWORKDIR=Python.framework
3149 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3150
3151fi
3152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003154if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003156 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003157 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003158 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003159 esac
3160 case $enableval in
3161 no)
3162 PYTHONFRAMEWORK=
3163 PYTHONFRAMEWORKDIR=no-framework
3164 PYTHONFRAMEWORKPREFIX=
3165 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166 FRAMEWORKINSTALLFIRST=
3167 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 FRAMEWORKALTINSTALLFIRST=
3169 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003170 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 if test "x${prefix}" = "xNONE"; then
3172 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3173 else
3174 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3175 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003176 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003177 ;;
3178 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003179 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003182 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003183 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3184 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003185 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003186 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003187
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003188 if test "x${prefix}" = "xNONE" ; then
3189 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003191 else
3192 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3193 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003194
3195 case "${enableval}" in
3196 /System*)
3197 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3198 if test "${prefix}" = "NONE" ; then
3199 # See below
3200 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3201 fi
3202 ;;
3203
3204 /Library*)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 ;;
3207
3208 */Library/Frameworks)
3209 MDIR="`dirname "${enableval}"`"
3210 MDIR="`dirname "${MDIR}"`"
3211 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3212
3213 if test "${prefix}" = "NONE"; then
3214 # User hasn't specified the
3215 # --prefix option, but wants to install
3216 # the framework in a non-default location,
3217 # ensure that the compatibility links get
3218 # installed relative to that prefix as well
3219 # instead of in /usr/local.
3220 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3221 fi
3222 ;;
3223
3224 *)
3225 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3226 ;;
3227 esac
3228
Jack Jansen127e56e2001-09-11 14:41:54 +00003229 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3238
3239 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3240
Jack Jansene578a632001-08-15 01:27:14 +00003241 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
Guido van Rossum563e7081996-09-10 18:20:48 +00003243else
Martin v. Löwis11437992002-04-12 09:54:03 +00003244
Jack Jansene578a632001-08-15 01:27:14 +00003245 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003246 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003247 PYTHONFRAMEWORKPREFIX=
3248 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003249 FRAMEWORKINSTALLFIRST=
3250 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003251 FRAMEWORKALTINSTALLFIRST=
3252 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003253 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003254 if test "x${prefix}" = "xNONE" ; then
3255 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3256 else
3257 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3258 fi
Jack Jansene578a632001-08-15 01:27:14 +00003259 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003260
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262fi
3263
Thomas Wouters477c8d52006-05-27 19:21:47 +00003264
3265
Michael W. Hudson54241132001-12-07 15:38:26 +00003266
3267
3268
3269
Jack Jansene578a632001-08-15 01:27:14 +00003270
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003271
3272
3273
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003274
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003275
Ned Deilyb8f944f2013-11-21 22:42:25 -08003276
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003277
3278cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003279#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003280_ACEOF
3281
3282
Jack Jansene578a632001-08-15 01:27:14 +00003283##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003284## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003285## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003286##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287# Set name for machine-dependent library files
3288
Matthias Kloseb9621712010-04-24 17:59:49 +00003289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3290$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291if test -z "$MACHDEP"
3292then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 # avoid using uname for cross builds
3294 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003295 # ac_sys_system and ac_sys_release are used for setting
3296 # a lot of different things including 'define_xopen_source'
3297 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003299 *-*-linux-android*)
3300 ac_sys_system=Linux-android
3301 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 *-*-linux*)
3303 ac_sys_system=Linux
3304 ;;
3305 *-*-cygwin*)
3306 ac_sys_system=Cygwin
3307 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003308 *-*-vxworks*)
3309 ac_sys_system=VxWorks
3310 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 *)
3312 # for now, limit cross builds to known configurations
3313 MACHDEP="unknown"
3314 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3315 esac
3316 ac_sys_release=
3317 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003318 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003319 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003320 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003323 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003324 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003325 fi
3326 ac_md_system=`echo $ac_sys_system |
3327 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3328 ac_md_release=`echo $ac_sys_release |
3329 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3330 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003331
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003332 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003333 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003334 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003335 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003336 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003337 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003338 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003339fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3341$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003342
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003343
3344if test "$cross_compiling" = yes; then
3345 case "$host" in
3346 *-*-linux*)
3347 case "$host_cpu" in
3348 arm*)
3349 _host_cpu=arm
3350 ;;
3351 *)
3352 _host_cpu=$host_cpu
3353 esac
3354 ;;
3355 *-*-cygwin*)
3356 _host_cpu=
3357 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003358 *-*-vxworks*)
3359 _host_cpu=$host_cpu
3360 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003361 *)
3362 # for now, limit cross builds to known configurations
3363 MACHDEP="unknown"
3364 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3365 esac
3366 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3367fi
3368
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003369# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3370# disable features if it is defined, without any means to access these
3371# features as extensions. For these systems, we skip the definition of
3372# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3373# some feature, make sure there is no alternative way to access this
3374# feature. Also, when using wildcards, make sure you have verified the
3375# need for not defining _XOPEN_SOURCE on all systems matching the
3376# wildcard, and that the wildcard does not include future systems
3377# (which may remove their limitations).
3378case $ac_sys_system/$ac_sys_release in
3379 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3380 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003381 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003382 # In addition, Stefan Krah confirms that issue #1244610 exists through
3383 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003384 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003385 define_xopen_source=no
3386 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3387 # also defined. This can be overridden by defining _BSD_SOURCE
3388 # As this has a different meaning on Linux, only define it on OpenBSD
3389
Matthias Kloseb9621712010-04-24 17:59:49 +00003390$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003391
3392 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003393 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003394 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3395 # also defined. This can be overridden by defining _BSD_SOURCE
3396 # As this has a different meaning on Linux, only define it on OpenBSD
3397
Matthias Kloseb9621712010-04-24 17:59:49 +00003398$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003399
3400 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003401 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3402 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3403 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003404 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 +00003405 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003406 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3407 # request to enable features supported by the standard as a request
3408 # to disable features not supported by the standard. The best way
3409 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3410 # entirely and define __EXTENSIONS__ instead.
3411 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003412 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3414 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003415 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003416 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003417 define_xopen_source=no;;
3418 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003419 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003420 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003421 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003422 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3423 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3424 # identifies itself as Darwin/7.*
3425 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3426 # disables platform specific features beyond repair.
3427 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3428 # has no effect, don't bother defining them
3429 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003430 define_xopen_source=no;;
Ronald Oussoren8ea63532020-06-25 16:55:48 +02003431 Darwin/[12][0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003432 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003433 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3434 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3435 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003436 AIX/4)
3437 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003438 AIX/5)
3439 if test `uname -r` -eq 1; then
3440 define_xopen_source=no
3441 fi
3442 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003443 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3444 # defining NI_NUMERICHOST.
3445 QNX/6.3.2)
3446 define_xopen_source=no
3447 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003448 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3449 # in network headers still using system V types.
3450 VxWorks/*)
3451 define_xopen_source=no
3452 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003453
Ian Nortona9edf442020-02-14 03:09:11 +00003454 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3455 # chroot() and other functions
3456 hp*|HP*)
3457 define_xopen_source=no
3458 ;;
3459
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460esac
3461
3462if test $define_xopen_source = yes
3463then
Victor Stinner14d098d2011-09-07 22:29:43 +02003464 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Victor Stinner14d098d2011-09-07 22:29:43 +02003466$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003467
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003468
3469 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3470 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3471 # several APIs are not declared. Since this is also needed in some
3472 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003475
3476
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003477
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003478$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003479
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003480fi
3481
Christian Heimes647cd872013-12-07 23:39:33 +01003482# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3483case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003484 hp*|HP*)
3485 define_stdc_a1=yes;;
3486 *)
3487 define_stdc_a1=no;;
3488esac
3489
3490if test $define_stdc_a1 = yes
3491then
Christian Heimes647cd872013-12-07 23:39:33 +01003492
3493$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3494
Christian Heimesb02bcae2013-12-08 15:21:08 +01003495fi
Christian Heimes647cd872013-12-07 23:39:33 +01003496
Jack Jansen6b08a402004-06-03 12:41:45 +00003497# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3498# it may influence the way we can build extensions, so distutils
3499# needs to check it
3500
Thomas Wouters477c8d52006-05-27 19:21:47 +00003501
Jack Jansen6b08a402004-06-03 12:41:45 +00003502CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003503EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003504
Guido van Rossum627b2d71993-12-24 10:39:16 +00003505# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003506
3507# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3508# for debug/optimization stuff. BASECFLAGS is for flags that are required
3509# just to get things to compile and link. Users are free to override OPT
3510# when running configure or make. The build should not break if they do.
3511# BASECFLAGS should generally not be messed with, however.
3512
Guido van Rossum8b131c51995-03-09 14:10:13 +00003513# If the user switches compilers, we can't believe the cache
3514if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3515then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003516 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003517(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003518fi
3519
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003520# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3521# when the compiler supports them, but we don't always want -O2, and
3522# we set -g later.
3523if test -z "$CFLAGS"; then
3524 CFLAGS=
3525fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003526
3527if test "$ac_sys_system" = "Darwin"
3528then
3529 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003530 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 # information
3532 if test -z "${CC}"
3533 then
3534 found_gcc=
3535 found_clang=
3536 as_save_IFS=$IFS; IFS=:
3537 for as_dir in $PATH
3538 do
3539 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003540 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003542 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543 fi
3544 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003545 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003546 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003547 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003548 fi
3549 fi
3550 done
3551 IFS=$as_save_IFS
3552
3553 if test -n "$found_gcc" -a -n "$found_clang"
3554 then
3555 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3556 then
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3558$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3559 CC="$found_clang"
3560 CXX="$found_clang++"
3561 fi
3562
3563
3564 elif test -z "$found_gcc" -a -n "$found_clang"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3567$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3568 CC="$found_clang"
3569 CXX="$found_clang++"
3570
3571 elif test -z "$found_gcc" -a -z "$found_clang"
3572 then
3573 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3574 if test -n "${found_clang}"
3575 then
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3577$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3578 CC="${found_clang}"
3579 CXX="`/usr/bin/xcrun -find clang++`"
3580
3581 # else: use default behaviour
3582 fi
3583 fi
3584 fi
3585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003586ac_ext=c
3587ac_cpp='$CPP $CPPFLAGS'
3588ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3589ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3590ac_compiler_gnu=$ac_cv_c_compiler_gnu
3591if test -n "$ac_tool_prefix"; then
3592 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3593set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003596if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003598else
3599 if test -n "$CC"; then
3600 ac_cv_prog_CC="$CC" # Let the user override the test.
3601else
Martin v. Löwis11437992002-04-12 09:54:03 +00003602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603for as_dir in $PATH
3604do
3605 IFS=$as_save_IFS
3606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $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 +00003611 break 2
3612 fi
3613done
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003616
Jack Jansendd19cf82001-12-06 22:36:17 +00003617fi
3618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003620if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3622$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629fi
3630if test -z "$ac_cv_prog_CC"; then
3631 ac_ct_CC=$CC
3632 # Extract the first word of "gcc", so it can be a program name with args.
3633set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3635$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003636if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003638else
3639 if test -n "$ac_ct_CC"; then
3640 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3641else
3642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643for as_dir in $PATH
3644do
3645 IFS=$as_save_IFS
3646 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $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 +00003651 break 2
3652 fi
3653done
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003656
3657fi
3658fi
3659ac_ct_CC=$ac_cv_prog_ac_ct_CC
3660if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3662$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3665$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 if test "x$ac_ct_CC" = x; then
3669 CC=""
3670 else
3671 case $cross_compiling:$ac_tool_warned in
3672yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675ac_tool_warned=yes ;;
3676esac
3677 CC=$ac_ct_CC
3678 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003679else
3680 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003681fi
3682
Jack Jansendd19cf82001-12-06 22:36:17 +00003683if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 if test -n "$ac_tool_prefix"; then
3685 # 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 +00003686set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003689if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003691else
3692 if test -n "$CC"; then
3693 ac_cv_prog_CC="$CC" # Let the user override the test.
3694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696for as_dir in $PATH
3697do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 $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 +00003704 break 2
3705 fi
3706done
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003709
3710fi
3711fi
3712CC=$ac_cv_prog_CC
3713if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3715$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716else
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724if test -z "$CC"; then
3725 # Extract the first word of "cc", so it can be a program name with args.
3726set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003729if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003731else
3732 if test -n "$CC"; then
3733 ac_cv_prog_CC="$CC" # Let the user override the test.
3734else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3744 ac_prog_rejected=yes
3745 continue
3746 fi
3747 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $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 +00003749 break 2
3750 fi
3751done
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003754
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755if test $ac_prog_rejected = yes; then
3756 # We found a bogon in the path, so make sure we never use it.
3757 set dummy $ac_cv_prog_CC
3758 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760 # We chose a different compiler from the bogus one.
3761 # However, it has the same basename, so the bogon will be chosen
3762 # first if we set CC to just the basename; use the full file name.
3763 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003764 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765 fi
3766fi
3767fi
3768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003769CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3772$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773else
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3775$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003776fi
3777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779fi
3780if test -z "$CC"; then
3781 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 do
3784 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3785set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3787$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003788if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003790else
3791 if test -n "$CC"; then
3792 ac_cv_prog_CC="$CC" # Let the user override the test.
3793else
Martin v. Löwis11437992002-04-12 09:54:03 +00003794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795for as_dir in $PATH
3796do
3797 IFS=$as_save_IFS
3798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 $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 +00003803 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805done
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003808
3809fi
3810fi
3811CC=$ac_cv_prog_CC
3812if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3814$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3817$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003818fi
3819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 test -n "$CC" && break
3822 done
3823fi
3824if test -z "$CC"; then
3825 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003827do
3828 # Extract the first word of "$ac_prog", so it can be a program name with args.
3829set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3831$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003832if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
3835 if test -n "$ac_ct_CC"; then
3836 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3837else
3838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH
3840do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 $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 +00003847 break 2
3848 fi
3849done
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
3854fi
3855ac_ct_CC=$ac_cv_prog_ac_ct_CC
3856if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3858$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859else
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3861$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 test -n "$ac_ct_CC" && break
3866done
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 if test "x$ac_ct_CC" = x; then
3869 CC=""
3870 else
3871 case $cross_compiling:$ac_tool_warned in
3872yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875ac_tool_warned=yes ;;
3876esac
3877 CC=$ac_ct_CC
3878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
3880
3881fi
3882
3883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003886as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003887See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
3889# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003890$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3891set X $ac_compile
3892ac_compiler=$2
3893for ac_option in --version -v -V -qversion; do
3894 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3900$as_echo "$ac_try_echo"; } >&5
3901 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 if test -s conftest.err; then
3904 sed '10a\
3905... rest of stderr output deleted ...
3906 10q' conftest.err >conftest.er1
3907 cat conftest.er1 >&5
3908 fi
3909 rm -f conftest.er1 conftest.err
3910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3911 test $ac_status = 0; }
3912done
Martin v. Löwis11437992002-04-12 09:54:03 +00003913
Matthias Kloseb9621712010-04-24 17:59:49 +00003914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003915/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003916
Martin v. Löwis11437992002-04-12 09:54:03 +00003917int
3918main ()
3919{
3920
3921 ;
3922 return 0;
3923}
3924_ACEOF
3925ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003926ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003927# Try to create an executable without -o first, disregard a.out.
3928# It will help us diagnose broken compilers, and finding out an intuition
3929# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3931$as_echo_n "checking whether the C compiler works... " >&6; }
3932ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3933
3934# The possible output files:
3935ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937ac_rmfiles=
3938for ac_file in $ac_files
3939do
3940 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3943 esac
3944done
3945rm -f $ac_rmfiles
3946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948case "(($ac_try" in
3949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950 *) ac_try_echo=$ac_try;;
3951esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3953$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3957 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3959# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3960# in a Makefile. We should not override ac_cv_exeext if it was cached,
3961# so that the user can short-circuit this test for compilers unknown to
3962# Autoconf.
3963for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003964do
3965 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968 ;;
3969 [ab].out )
3970 # We found the default executable, but exeext='' is most
3971 # certainly right.
3972 break;;
3973 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 then :; else
3976 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3977 fi
3978 # We set ac_cv_exeext here because the later test for it is not
3979 # safe: cross compilers may not add the suffix if given an `-o'
3980 # argument, so we may need to know it at that point already.
3981 # Even if this section looks crufty: it has the advantage of
3982 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 break;;
3984 * )
3985 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 esac
3987done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988test "$ac_cv_exeext" = no && ac_cv_exeext=
3989
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003990else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 ac_file=''
3992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003993if test -z "$ac_file"; then :
3994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
3996$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003997sed 's/^/| /' conftest.$ac_ext >&5
3998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004001as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004002See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004003else
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4005$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4008$as_echo_n "checking for C compiler default output file name... " >&6; }
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4010$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012
Matthias Kloseb9621712010-04-24 17:59:49 +00004013rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4016$as_echo_n "checking for suffix of executables... " >&6; }
4017if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4023$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4029# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4030# work properly (i.e., refer to `conftest.exe'), while it won't with
4031# `rm'.
4032for ac_file in conftest.exe conftest conftest.*; do
4033 test -f "$ac_file" || continue
4034 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4037 break;;
4038 * ) break;;
4039 esac
4040done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041else
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004044as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004045See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004047rm -f conftest conftest$ac_cv_exeext
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4049$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050
4051rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004052EXEEXT=$ac_cv_exeext
4053ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055/* end confdefs.h. */
4056#include <stdio.h>
4057int
4058main ()
4059{
4060FILE *f = fopen ("conftest.out", "w");
4061 return ferror (f) || fclose (f) != 0;
4062
4063 ;
4064 return 0;
4065}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004067ac_clean_files="$ac_clean_files conftest.out"
4068# Check that the compiler produces executables we can run. If not, either
4069# the compiler is broken, or we cross compile.
4070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4071$as_echo_n "checking whether we are cross compiling... " >&6; }
4072if test "$cross_compiling" != yes; then
4073 { { ac_try="$ac_link"
4074case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
4078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
4080 (eval "$ac_link") 2>&5
4081 ac_status=$?
4082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }
4084 if { ac_try='./conftest$ac_cv_exeext'
4085 { { case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088esac
4089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090$as_echo "$ac_try_echo"; } >&5
4091 (eval "$ac_try") 2>&5
4092 ac_status=$?
4093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; }; then
4095 cross_compiling=no
4096 else
4097 if test "$cross_compiling" = maybe; then
4098 cross_compiling=yes
4099 else
4100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004102as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004103If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004104See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 fi
4106 fi
4107fi
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4109$as_echo "$cross_compiling" >&6; }
4110
4111rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4112ac_clean_files=$ac_clean_files_save
4113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4114$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004115if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo_n "(cached) " >&6
4117else
4118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119/* end confdefs.h. */
4120
4121int
4122main ()
4123{
4124
4125 ;
4126 return 0;
4127}
4128_ACEOF
4129rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004130if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131case "(($ac_try" in
4132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4133 *) ac_try_echo=$ac_try;;
4134esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004135eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4136$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004137 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4140 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 for ac_file in conftest.o conftest.obj conftest.*; do
4142 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4146 break;;
4147 esac
4148done
4149else
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004151sed 's/^/| /' conftest.$ac_ext >&5
4152
Matthias Kloseb9621712010-04-24 17:59:49 +00004153{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004155as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004156See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004158rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4161$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004162OBJEXT=$ac_cv_objext
4163ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4165$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004166if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004168else
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004171
Martin v. Löwis11437992002-04-12 09:54:03 +00004172int
4173main ()
4174{
4175#ifndef __GNUC__
4176 choke me
4177#endif
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 ac_compiler_gnu=yes
4185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004189ac_cv_c_compiler_gnu=$ac_compiler_gnu
4190
4191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4193$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4194if test $ac_compiler_gnu = yes; then
4195 GCC=yes
4196else
4197 GCC=
4198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004199ac_test_CFLAGS=${CFLAGS+set}
4200ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4202$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004203if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004205else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206 ac_save_c_werror_flag=$ac_c_werror_flag
4207 ac_c_werror_flag=yes
4208 ac_cv_prog_cc_g=no
4209 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004212
Martin v. Löwis11437992002-04-12 09:54:03 +00004213int
4214main ()
4215{
4216
4217 ;
4218 return 0;
4219}
4220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004222 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223else
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 CFLAGS=""
4225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237
Matthias Kloseb9621712010-04-24 17:59:49 +00004238else
4239 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242/* end confdefs.h. */
4243
4244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4260 ac_c_werror_flag=$ac_save_c_werror_flag
4261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4263$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266elif test $ac_cv_prog_cc_g = yes; then
4267 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004268 CFLAGS="-g -O2"
4269 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271 fi
4272else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273 if test "$GCC" = yes; then
4274 CFLAGS="-O2"
4275 else
4276 CFLAGS=
4277 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4280$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004281if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004283else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004285ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004287/* end confdefs.h. */
4288#include <stdarg.h>
4289#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004290struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4292struct buf { int x; };
4293FILE * (*rcsopen) (struct buf *, struct stat *, int);
4294static char *e (p, i)
4295 char **p;
4296 int i;
4297{
4298 return p[i];
4299}
4300static char *f (char * (*g) (char **, int), char **p, ...)
4301{
4302 char *s;
4303 va_list v;
4304 va_start (v,p);
4305 s = g (p, va_arg (v,int));
4306 va_end (v);
4307 return s;
4308}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004309
4310/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4311 function prototypes and stuff, but not '\xHH' hex character constants.
4312 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4315 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004317int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4320 inside strings and character constants. */
4321#define FOO(x) 'x'
4322int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4323
Skip Montanaro6dead952003-09-25 14:50:04 +00004324int test (int i, double x);
4325struct s1 {int (*f) (int a);};
4326struct s2 {int (*f) (double a);};
4327int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4328int argc;
4329char **argv;
4330int
4331main ()
4332{
4333return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4334 ;
4335 return 0;
4336}
4337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4339 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004340do
4341 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345rm -f core conftest.err conftest.$ac_objext
4346 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004347done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004349CC=$ac_save_CC
4350
4351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352# AC_CACHE_VAL
4353case "x$ac_cv_prog_cc_c89" in
4354 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4356$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4359$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4363$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004365if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004366
Matthias Kloseb9621712010-04-24 17:59:49 +00004367fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369ac_ext=c
4370ac_cpp='$CPP $CPPFLAGS'
4371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4373ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004375ac_ext=c
4376ac_cpp='$CPP $CPPFLAGS'
4377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4379ac_compiler_gnu=$ac_cv_c_compiler_gnu
4380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4381$as_echo_n "checking how to run the C preprocessor... " >&6; }
4382# On Suns, sometimes $CPP names a directory.
4383if test -n "$CPP" && test -d "$CPP"; then
4384 CPP=
4385fi
4386if test -z "$CPP"; then
4387 if ${ac_cv_prog_CPP+:} false; then :
4388 $as_echo_n "(cached) " >&6
4389else
4390 # Double quotes because CPP needs to be expanded
4391 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4392 do
4393 ac_preproc_ok=false
4394for ac_c_preproc_warn_flag in '' yes
4395do
4396 # Use a header file that comes with gcc, so configuring glibc
4397 # with a fresh cross-compiler works.
4398 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4399 # <limits.h> exists even on freestanding compilers.
4400 # On the NeXT, cc -E runs the code through the compiler's parser,
4401 # not just through cpp. "Syntax error" is here to catch this case.
4402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403/* end confdefs.h. */
4404#ifdef __STDC__
4405# include <limits.h>
4406#else
4407# include <assert.h>
4408#endif
4409 Syntax error
4410_ACEOF
4411if ac_fn_c_try_cpp "$LINENO"; then :
4412
4413else
4414 # Broken: fails on valid input.
4415continue
4416fi
4417rm -f conftest.err conftest.i conftest.$ac_ext
4418
4419 # OK, works on sane cases. Now check whether nonexistent headers
4420 # can be detected and how.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#include <ac_nonexistent.h>
4424_ACEOF
4425if ac_fn_c_try_cpp "$LINENO"; then :
4426 # Broken: success on invalid input.
4427continue
4428else
4429 # Passes both tests.
4430ac_preproc_ok=:
4431break
4432fi
4433rm -f conftest.err conftest.i conftest.$ac_ext
4434
4435done
4436# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4437rm -f conftest.i conftest.err conftest.$ac_ext
4438if $ac_preproc_ok; then :
4439 break
4440fi
4441
4442 done
4443 ac_cv_prog_CPP=$CPP
4444
4445fi
4446 CPP=$ac_cv_prog_CPP
4447else
4448 ac_cv_prog_CPP=$CPP
4449fi
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4451$as_echo "$CPP" >&6; }
4452ac_preproc_ok=false
4453for ac_c_preproc_warn_flag in '' yes
4454do
4455 # Use a header file that comes with gcc, so configuring glibc
4456 # with a fresh cross-compiler works.
4457 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4458 # <limits.h> exists even on freestanding compilers.
4459 # On the NeXT, cc -E runs the code through the compiler's parser,
4460 # not just through cpp. "Syntax error" is here to catch this case.
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462/* end confdefs.h. */
4463#ifdef __STDC__
4464# include <limits.h>
4465#else
4466# include <assert.h>
4467#endif
4468 Syntax error
4469_ACEOF
4470if ac_fn_c_try_cpp "$LINENO"; then :
4471
4472else
4473 # Broken: fails on valid input.
4474continue
4475fi
4476rm -f conftest.err conftest.i conftest.$ac_ext
4477
4478 # OK, works on sane cases. Now check whether nonexistent headers
4479 # can be detected and how.
4480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4481/* end confdefs.h. */
4482#include <ac_nonexistent.h>
4483_ACEOF
4484if ac_fn_c_try_cpp "$LINENO"; then :
4485 # Broken: success on invalid input.
4486continue
4487else
4488 # Passes both tests.
4489ac_preproc_ok=:
4490break
4491fi
4492rm -f conftest.err conftest.i conftest.$ac_ext
4493
4494done
4495# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4496rm -f conftest.i conftest.err conftest.$ac_ext
4497if $ac_preproc_ok; then :
4498
4499else
4500 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4502as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4503See \`config.log' for more details" "$LINENO" 5; }
4504fi
4505
4506ac_ext=c
4507ac_cpp='$CPP $CPPFLAGS'
4508ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4509ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4510ac_compiler_gnu=$ac_cv_c_compiler_gnu
4511
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4513$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4514if ${ac_cv_path_GREP+:} false; then :
4515 $as_echo_n "(cached) " >&6
4516else
4517 if test -z "$GREP"; then
4518 ac_path_GREP_found=false
4519 # Loop through the user's path and test for each of PROGNAME-LIST
4520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4521for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4522do
4523 IFS=$as_save_IFS
4524 test -z "$as_dir" && as_dir=.
4525 for ac_prog in grep ggrep; do
4526 for ac_exec_ext in '' $ac_executable_extensions; do
4527 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4528 as_fn_executable_p "$ac_path_GREP" || continue
4529# Check for GNU ac_path_GREP and select it if it is found.
4530 # Check for GNU $ac_path_GREP
4531case `"$ac_path_GREP" --version 2>&1` in
4532*GNU*)
4533 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4534*)
4535 ac_count=0
4536 $as_echo_n 0123456789 >"conftest.in"
4537 while :
4538 do
4539 cat "conftest.in" "conftest.in" >"conftest.tmp"
4540 mv "conftest.tmp" "conftest.in"
4541 cp "conftest.in" "conftest.nl"
4542 $as_echo 'GREP' >> "conftest.nl"
4543 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4544 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4545 as_fn_arith $ac_count + 1 && ac_count=$as_val
4546 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4547 # Best one so far, save it but keep looking for a better one
4548 ac_cv_path_GREP="$ac_path_GREP"
4549 ac_path_GREP_max=$ac_count
4550 fi
4551 # 10*(2^10) chars as input seems more than enough
4552 test $ac_count -gt 10 && break
4553 done
4554 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4555esac
4556
4557 $ac_path_GREP_found && break 3
4558 done
4559 done
4560 done
4561IFS=$as_save_IFS
4562 if test -z "$ac_cv_path_GREP"; then
4563 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4564 fi
4565else
4566 ac_cv_path_GREP=$GREP
4567fi
4568
4569fi
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4571$as_echo "$ac_cv_path_GREP" >&6; }
4572 GREP="$ac_cv_path_GREP"
4573
4574
Łukasz Langaa785c872016-09-09 17:37:37 -07004575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4576$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4577if ${ac_cv_path_SED+:} false; then :
4578 $as_echo_n "(cached) " >&6
4579else
4580 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4581 for ac_i in 1 2 3 4 5 6 7; do
4582 ac_script="$ac_script$as_nl$ac_script"
4583 done
4584 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4585 { ac_script=; unset ac_script;}
4586 if test -z "$SED"; then
4587 ac_path_SED_found=false
4588 # Loop through the user's path and test for each of PROGNAME-LIST
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in $PATH
4591do
4592 IFS=$as_save_IFS
4593 test -z "$as_dir" && as_dir=.
4594 for ac_prog in sed gsed; do
4595 for ac_exec_ext in '' $ac_executable_extensions; do
4596 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4597 as_fn_executable_p "$ac_path_SED" || continue
4598# Check for GNU ac_path_SED and select it if it is found.
4599 # Check for GNU $ac_path_SED
4600case `"$ac_path_SED" --version 2>&1` in
4601*GNU*)
4602 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4603*)
4604 ac_count=0
4605 $as_echo_n 0123456789 >"conftest.in"
4606 while :
4607 do
4608 cat "conftest.in" "conftest.in" >"conftest.tmp"
4609 mv "conftest.tmp" "conftest.in"
4610 cp "conftest.in" "conftest.nl"
4611 $as_echo '' >> "conftest.nl"
4612 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4613 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4614 as_fn_arith $ac_count + 1 && ac_count=$as_val
4615 if test $ac_count -gt ${ac_path_SED_max-0}; then
4616 # Best one so far, save it but keep looking for a better one
4617 ac_cv_path_SED="$ac_path_SED"
4618 ac_path_SED_max=$ac_count
4619 fi
4620 # 10*(2^10) chars as input seems more than enough
4621 test $ac_count -gt 10 && break
4622 done
4623 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4624esac
4625
4626 $ac_path_SED_found && break 3
4627 done
4628 done
4629 done
4630IFS=$as_save_IFS
4631 if test -z "$ac_cv_path_SED"; then
4632 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4633 fi
4634else
4635 ac_cv_path_SED=$SED
4636fi
4637
4638fi
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4640$as_echo "$ac_cv_path_SED" >&6; }
4641 SED="$ac_cv_path_SED"
4642 rm -f conftest.sed
4643
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004644
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646
Matthias Kloseb9621712010-04-24 17:59:49 +00004647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4648$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004651if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004652 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653
4654 case $withval in
4655 no) with_cxx_main=no
4656 MAINCC='$(CC)';;
4657 yes) with_cxx_main=yes
4658 MAINCC='$(CXX)';;
4659 *) with_cxx_main=yes
4660 MAINCC=$withval
4661 if test -z "$CXX"
4662 then
4663 CXX=$withval
4664 fi;;
4665 esac
4666else
4667
4668 with_cxx_main=no
4669 MAINCC='$(CC)'
4670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004671fi
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4674$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004675
4676preset_cxx="$CXX"
4677if test -z "$CXX"
4678then
4679 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004680 gcc) if test -n "$ac_tool_prefix"; then
4681 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4682set dummy ${ac_tool_prefix}g++; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_CXX+:} false; then :
4686 $as_echo_n "(cached) " >&6
4687else
4688 case $CXX in
4689 [\\/]* | ?:[\\/]*)
4690 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4691 ;;
4692 *)
4693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in notfound
4695do
4696 IFS=$as_save_IFS
4697 test -z "$as_dir" && as_dir=.
4698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004700 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702 break 2
4703 fi
4704done
4705 done
4706IFS=$as_save_IFS
4707
4708 ;;
4709esac
4710fi
4711CXX=$ac_cv_path_CXX
4712if test -n "$CXX"; then
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4714$as_echo "$CXX" >&6; }
4715else
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721fi
4722if test -z "$ac_cv_path_CXX"; then
4723 ac_pt_CXX=$CXX
4724 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728if ${ac_cv_path_ac_pt_CXX+:} false; then :
4729 $as_echo_n "(cached) " >&6
4730else
4731 case $ac_pt_CXX in
4732 [\\/]* | ?:[\\/]*)
4733 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4734 ;;
4735 *)
4736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in notfound
4738do
4739 IFS=$as_save_IFS
4740 test -z "$as_dir" && as_dir=.
4741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004743 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4745 break 2
4746 fi
4747done
4748 done
4749IFS=$as_save_IFS
4750
4751 ;;
4752esac
4753fi
4754ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4755if test -n "$ac_pt_CXX"; then
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4757$as_echo "$ac_pt_CXX" >&6; }
4758else
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
4761fi
4762
4763 if test "x$ac_pt_CXX" = x; then
4764 CXX="g++"
4765 else
4766 case $cross_compiling:$ac_tool_warned in
4767yes:)
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4769$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4770ac_tool_warned=yes ;;
4771esac
4772 CXX=$ac_pt_CXX
4773 fi
4774else
4775 CXX="$ac_cv_path_CXX"
4776fi
4777 ;;
4778 cc) if test -n "$ac_tool_prefix"; then
4779 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4780set dummy ${ac_tool_prefix}c++; ac_word=$2
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4782$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004783if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785else
4786 case $CXX in
4787 [\\/]* | ?:[\\/]*)
4788 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4789 ;;
4790 *)
4791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792for as_dir in notfound
4793do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 break 2
4801 fi
4802done
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004804IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 ;;
4807esac
4808fi
4809CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4812$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813else
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4815$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818
4819fi
4820if test -z "$ac_cv_path_CXX"; then
4821 ac_pt_CXX=$CXX
4822 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 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 +00004832 ;;
4833 *)
4834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in notfound
4836do
4837 IFS=$as_save_IFS
4838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843 break 2
4844 fi
4845done
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004847IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 ;;
4850esac
4851fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4853if test -n "$ac_pt_CXX"; then
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4855$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004856else
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004860
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861 if test "x$ac_pt_CXX" = x; then
4862 CXX="c++"
4863 else
4864 case $cross_compiling:$ac_tool_warned in
4865yes:)
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4868ac_tool_warned=yes ;;
4869esac
4870 CXX=$ac_pt_CXX
4871 fi
4872else
4873 CXX="$ac_cv_path_CXX"
4874fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004875 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876 clang|*/clang) if test -n "$ac_tool_prefix"; then
4877 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4878set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4880$as_echo_n "checking for $ac_word... " >&6; }
4881if ${ac_cv_path_CXX+:} false; then :
4882 $as_echo_n "(cached) " >&6
4883else
4884 case $CXX in
4885 [\\/]* | ?:[\\/]*)
4886 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4887 ;;
4888 *)
4889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890for as_dir in notfound
4891do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
4894 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898 break 2
4899 fi
4900done
4901 done
4902IFS=$as_save_IFS
4903
Ned Deilycbfb9a52012-06-23 16:02:19 -07004904 ;;
4905esac
4906fi
4907CXX=$ac_cv_path_CXX
4908if test -n "$CXX"; then
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4910$as_echo "$CXX" >&6; }
4911else
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913$as_echo "no" >&6; }
4914fi
4915
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004916
4917fi
4918if test -z "$ac_cv_path_CXX"; then
4919 ac_pt_CXX=$CXX
4920 # Extract the first word of "clang++", so it can be a program name with args.
4921set dummy clang++; ac_word=$2
4922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923$as_echo_n "checking for $ac_word... " >&6; }
4924if ${ac_cv_path_ac_pt_CXX+:} false; then :
4925 $as_echo_n "(cached) " >&6
4926else
4927 case $ac_pt_CXX in
4928 [\\/]* | ?:[\\/]*)
4929 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4930 ;;
4931 *)
4932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4933for as_dir in notfound
4934do
4935 IFS=$as_save_IFS
4936 test -z "$as_dir" && as_dir=.
4937 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004939 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4941 break 2
4942 fi
4943done
4944 done
4945IFS=$as_save_IFS
4946
4947 ;;
4948esac
4949fi
4950ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4951if test -n "$ac_pt_CXX"; then
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4953$as_echo "$ac_pt_CXX" >&6; }
4954else
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956$as_echo "no" >&6; }
4957fi
4958
4959 if test "x$ac_pt_CXX" = x; then
4960 CXX="clang++"
4961 else
4962 case $cross_compiling:$ac_tool_warned in
4963yes:)
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4966ac_tool_warned=yes ;;
4967esac
4968 CXX=$ac_pt_CXX
4969 fi
4970else
4971 CXX="$ac_cv_path_CXX"
4972fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004973 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004974 icc|*/icc) if test -n "$ac_tool_prefix"; then
4975 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4976set dummy ${ac_tool_prefix}icpc; ac_word=$2
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4978$as_echo_n "checking for $ac_word... " >&6; }
4979if ${ac_cv_path_CXX+:} false; then :
4980 $as_echo_n "(cached) " >&6
4981else
4982 case $CXX in
4983 [\\/]* | ?:[\\/]*)
4984 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4985 ;;
4986 *)
4987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988for as_dir in notfound
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
4992 for ac_exec_ext in '' $ac_executable_extensions; do
4993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4994 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4996 break 2
4997 fi
4998done
4999 done
5000IFS=$as_save_IFS
5001
5002 ;;
5003esac
5004fi
5005CXX=$ac_cv_path_CXX
5006if test -n "$CXX"; then
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5008$as_echo "$CXX" >&6; }
5009else
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011$as_echo "no" >&6; }
5012fi
5013
5014
5015fi
5016if test -z "$ac_cv_path_CXX"; then
5017 ac_pt_CXX=$CXX
5018 # Extract the first word of "icpc", so it can be a program name with args.
5019set dummy icpc; ac_word=$2
5020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
5022if ${ac_cv_path_ac_pt_CXX+:} false; then :
5023 $as_echo_n "(cached) " >&6
5024else
5025 case $ac_pt_CXX in
5026 [\\/]* | ?:[\\/]*)
5027 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5028 ;;
5029 *)
5030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in notfound
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
5035 for ac_exec_ext in '' $ac_executable_extensions; do
5036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5037 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5039 break 2
5040 fi
5041done
5042 done
5043IFS=$as_save_IFS
5044
5045 ;;
5046esac
5047fi
5048ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5049if test -n "$ac_pt_CXX"; then
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5051$as_echo "$ac_pt_CXX" >&6; }
5052else
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054$as_echo "no" >&6; }
5055fi
5056
5057 if test "x$ac_pt_CXX" = x; then
5058 CXX="icpc"
5059 else
5060 case $cross_compiling:$ac_tool_warned in
5061yes:)
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5064ac_tool_warned=yes ;;
5065esac
5066 CXX=$ac_pt_CXX
5067 fi
5068else
5069 CXX="$ac_cv_path_CXX"
5070fi
5071 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072 esac
5073 if test "$CXX" = "notfound"
5074 then
5075 CXX=""
5076 fi
5077fi
5078if test -z "$CXX"
5079then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 if test -n "$ac_tool_prefix"; then
5081 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5082 do
5083 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005087if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089else
5090 if test -n "$CXX"; then
5091 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5092else
5093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005100 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102 break 2
5103 fi
5104done
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107
5108fi
5109fi
5110CXX=$ac_cv_prog_CXX
5111if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5113$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114else
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117fi
5118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005119
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005120 test -n "$CXX" && break
5121 done
5122fi
5123if test -z "$CXX"; then
5124 ac_ct_CXX=$CXX
5125 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5126do
5127 # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5132 $as_echo_n "(cached) " >&6
5133else
5134 if test -n "$ac_ct_CXX"; then
5135 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5136else
5137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
5142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 ac_cv_prog_ac_ct_CXX="$ac_prog"
5145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146 break 2
5147 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005149 done
5150IFS=$as_save_IFS
5151
5152fi
5153fi
5154ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5155if test -n "$ac_ct_CXX"; then
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5157$as_echo "$ac_ct_CXX" >&6; }
5158else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164 test -n "$ac_ct_CXX" && break
5165done
5166
5167 if test "x$ac_ct_CXX" = x; then
5168 CXX="notfound"
5169 else
5170 case $cross_compiling:$ac_tool_warned in
5171yes:)
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5174ac_tool_warned=yes ;;
5175esac
5176 CXX=$ac_ct_CXX
5177 fi
5178fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179
5180 if test "$CXX" = "notfound"
5181 then
5182 CXX=""
5183 fi
5184fi
5185if test "$preset_cxx" != "$CXX"
5186then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005187 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005188
5189 By default, distutils will build C++ extension modules with \"$CXX\".
5190 If this is not intended, then set CXX on the configure command line.
5191 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005192$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 By default, distutils will build C++ extension modules with \"$CXX\".
5195 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005196 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197fi
5198
5199
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5201
5202
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5204$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5205cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef bfin
5207#undef cris
5208#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005209#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef hppa
5211#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005214#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005215#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005217#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005218 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005219#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220# if defined(__x86_64__) && defined(__LP64__)
5221 x86_64-linux-gnu
5222# elif defined(__x86_64__) && defined(__ILP32__)
5223 x86_64-linux-gnux32
5224# elif defined(__i386__)
5225 i386-linux-gnu
5226# elif defined(__aarch64__) && defined(__AARCH64EL__)
5227# if defined(__ILP32__)
5228 aarch64_ilp32-linux-gnu
5229# else
5230 aarch64-linux-gnu
5231# endif
5232# elif defined(__aarch64__) && defined(__AARCH64EB__)
5233# if defined(__ILP32__)
5234 aarch64_be_ilp32-linux-gnu
5235# else
5236 aarch64_be-linux-gnu
5237# endif
5238# elif defined(__alpha__)
5239 alpha-linux-gnu
5240# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5241# if defined(__ARMEL__)
5242 arm-linux-gnueabihf
5243# else
5244 armeb-linux-gnueabihf
5245# endif
5246# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5247# if defined(__ARMEL__)
5248 arm-linux-gnueabi
5249# else
5250 armeb-linux-gnueabi
5251# endif
5252# elif defined(__hppa__)
5253 hppa-linux-gnu
5254# elif defined(__ia64__)
5255 ia64-linux-gnu
5256# elif defined(__m68k__) && !defined(__mcoldfire__)
5257 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005258# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5259# if _MIPS_SIM == _ABIO32
5260 mipsisa32r6el-linux-gnu
5261# elif _MIPS_SIM == _ABIN32
5262 mipsisa64r6el-linux-gnuabin32
5263# elif _MIPS_SIM == _ABI64
5264 mipsisa64r6el-linux-gnuabi64
5265# else
5266# error unknown platform triplet
5267# endif
5268# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5269# if _MIPS_SIM == _ABIO32
5270 mipsisa32r6-linux-gnu
5271# elif _MIPS_SIM == _ABIN32
5272 mipsisa64r6-linux-gnuabin32
5273# elif _MIPS_SIM == _ABI64
5274 mipsisa64r6-linux-gnuabi64
5275# else
5276# error unknown platform triplet
5277# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005278# elif defined(__mips_hard_float) && defined(_MIPSEL)
5279# if _MIPS_SIM == _ABIO32
5280 mipsel-linux-gnu
5281# elif _MIPS_SIM == _ABIN32
5282 mips64el-linux-gnuabin32
5283# elif _MIPS_SIM == _ABI64
5284 mips64el-linux-gnuabi64
5285# else
5286# error unknown platform triplet
5287# endif
5288# elif defined(__mips_hard_float)
5289# if _MIPS_SIM == _ABIO32
5290 mips-linux-gnu
5291# elif _MIPS_SIM == _ABIN32
5292 mips64-linux-gnuabin32
5293# elif _MIPS_SIM == _ABI64
5294 mips64-linux-gnuabi64
5295# else
5296# error unknown platform triplet
5297# endif
5298# elif defined(__or1k__)
5299 or1k-linux-gnu
5300# elif defined(__powerpc__) && defined(__SPE__)
5301 powerpc-linux-gnuspe
5302# elif defined(__powerpc64__)
5303# if defined(__LITTLE_ENDIAN__)
5304 powerpc64le-linux-gnu
5305# else
5306 powerpc64-linux-gnu
5307# endif
5308# elif defined(__powerpc__)
5309 powerpc-linux-gnu
5310# elif defined(__s390x__)
5311 s390x-linux-gnu
5312# elif defined(__s390__)
5313 s390-linux-gnu
5314# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5315 sh4-linux-gnu
5316# elif defined(__sparc__) && defined(__arch64__)
5317 sparc64-linux-gnu
5318# elif defined(__sparc__)
5319 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005320# elif defined(__riscv)
5321# if __riscv_xlen == 32
5322 riscv32-linux-gnu
5323# elif __riscv_xlen == 64
5324 riscv64-linux-gnu
5325# else
5326# error unknown platform triplet
5327# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328# else
5329# error unknown platform triplet
5330# endif
5331#elif defined(__FreeBSD_kernel__)
5332# if defined(__LP64__)
5333 x86_64-kfreebsd-gnu
5334# elif defined(__i386__)
5335 i386-kfreebsd-gnu
5336# else
5337# error unknown platform triplet
5338# endif
5339#elif defined(__gnu_hurd__)
5340 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005341#elif defined(__APPLE__)
5342 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005343#elif defined(__VXWORKS__)
5344 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345#else
5346# error unknown platform triplet
5347#endif
5348
5349EOF
5350
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005351if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5354$as_echo "$PLATFORM_TRIPLET" >&6; }
5355else
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5357$as_echo "none" >&6; }
5358fi
5359rm -f conftest.c conftest.out
5360
5361if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5362 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5363 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5364 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005365elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5366 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005367fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005368
doko@ubuntu.com55532312016-06-14 08:55:19 +02005369if test x$MULTIARCH != x; then
5370 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5371fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372
5373
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5375$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5376save_LDFLAGS="$LDFLAGS"
5377LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005378
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5380/* end confdefs.h. */
5381
5382int
5383main ()
5384{
5385
5386 ;
5387 return 0;
5388}
5389_ACEOF
5390if ac_fn_c_try_link "$LINENO"; then :
5391 NO_AS_NEEDED="-Wl,--no-as-needed"
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5393$as_echo "yes" >&6; }
5394else
5395 NO_AS_NEEDED=""
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399rm -f core conftest.err conftest.$ac_objext \
5400 conftest$ac_exeext conftest.$ac_ext
5401LDFLAGS="$save_LDFLAGS"
5402
5403
5404
5405# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5408$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005409if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411else
5412 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5413 then ac_cv_path_EGREP="$GREP -E"
5414 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 # Loop through the user's path and test for each of PROGNAME-LIST
5418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5420do
5421 IFS=$as_save_IFS
5422 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 for ac_prog in egrep; do
5424 for ac_exec_ext in '' $ac_executable_extensions; do
5425 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005426 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005427# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 # Check for GNU $ac_path_EGREP
5429case `"$ac_path_EGREP" --version 2>&1` in
5430*GNU*)
5431 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5432*)
5433 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 while :
5436 do
5437 cat "conftest.in" "conftest.in" >"conftest.tmp"
5438 mv "conftest.tmp" "conftest.in"
5439 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5442 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5445 # Best one so far, save it but keep looking for a better one
5446 ac_cv_path_EGREP="$ac_path_EGREP"
5447 ac_path_EGREP_max=$ac_count
5448 fi
5449 # 10*(2^10) chars as input seems more than enough
5450 test $ac_count -gt 10 && break
5451 done
5452 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5453esac
5454
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 $ac_path_EGREP_found && break 3
5456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005461 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 +00005462 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005463else
5464 ac_cv_path_EGREP=$EGREP
5465fi
5466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 fi
5468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5470$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005471 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005472
5473
Matthias Kloseb9621712010-04-24 17:59:49 +00005474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5475$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005476if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 $as_echo_n "(cached) " >&6
5478else
5479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005480/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005481#include <stdlib.h>
5482#include <stdarg.h>
5483#include <string.h>
5484#include <float.h>
5485
5486int
5487main ()
5488{
5489
5490 ;
5491 return 0;
5492}
5493_ACEOF
5494if ac_fn_c_try_compile "$LINENO"; then :
5495 ac_cv_header_stdc=yes
5496else
5497 ac_cv_header_stdc=no
5498fi
5499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5500
5501if test $ac_cv_header_stdc = yes; then
5502 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504/* end confdefs.h. */
5505#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005506
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005507_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005509 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005511else
Matthias Kloseb9621712010-04-24 17:59:49 +00005512 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005514rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515
Matthias Kloseb9621712010-04-24 17:59:49 +00005516fi
5517
5518if test $ac_cv_header_stdc = yes; then
5519 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522#include <stdlib.h>
5523
5524_ACEOF
5525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5526 $EGREP "free" >/dev/null 2>&1; then :
5527
5528else
5529 ac_cv_header_stdc=no
5530fi
5531rm -f conftest*
5532
5533fi
5534
5535if test $ac_cv_header_stdc = yes; then
5536 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5537 if test "$cross_compiling" = yes; then :
5538 :
5539else
5540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5541/* end confdefs.h. */
5542#include <ctype.h>
5543#include <stdlib.h>
5544#if ((' ' & 0x0FF) == 0x020)
5545# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5546# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5547#else
5548# define ISLOWER(c) \
5549 (('a' <= (c) && (c) <= 'i') \
5550 || ('j' <= (c) && (c) <= 'r') \
5551 || ('s' <= (c) && (c) <= 'z'))
5552# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5553#endif
5554
5555#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5556int
5557main ()
5558{
5559 int i;
5560 for (i = 0; i < 256; i++)
5561 if (XOR (islower (i), ISLOWER (i))
5562 || toupper (i) != TOUPPER (i))
5563 return 2;
5564 return 0;
5565}
5566_ACEOF
5567if ac_fn_c_try_run "$LINENO"; then :
5568
5569else
5570 ac_cv_header_stdc=no
5571fi
5572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5573 conftest.$ac_objext conftest.beam conftest.$ac_ext
5574fi
5575
5576fi
5577fi
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5579$as_echo "$ac_cv_header_stdc" >&6; }
5580if test $ac_cv_header_stdc = yes; then
5581
5582$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5583
5584fi
5585
5586# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5587for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5588 inttypes.h stdint.h unistd.h
5589do :
5590 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5591ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5592"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005593if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 cat >>confdefs.h <<_ACEOF
5595#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5596_ACEOF
5597
5598fi
5599
5600done
5601
5602
5603
5604 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 +02005605if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 MINIX=yes
5607else
5608 MINIX=
5609fi
5610
5611
5612 if test "$MINIX" = yes; then
5613
5614$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5615
5616
5617$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5618
5619
5620$as_echo "#define _MINIX 1" >>confdefs.h
5621
5622 fi
5623
5624
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5626$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005627if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 $as_echo_n "(cached) " >&6
5629else
5630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5631/* end confdefs.h. */
5632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005633# define __EXTENSIONS__ 1
5634 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005635int
5636main ()
5637{
5638
5639 ;
5640 return 0;
5641}
5642_ACEOF
5643if ac_fn_c_try_compile "$LINENO"; then :
5644 ac_cv_safe_to_define___extensions__=yes
5645else
5646 ac_cv_safe_to_define___extensions__=no
5647fi
5648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5649fi
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5651$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5652 test $ac_cv_safe_to_define___extensions__ = yes &&
5653 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5654
5655 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5656
5657 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5658
5659 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5660
5661 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5662
5663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664
Xavier de Gaye95750b12016-07-09 11:05:42 +02005665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5666$as_echo_n "checking for the Android API level... " >&6; }
5667cat >> conftest.c <<EOF
5668#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005669android_api = __ANDROID_API__
5670arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005671#else
5672#error not Android
5673#endif
5674EOF
5675
5676if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005677 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5678 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5680$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005681 if test -z "$ANDROID_API_LEVEL"; then
5682 echo 'Fatal: you must define __ANDROID_API__'
5683 exit 1
5684 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005685
5686cat >>confdefs.h <<_ACEOF
5687#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5688_ACEOF
5689
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005690
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5692$as_echo_n "checking for the Android arm ABI... " >&6; }
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5694$as_echo "$_arm_arch" >&6; }
5695 if test "$_arm_arch" = 7; then
5696 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5697 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5698 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005699else
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5701$as_echo "not Android" >&6; }
5702fi
5703rm -f conftest.c conftest.out
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705# Check for unsupported systems
5706case $ac_sys_system/$ac_sys_release in
5707atheos*|Linux*/1*)
5708 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5709 echo See README for details.
5710 exit 1;;
5711esac
5712
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5715$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005718if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719 withval=$with_suffix;
5720 case $withval in
5721 no) EXEEXT=;;
5722 yes) EXEEXT=.exe;;
5723 *) EXEEXT=$withval;;
5724 esac
5725fi
5726
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5728$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
5730# Test whether we're running on a non-case-sensitive system, in which
5731# case we give a warning if no ext is given
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5734$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test ! -d CaseSensitiveTestDir; then
5736mkdir CaseSensitiveTestDir
5737fi
5738
5739if test -d casesensitivetestdir
5740then
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5742$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 BUILDEXEEXT=.exe
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 BUILDEXEEXT=$EXEEXT
5748fi
5749rmdir CaseSensitiveTestDir
5750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751case $ac_sys_system in
5752hp*|HP*)
5753 case $CC in
5754 cc|*/cc) CC="$CC -Ae";;
5755 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756esac
5757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5760$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761if test -z "$LIBRARY"
5762then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005763 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5766$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768# LDLIBRARY is the name of the library to link against (as opposed to the
5769# name of the library into which to insert object files). BLDLIBRARY is also
5770# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5771# is blank as the main program is not linked directly against LDLIBRARY.
5772# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5773# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5774# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5775# DLLLIBRARY is the shared (i.e., DLL) library.
5776#
5777# RUNSHARED is used to run shared python without installed libraries
5778#
5779# INSTSONAME is the name of the shared library that will be use to install
5780# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005781#
5782# LDVERSION is the shared library version number, normally the Python version
5783# with the ABI build flags appended.
5784
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
5786
5787
5788
5789
5790
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792LDLIBRARY="$LIBRARY"
5793BLDLIBRARY='$(LDLIBRARY)'
5794INSTSONAME='$(LDLIBRARY)'
5795DLLLIBRARY=''
5796LDLIBRARYDIR=''
5797RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005798LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
5800# LINKCC is the command that links the python executable -- default is $(CC).
5801# If CXX is set, and if it is needed to link a main function that was
5802# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5803# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5806$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807if test -z "$LINKCC"
5808then
5809 LINKCC='$(PURIFY) $(MAINCC)'
5810 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 QNX*)
5812 # qcc must be used because the other compilers do not
5813 # support -N.
5814 LINKCC=qcc;;
5815 esac
5816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5818$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
Stefan Krahe6dcd372020-08-29 17:00:08 +02005820# EXPORTSYMS holds the list of exported symbols for AIX.
5821# EXPORTSFROM holds the module name exporting symbols on AIX.
5822EXPORTSYMS=
5823EXPORTSFROM=
5824
5825
5826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5827$as_echo_n "checking EXPORTSYMS... " >&6; }
5828case $ac_sys_system in
5829AIX*)
5830 EXPORTSYMS="Modules/python.exp"
5831 if test $ac_sys_release -ge 5 -o \
5832 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5833 EXPORTSFROM=. # the main executable
5834 fi
5835 ;;
5836esac
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5838$as_echo "$EXPORTSYMS" >&6; }
5839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5841# make sure we default having it set to "no": this is used by
5842# distutils.unixccompiler to know if it should add --enable-new-dtags
5843# to linker command lines, and failing to detect GNU ld simply results
5844# in the same bahaviour as before.
5845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5847$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848ac_prog=ld
5849if test "$GCC" = yes; then
5850 ac_prog=`$CC -print-prog-name=ld`
5851fi
5852case `"$ac_prog" -V 2>&1 < /dev/null` in
5853 *GNU*)
5854 GNULD=yes;;
5855 *)
5856 GNULD=no;;
5857esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5859$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
Matthias Kloseb9621712010-04-24 17:59:49 +00005861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5862$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 enableval=$enable_shared;
5866fi
5867
5868
5869if test -z "$enable_shared"
5870then
5871 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005872 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 enable_shared="yes";;
5874 *)
5875 enable_shared="no";;
5876 esac
5877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5879$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5882$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005884if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885 enableval=$enable_profiling;
5886fi
5887
5888if test "x$enable_profiling" = xyes; then
5889 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005890 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892/* end confdefs.h. */
5893int main() { return 0; }
5894_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005895if ac_fn_c_try_link "$LINENO"; then :
5896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005898 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005900rm -f core conftest.err conftest.$ac_objext \
5901 conftest$ac_exeext conftest.$ac_ext
5902 CC="$ac_save_cc"
5903else
5904 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5907$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
doko@ubuntu.comba015832012-06-30 16:52:05 +02005909if test "x$enable_profiling" = xyes; then
5910 BASECFLAGS="-pg $BASECFLAGS"
5911 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912fi
5913
Matthias Kloseb9621712010-04-24 17:59:49 +00005914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5915$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
5917# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5918# library that we build, but we do not want to link against it (we
5919# will find it with a -framework option). For this reason there is an
5920# extra variable BLDLIBRARY against which Python and the extension
5921# modules are linked, BLDLIBRARY. This is normally the same as
5922# LDLIBRARY, but empty for MacOSX framework builds.
5923if test "$enable_framework"
5924then
5925 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 BLDLIBRARY=''
5928else
5929 BLDLIBRARY='$(LDLIBRARY)'
5930fi
5931
5932# Other platforms follow
5933if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005934 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
Matthias Kloseb9621712010-04-24 17:59:49 +00005936$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
5938 case $ac_sys_system in
5939 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).dll.a'
5941 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
5943 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).so'
5945 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005948 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005949 then
5950 PY3LIBRARY=libpython3.so
5951 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005953 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005954 LDLIBRARY='libpython$(LDVERSION).so'
5955 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005956 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005958 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005959 then
5960 PY3LIBRARY=libpython3.so
5961 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 hp*|HP*)
5964 case `uname -m` in
5965 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005966 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 ;;
5968 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005969 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 ;;
5971 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005973 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005976 LDLIBRARY='libpython$(LDVERSION).dylib'
5977 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005978 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005980 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005981 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005982 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005983 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984
5985 esac
5986else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005987 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 case $ac_sys_system in
5989 CYGWIN*)
5990 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005991 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 ;;
5993 esac
5994fi
5995
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005996if test "$cross_compiling" = yes; then
5997 RUNSHARED=
5998fi
5999
Matthias Kloseb9621712010-04-24 17:59:49 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6001$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004if test -n "$ac_tool_prefix"; then
6005 for ac_prog in ar aal
6006 do
6007 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006011if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013else
6014 if test -n "$AR"; then
6015 ac_cv_prog_AR="$AR" # Let the user override the test.
6016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006024 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 break 2
6027 fi
6028done
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030IFS=$as_save_IFS
6031
6032fi
6033fi
6034AR=$ac_cv_prog_AR
6035if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6037$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038else
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
6042
6043
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006044 test -n "$AR" && break
6045 done
6046fi
6047if test -z "$AR"; then
6048 ac_ct_AR=$AR
6049 for ac_prog in ar aal
6050do
6051 # Extract the first word of "$ac_prog", so it can be a program name with args.
6052set dummy $ac_prog; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_prog_ac_ct_AR+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057else
6058 if test -n "$ac_ct_AR"; then
6059 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6060else
6061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006068 ac_cv_prog_ac_ct_AR="$ac_prog"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006073 done
6074IFS=$as_save_IFS
6075
6076fi
6077fi
6078ac_ct_AR=$ac_cv_prog_ac_ct_AR
6079if test -n "$ac_ct_AR"; then
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6081$as_echo "$ac_ct_AR" >&6; }
6082else
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088 test -n "$ac_ct_AR" && break
6089done
6090
6091 if test "x$ac_ct_AR" = x; then
6092 AR="ar"
6093 else
6094 case $cross_compiling:$ac_tool_warned in
6095yes:)
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6098ac_tool_warned=yes ;;
6099esac
6100 AR=$ac_ct_AR
6101 fi
6102fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103
6104
6105# tweak ARFLAGS only if the user didn't set it on the command line
6106
6107if test -z "$ARFLAGS"
6108then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006109 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110fi
6111
doko@ubuntu.com58844492012-06-30 18:25:32 +02006112if test -n "$ac_tool_prefix"; then
6113 for ac_prog in readelf
6114 do
6115 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6116set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_prog_READELF+:} false; then :
6120 $as_echo_n "(cached) " >&6
6121else
6122 if test -n "$READELF"; then
6123 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6124else
6125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6126for as_dir in $PATH
6127do
6128 IFS=$as_save_IFS
6129 test -z "$as_dir" && as_dir=.
6130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006132 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6134 break 2
6135 fi
6136done
6137 done
6138IFS=$as_save_IFS
6139
6140fi
6141fi
6142READELF=$ac_cv_prog_READELF
6143if test -n "$READELF"; then
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6145$as_echo "$READELF" >&6; }
6146else
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }
6149fi
6150
6151
6152 test -n "$READELF" && break
6153 done
6154fi
6155if test -z "$READELF"; then
6156 ac_ct_READELF=$READELF
6157 for ac_prog in readelf
6158do
6159 # Extract the first word of "$ac_prog", so it can be a program name with args.
6160set dummy $ac_prog; ac_word=$2
6161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162$as_echo_n "checking for $ac_word... " >&6; }
6163if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6164 $as_echo_n "(cached) " >&6
6165else
6166 if test -n "$ac_ct_READELF"; then
6167 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6168else
6169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170for as_dir in $PATH
6171do
6172 IFS=$as_save_IFS
6173 test -z "$as_dir" && as_dir=.
6174 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006176 ac_cv_prog_ac_ct_READELF="$ac_prog"
6177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178 break 2
6179 fi
6180done
6181 done
6182IFS=$as_save_IFS
6183
6184fi
6185fi
6186ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6187if test -n "$ac_ct_READELF"; then
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6189$as_echo "$ac_ct_READELF" >&6; }
6190else
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6192$as_echo "no" >&6; }
6193fi
6194
6195
6196 test -n "$ac_ct_READELF" && break
6197done
6198
6199 if test "x$ac_ct_READELF" = x; then
6200 READELF=":"
6201 else
6202 case $cross_compiling:$ac_tool_warned in
6203yes:)
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6205$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6206ac_tool_warned=yes ;;
6207esac
6208 READELF=$ac_ct_READELF
6209 fi
6210fi
6211
6212if test "$cross_compiling" = yes; then
6213 case "$READELF" in
6214 readelf|:)
6215 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6216 ;;
6217 esac
6218fi
6219
6220
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006223hp*|HP*)
6224 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 if test -z "$INSTALL"
6226 then
6227 INSTALL="${srcdir}/install-sh -c"
6228 fi
6229esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230# Find a good install program. We prefer a C program (faster),
6231# so one script is as good as another. But avoid the broken or
6232# incompatible versions:
6233# SysV /etc/install, /usr/sbin/install
6234# SunOS /usr/etc/install
6235# IRIX /sbin/install
6236# AIX /bin/install
6237# AmigaOS /C/install, which installs bootblocks on floppy discs
6238# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6239# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6240# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6241# OS/2's system install, which has a completely different semantic
6242# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006243# Reject install programs that cannot install multiple files.
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6245$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006247if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006248 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249else
6250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6251for as_dir in $PATH
6252do
6253 IFS=$as_save_IFS
6254 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006255 # Account for people who put trailing slashes in PATH elements.
6256case $as_dir/ in #((
6257 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260 /usr/ucb/* ) ;;
6261 *)
6262 # OSF1 and SCO ODT 3.0 have their own names for install.
6263 # Don't use installbsd from OSF since it installs stuff as root
6264 # by default.
6265 for ac_prog in ginstall scoinst install; do
6266 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006267 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268 if test $ac_prog = install &&
6269 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6270 # AIX install. It has an incompatible calling convention.
6271 :
6272 elif test $ac_prog = install &&
6273 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6274 # program-specific install script used by HP pwplus--don't use.
6275 :
6276 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 rm -rf conftest.one conftest.two conftest.dir
6278 echo one > conftest.one
6279 echo two > conftest.two
6280 mkdir conftest.dir
6281 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6282 test -s conftest.one && test -s conftest.two &&
6283 test -s conftest.dir/conftest.one &&
6284 test -s conftest.dir/conftest.two
6285 then
6286 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6287 break 3
6288 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289 fi
6290 fi
6291 done
6292 done
6293 ;;
6294esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006295
6296 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297IFS=$as_save_IFS
6298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
6301fi
6302 if test "${ac_cv_path_install+set}" = set; then
6303 INSTALL=$ac_cv_path_install
6304 else
6305 # As a last resort, use the slow shell script. Don't cache a
6306 # value for INSTALL within a source directory, because that will
6307 # break other packages using the cache if that directory is
6308 # removed, or if the value is a relative name.
6309 INSTALL=$ac_install_sh
6310 fi
6311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6313$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6316# It thinks the first close brace ends the variable substitution.
6317test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6318
6319test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6320
6321test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6322
Matthias Klose93a0ef12012-03-15 18:08:34 +01006323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6324$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6325if test -z "$MKDIR_P"; then
6326 if ${ac_cv_path_mkdir+:} false; then :
6327 $as_echo_n "(cached) " >&6
6328else
6329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6331do
6332 IFS=$as_save_IFS
6333 test -z "$as_dir" && as_dir=.
6334 for ac_prog in mkdir gmkdir; do
6335 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006336 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006337 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6338 'mkdir (GNU coreutils) '* | \
6339 'mkdir (coreutils) '* | \
6340 'mkdir (fileutils) '4.1*)
6341 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6342 break 3;;
6343 esac
6344 done
6345 done
6346 done
6347IFS=$as_save_IFS
6348
6349fi
6350
6351 test -d ./--version && rmdir ./--version
6352 if test "${ac_cv_path_mkdir+set}" = set; then
6353 MKDIR_P="$ac_cv_path_mkdir -p"
6354 else
6355 # As a last resort, use the slow shell script. Don't cache a
6356 # value for MKDIR_P within a source directory, because that will
6357 # break other packages using the cache if that directory is
6358 # removed, or if the value is a relative name.
6359 MKDIR_P="$ac_install_sh -d"
6360 fi
6361fi
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6363$as_echo "$MKDIR_P" >&6; }
6364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365
6366# Not every filesystem supports hard links
6367
6368if test -z "$LN" ; then
6369 case $ac_sys_system in
6370 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 *) LN=ln;;
6372 esac
6373fi
6374
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006375# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006376
6377ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6381$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382
6383# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006384if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385 withval=$with_pydebug;
6386if test "$withval" != no
6387then
6388
Matthias Kloseb9621712010-04-24 17:59:49 +00006389$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006390
Matthias Kloseb9621712010-04-24 17:59:49 +00006391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006394 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006395else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006397fi
6398else
Matthias Kloseb9621712010-04-24 17:59:49 +00006399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401fi
6402
6403
Victor Stinnerf4e47032019-04-25 00:56:28 +02006404# Check for --with-trace-refs
6405# --with-trace-refs
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6407$as_echo_n "checking for --with-trace-refs... " >&6; }
6408
6409# Check whether --with-trace-refs was given.
6410if test "${with_trace_refs+set}" = set; then :
6411 withval=$with_trace_refs;
6412else
6413 with_trace_refs=no
6414fi
6415
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6417$as_echo "$with_trace_refs" >&6; }
6418
6419if test "$with_trace_refs" = "yes"
6420then
6421
6422$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6423
6424fi
6425
6426# Check for --with-assertions.
6427# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006428assertions='false'
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6430$as_echo_n "checking for --with-assertions... " >&6; }
6431
6432# Check whether --with-assertions was given.
6433if test "${with_assertions+set}" = set; then :
6434 withval=$with_assertions;
6435if test "$withval" != no
6436then
6437 assertions='true'
6438fi
6439fi
6440
6441if test "$assertions" = 'true'; then
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6443$as_echo "yes" >&6; }
6444elif test "$Py_DEBUG" = 'true'; then
6445 assertions='true'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6447$as_echo "implied by --with-pydebug" >&6; }
6448else
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
Brett Cannon63d98bc2016-09-06 17:12:40 -07006453# Enable optimization flags
6454
6455
6456Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6458$as_echo_n "checking for --enable-optimizations... " >&6; }
6459# Check whether --enable-optimizations was given.
6460if test "${enable_optimizations+set}" = set; then :
6461 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006462if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006463then
6464 Py_OPT='true'
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6466$as_echo "yes" >&6; };
6467else
6468 Py_OPT='false'
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; };
6471fi
6472else
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; }
6475fi
6476
6477if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006478 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6479 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006480 # 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 +00006481 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006482 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006484 DEF_MAKE_RULE="build_all"
6485else
6486 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006487 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006488 DEF_MAKE_RULE="all"
6489fi
6490
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006491
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6493$as_echo_n "checking PROFILE_TASK... " >&6; }
6494if test -z "$PROFILE_TASK"
6495then
6496 PROFILE_TASK='-m test --pgo'
6497fi
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6499$as_echo "$PROFILE_TASK" >&6; }
6500
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006501# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6502# normal names in the default $PATH (ie: Ubuntu). They exist under the
6503# non-suffixed name in their versioned llvm directory.
6504
6505llvm_bin_dir=''
6506llvm_path="${PATH}"
6507if test "${CC}" = "clang"
6508then
6509 clang_bin=`which clang`
6510 # Some systems install clang elsewhere as a symlink to the real path
6511 # which is where the related llvm tools are located.
6512 if test -L "${clang_bin}"
6513 then
6514 clang_dir=`dirname "${clang_bin}"`
6515 clang_bin=`readlink "${clang_bin}"`
6516 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6517 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6518 fi
6519fi
6520
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006521# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6523$as_echo_n "checking for --with-lto... " >&6; }
6524
6525# Check whether --with-lto was given.
6526if test "${with_lto+set}" = set; then :
6527 withval=$with_lto;
6528if test "$withval" != no
6529then
6530 Py_LTO='true'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6532$as_echo "yes" >&6; };
6533else
6534 Py_LTO='false'
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; };
6537fi
6538else
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543if test "$Py_LTO" = 'true' ; then
6544 case $CC in
6545 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006546
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006547 if test -n "$ac_tool_prefix"; then
6548 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6549set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551$as_echo_n "checking for $ac_word... " >&6; }
6552if ${ac_cv_path_LLVM_AR+:} false; then :
6553 $as_echo_n "(cached) " >&6
6554else
6555 case $LLVM_AR in
6556 [\\/]* | ?:[\\/]*)
6557 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6558 ;;
6559 *)
6560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in ${llvm_path}
6562do
6563 IFS=$as_save_IFS
6564 test -z "$as_dir" && as_dir=.
6565 for ac_exec_ext in '' $ac_executable_extensions; do
6566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569 break 2
6570 fi
6571done
6572 done
6573IFS=$as_save_IFS
6574
6575 ;;
6576esac
6577fi
6578LLVM_AR=$ac_cv_path_LLVM_AR
6579if test -n "$LLVM_AR"; then
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6581$as_echo "$LLVM_AR" >&6; }
6582else
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006588fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006590 ac_pt_LLVM_AR=$LLVM_AR
6591 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006592set dummy llvm-ar; ac_word=$2
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6594$as_echo_n "checking for $ac_word... " >&6; }
6595if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6596 $as_echo_n "(cached) " >&6
6597else
6598 case $ac_pt_LLVM_AR in
6599 [\\/]* | ?:[\\/]*)
6600 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6601 ;;
6602 *)
6603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604for as_dir in ${llvm_path}
6605do
6606 IFS=$as_save_IFS
6607 test -z "$as_dir" && as_dir=.
6608 for ac_exec_ext in '' $ac_executable_extensions; do
6609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6610 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6612 break 2
6613 fi
6614done
6615 done
6616IFS=$as_save_IFS
6617
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006618 ;;
6619esac
6620fi
6621ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6622if test -n "$ac_pt_LLVM_AR"; then
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6624$as_echo "$ac_pt_LLVM_AR" >&6; }
6625else
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627$as_echo "no" >&6; }
6628fi
6629
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006630 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006631 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006632 else
6633 case $cross_compiling:$ac_tool_warned in
6634yes:)
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6637ac_tool_warned=yes ;;
6638esac
6639 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006640 fi
6641else
6642 LLVM_AR="$ac_cv_path_LLVM_AR"
6643fi
6644
6645
6646 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6647 then
6648 LLVM_AR_FOUND="found"
6649 else
6650 LLVM_AR_FOUND="not-found"
6651 fi
6652 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6653 then
6654 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6655 if test -n "${found_llvm_ar}"
6656 then
6657 LLVM_AR='/usr/bin/xcrun llvm-ar'
6658 LLVM_AR_FOUND=found
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6660$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6661 fi
6662 fi
6663 if test $LLVM_AR_FOUND = not-found
6664 then
6665 LLVM_PROFR_ERR=yes
6666 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6667 else
6668 LLVM_AR_ERR=no
6669 fi
6670 AR="${LLVM_AR}"
6671 case $ac_sys_system in
6672 Darwin*)
6673 # Any changes made here should be reflected in the GCC+Darwin case below
6674 LTOFLAGS="-flto -Wl,-export_dynamic"
6675 ;;
6676 *)
6677 LTOFLAGS="-flto"
6678 ;;
6679 esac
6680 ;;
6681 *gcc*)
6682 case $ac_sys_system in
6683 Darwin*)
6684 LTOFLAGS="-flto -Wl,-export_dynamic"
6685 ;;
6686 *)
6687 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6688 ;;
6689 esac
6690 ;;
6691 esac
6692
6693 if test "$ac_cv_prog_cc_g" = "yes"
6694 then
6695 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6696 # to get debug symbols.
6697 LTOFLAGS="$LTOFLAGS -g"
6698 fi
6699
stratakisf92c7aa2018-12-04 15:54:01 +01006700 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006701 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006702fi
6703
6704# Enable PGO flags.
6705
6706
6707
6708
6709
6710
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006711if test -n "$ac_tool_prefix"; then
6712 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6713set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6717 $as_echo_n "(cached) " >&6
6718else
6719 case $LLVM_PROFDATA in
6720 [\\/]* | ?:[\\/]*)
6721 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6722 ;;
6723 *)
6724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006726do
6727 IFS=$as_save_IFS
6728 test -z "$as_dir" && as_dir=.
6729 for ac_exec_ext in '' $ac_executable_extensions; do
6730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006731 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733 break 2
6734 fi
6735done
6736 done
6737IFS=$as_save_IFS
6738
Gregory P. Smith799520c2016-09-07 16:10:00 -07006739 ;;
6740esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006741fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006742LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6743if test -n "$LLVM_PROFDATA"; then
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6745$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006746else
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
6749fi
6750
6751
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006752fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006754 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6755 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006756set dummy llvm-profdata; ac_word=$2
6757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6758$as_echo_n "checking for $ac_word... " >&6; }
6759if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6760 $as_echo_n "(cached) " >&6
6761else
6762 case $ac_pt_LLVM_PROFDATA in
6763 [\\/]* | ?:[\\/]*)
6764 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6765 ;;
6766 *)
6767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6768for as_dir in ${llvm_path}
6769do
6770 IFS=$as_save_IFS
6771 test -z "$as_dir" && as_dir=.
6772 for ac_exec_ext in '' $ac_executable_extensions; do
6773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6774 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6776 break 2
6777 fi
6778done
6779 done
6780IFS=$as_save_IFS
6781
Gregory P. Smith799520c2016-09-07 16:10:00 -07006782 ;;
6783esac
6784fi
6785ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6786if test -n "$ac_pt_LLVM_PROFDATA"; then
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6788$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6789else
6790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6791$as_echo "no" >&6; }
6792fi
6793
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006794 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006795 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006796 else
6797 case $cross_compiling:$ac_tool_warned in
6798yes:)
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6801ac_tool_warned=yes ;;
6802esac
6803 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 fi
6805else
6806 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6807fi
6808
6809
6810if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6811then
6812 LLVM_PROF_FOUND="found"
6813else
6814 LLVM_PROF_FOUND="not-found"
6815fi
6816if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6817then
6818 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6819 if test -n "${found_llvm_profdata}"
6820 then
6821 # llvm-profdata isn't directly in $PATH in some cases.
6822 # https://apple.stackexchange.com/questions/197053/
6823 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6824 LLVM_PROF_FOUND=found
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6826$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6827 fi
6828fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006829LLVM_PROF_ERR=no
6830case $CC in
6831 *clang*)
6832 # Any changes made here should be reflected in the GCC+Darwin case below
6833 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6834 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006835 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006836 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6837 if test $LLVM_PROF_FOUND = not-found
6838 then
6839 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006840 if test "${REQUIRE_PGO}" = "yes"
6841 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006842 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 -07006843 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006844 fi
6845 ;;
6846 *gcc*)
6847 case $ac_sys_system in
6848 Darwin*)
6849 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6850 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006851 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006852 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006853 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006854 then
6855 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006856 if test "${REQUIRE_PGO}" = "yes"
6857 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006858 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 -07006859 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006860 fi
6861 ;;
6862 *)
6863 PGO_PROF_GEN_FLAG="-fprofile-generate"
6864 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6865 LLVM_PROF_MERGER="true"
6866 LLVM_PROF_FILE=""
6867 ;;
6868 esac
6869 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006870 *icc*)
6871 PGO_PROF_GEN_FLAG="-prof-gen"
6872 PGO_PROF_USE_FLAG="-prof-use"
6873 LLVM_PROF_MERGER="true"
6874 LLVM_PROF_FILE=""
6875 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006876esac
6877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6879# merged with this chunk of code?
6880
6881# Optimizer/debugger flags
6882# ------------------------
6883# (The following bit of code is complicated enough - please keep things
6884# indented properly. Just pretend you're editing Python code. ;-)
6885
6886# There are two parallel sets of case statements below, one that checks to
6887# see if OPT was set and one that does BASECFLAGS setting based upon
6888# compiler and platform. BASECFLAGS tweaks need to be made even if the
6889# user set OPT.
6890
Victor Stinner23a683a2019-04-12 21:27:37 +02006891case $CC in
6892 *clang*)
6893 cc_is_clang=1
6894 ;;
6895 *)
6896 if $CC --version 2>&1 | grep -q clang
6897 then
6898 cc_is_clang=1
6899 else
6900 cc_is_clang=
6901 fi
6902esac
6903
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904# tweak OPT based on compiler and platform, only if the user didn't set
6905# it on the command line
6906
Victor Stinner9ed34a82017-05-02 22:35:58 +02006907
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006908if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909then
6910 case $GCC in
6911 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6913 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6914 WRAP="-fwrapv"
6915 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006916
Victor Stinner35f3d242017-04-21 12:35:24 +02006917 if test -n "${cc_is_clang}"
6918 then
6919 # Clang also needs -fwrapv
6920 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006921 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6922 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006923 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006924 fi
6925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926 case $ac_cv_prog_cc_g in
6927 yes)
6928 if test "$Py_DEBUG" = 'true' ; then
6929 # Optimization messes up debuggers, so turn it off for
6930 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006931 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006932 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006933 else
Victor Stinner28205b22017-04-21 11:24:34 +02006934 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006935 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 else
Victor Stinner28205b22017-04-21 11:24:34 +02006937 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938 fi
6939 ;;
6940 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006941 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942 ;;
6943 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945 case $ac_sys_system in
6946 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6947 ;;
6948 esac
6949 ;;
6950
6951 *)
6952 OPT="-O"
6953 ;;
6954 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006955fi
6956
6957
6958
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006959
stratakiscf10a752018-12-19 18:19:01 +01006960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961# The -arch flags for universal builds on OSX
6962UNIVERSAL_ARCH_FLAGS=
6963
6964
6965# tweak BASECFLAGS based on compiler and platform
6966case $GCC in
6967yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006968 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006969
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6971$as_echo_n "checking for -Wextra... " >&6; }
6972 ac_save_cc="$CC"
6973 CC="$CC -Wextra -Werror"
6974 if ${ac_cv_extra_warnings+:} false; then :
6975 $as_echo_n "(cached) " >&6
6976else
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6978/* end confdefs.h. */
6979
6980
6981int
6982main ()
6983{
6984
6985 ;
6986 return 0;
6987}
6988
6989_ACEOF
6990if ac_fn_c_try_compile "$LINENO"; then :
6991
6992 ac_cv_extra_warnings=yes
6993
6994else
6995
6996 ac_cv_extra_warnings=no
6997
6998fi
6999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7000fi
7001
7002 CC="$ac_save_cc"
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7004$as_echo "$ac_cv_extra_warnings" >&6; }
7005
7006 if test $ac_cv_extra_warnings = yes
7007 then
7008 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7009 fi
7010
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011 # Python doesn't violate C99 aliasing rules, but older versions of
7012 # GCC produce warnings for legal Python code. Enable
7013 # -fno-strict-aliasing on versions of GCC that support but produce
7014 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7016$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017 ac_save_cc="$CC"
7018 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007020 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007022else
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007025
Matthias Kloseb159a552010-04-25 21:00:44 +00007026
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007027int
7028main ()
7029{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007030
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007031 ;
7032 return 0;
7033}
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007036if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007037
7038 CC="$ac_save_cc -fstrict-aliasing"
7039 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041/* end confdefs.h. */
7042
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007043 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007044int
7045main ()
7046{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007047double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007048 ;
7049 return 0;
7050}
Matthias Kloseb159a552010-04-25 21:00:44 +00007051
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007053if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007054
7055 ac_cv_no_strict_aliasing=no
7056
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057else
Matthias Kloseb159a552010-04-25 21:00:44 +00007058
7059 ac_cv_no_strict_aliasing=yes
7060
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007061fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007063
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007064else
Matthias Kloseb159a552010-04-25 21:00:44 +00007065
7066 ac_cv_no_strict_aliasing=no
7067
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007070fi
7071
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007072 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7075$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007076 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077 then
7078 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7079 fi
7080
Zachary Ware5af85642015-12-21 12:09:17 -06007081 # ICC doesn't recognize the option, but only emits a warning
7082 ## XXX does it emit an unused result warning and can it be disabled?
7083 case "$CC" in
7084 *icc*)
7085 ac_cv_disable_unused_result_warning=no
7086 ;;
7087 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7089$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7090 ac_save_cc="$CC"
7091 CC="$CC -Wunused-result -Werror"
7092 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007093 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007094 $as_echo_n "(cached) " >&6
7095else
7096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7097/* end confdefs.h. */
7098
7099
7100int
7101main ()
7102{
7103
7104 ;
7105 return 0;
7106}
7107
7108_ACEOF
7109if ac_fn_c_try_compile "$LINENO"; then :
7110
7111 ac_cv_disable_unused_result_warning=yes
7112
7113else
7114
7115 ac_cv_disable_unused_result_warning=no
7116
7117fi
7118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7119fi
7120
7121 CFLAGS="$save_CFLAGS"
7122 CC="$ac_save_cc"
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7124$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007125 ;;
7126 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007127
7128 if test $ac_cv_disable_unused_result_warning = yes
7129 then
7130 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007131 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7132 fi
7133
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7135$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7136 ac_save_cc="$CC"
7137 CC="$CC -Wunused-parameter -Werror"
7138 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7139 $as_echo_n "(cached) " >&6
7140else
7141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7142/* end confdefs.h. */
7143
7144
7145int
7146main ()
7147{
7148
7149 ;
7150 return 0;
7151}
7152
7153_ACEOF
7154if ac_fn_c_try_compile "$LINENO"; then :
7155
7156 ac_cv_disable_unused_parameter_warning=yes
7157
7158else
7159
7160 ac_cv_disable_unused_parameter_warning=no
7161
7162fi
7163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164fi
7165
7166 CC="$ac_save_cc"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7168$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7169
7170 if test $ac_cv_disable_unused_parameter_warning = yes
7171 then
7172 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7173 fi
7174
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7176$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7177 ac_save_cc="$CC"
7178 CC="$CC -Wmissing-field-initializers -Werror"
7179 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7180 $as_echo_n "(cached) " >&6
7181else
7182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7183/* end confdefs.h. */
7184
7185
7186int
7187main ()
7188{
7189
7190 ;
7191 return 0;
7192}
7193
7194_ACEOF
7195if ac_fn_c_try_compile "$LINENO"; then :
7196
7197 ac_cv_disable_missing_field_initializers=yes
7198
7199else
7200
7201 ac_cv_disable_missing_field_initializers=no
7202
7203fi
7204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7205fi
7206
7207 CC="$ac_save_cc"
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7209$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7210
7211 if test $ac_cv_disable_missing_field_initializers = yes
7212 then
7213 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007214 fi
7215
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7217$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7218 ac_save_cc="$CC"
7219 CC="$CC -Wsign-compare"
7220 save_CFLAGS="$CFLAGS"
7221 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7222 $as_echo_n "(cached) " >&6
7223else
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225/* end confdefs.h. */
7226
7227
7228int
7229main ()
7230{
7231
7232 ;
7233 return 0;
7234}
7235
7236_ACEOF
7237if ac_fn_c_try_compile "$LINENO"; then :
7238
7239 ac_cv_enable_sign_compare_warning=yes
7240
7241else
7242
7243 ac_cv_enable_sign_compare_warning=no
7244
7245fi
7246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7247fi
7248
7249 CFLAGS="$save_CFLAGS"
7250 CC="$ac_save_cc"
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7252$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7253
7254 if test $ac_cv_enable_sign_compare_warning = yes
7255 then
7256 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7257 fi
7258
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7260$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7261 ac_save_cc="$CC"
7262 CC="$CC -Wunreachable-code"
7263 save_CFLAGS="$CFLAGS"
7264 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7265 $as_echo_n "(cached) " >&6
7266else
7267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7268/* end confdefs.h. */
7269
7270
7271int
7272main ()
7273{
7274
7275 ;
7276 return 0;
7277}
7278
7279_ACEOF
7280if ac_fn_c_try_compile "$LINENO"; then :
7281
7282 ac_cv_enable_unreachable_code_warning=yes
7283
7284else
7285
7286 ac_cv_enable_unreachable_code_warning=no
7287
7288fi
7289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7290fi
7291
7292 CFLAGS="$save_CFLAGS"
7293 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007294
7295 # Don't enable unreachable code warning in debug mode, since it usually
7296 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007297 # Issue #24324: Unfortunately, the unreachable code warning does not work
7298 # correctly on gcc and has been silently removed from the compiler.
7299 # It is supported on clang but on OS X systems gcc may be an alias
7300 # for clang. Try to determine if the compiler is not really gcc and,
7301 # if so, only then enable the warning.
7302 if test $ac_cv_enable_unreachable_code_warning = yes && \
7303 test "$Py_DEBUG" != "true" && \
7304 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007305 then
7306 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007307 else
7308 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007309 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7311$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007312
INADA Naokie3364842018-06-05 20:40:53 +09007313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7314$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7315 ac_save_cc="$CC"
7316 CC="$CC -Werror -Wstrict-prototypes"
7317 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7318 $as_echo_n "(cached) " >&6
7319else
7320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7321/* end confdefs.h. */
7322
7323
7324int
7325main ()
7326{
7327
7328 ;
7329 return 0;
7330}
7331
7332_ACEOF
7333if ac_fn_c_try_compile "$LINENO"; then :
7334
7335 ac_cv_enable_strict_prototypes_warning=yes
7336
7337else
7338
7339 ac_cv_enable_strict_prototypes_warning=no
7340
7341fi
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7343fi
7344
7345 CC="$ac_save_cc"
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7347$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7348
7349 if test $ac_cv_enable_strict_prototypes_warning = yes
7350 then
7351 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7352 fi
7353
Victor Stinner193ee0a2017-02-06 14:24:00 +01007354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7355$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7356 ac_save_cc="$CC"
7357 CC="$CC -Werror=implicit-function-declaration"
7358 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7359 $as_echo_n "(cached) " >&6
7360else
7361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7362/* end confdefs.h. */
7363
7364
7365int
7366main ()
7367{
7368
7369 ;
7370 return 0;
7371}
7372
7373_ACEOF
7374if ac_fn_c_try_compile "$LINENO"; then :
7375
7376 ac_cv_enable_implicit_function_declaration_error=yes
7377
7378else
7379
7380 ac_cv_enable_implicit_function_declaration_error=no
7381
7382fi
7383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7384fi
7385
7386 CC="$ac_save_cc"
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7388$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7389
7390 if test $ac_cv_enable_implicit_function_declaration_error = yes
7391 then
7392 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7393 fi
7394
Vinay Sajip0b60f642019-10-15 08:26:12 +01007395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7396$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7397 ac_save_cc="$CC"
7398 CC="$CC -fvisibility=hidden"
7399 if ${ac_cv_enable_visibility+:} false; then :
7400 $as_echo_n "(cached) " >&6
7401else
7402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7403/* end confdefs.h. */
7404
7405
7406int
7407main ()
7408{
7409
7410 ;
7411 return 0;
7412}
7413
7414_ACEOF
7415if ac_fn_c_try_compile "$LINENO"; then :
7416
7417 ac_cv_enable_visibility=yes
7418
7419else
7420
7421 ac_cv_enable_visibility=no
7422
7423fi
7424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7425fi
7426
7427 CC="$ac_save_cc"
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7429$as_echo "$ac_cv_enable_visibility" >&6; }
7430
7431 if test $ac_cv_enable_visibility = yes
7432 then
7433 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7434 fi
7435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7437 # support. Without this, treatment of subnormals doesn't follow
7438 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007439 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440 alpha*)
7441 BASECFLAGS="$BASECFLAGS -mieee"
7442 ;;
7443 esac
7444
7445 case $ac_sys_system in
7446 SCO_SV*)
7447 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7448 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 Darwin*)
7451 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7452 # used to be here, but non-Apple gcc doesn't accept them.
7453 if test "${CC}" = gcc
7454 then
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007456$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007457 case "${UNIVERSALSDK}" in
7458 */MacOSX10.4u.sdk)
7459 # Build using 10.4 SDK, force usage of gcc when the
7460 # compiler is gcc, otherwise the user will get very
7461 # confusing error messages when building on OSX 10.6
7462 CC=gcc-4.0
7463 CPP=cpp-4.0
7464 ;;
7465 esac
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007467$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007468 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469
Ned Deily87adb6e2013-10-18 21:09:56 -07007470 if test "${enable_universalsdk}"
7471 then
7472 case "$UNIVERSAL_ARCHS" in
7473 32-bit)
7474 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7475 LIPO_32BIT_FLAGS=""
7476 ARCH_RUN_32BIT=""
7477 ;;
7478 64-bit)
7479 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7480 LIPO_32BIT_FLAGS=""
7481 ARCH_RUN_32BIT="true"
7482 ;;
7483 all)
7484 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7485 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7486 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7487 ;;
7488 intel)
7489 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7490 LIPO_32BIT_FLAGS="-extract i386"
7491 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7492 ;;
7493 intel-32)
7494 UNIVERSAL_ARCH_FLAGS="-arch i386"
7495 LIPO_32BIT_FLAGS=""
7496 ARCH_RUN_32BIT=""
7497 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007498 intel-64)
7499 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7500 LIPO_32BIT_FLAGS=""
7501 ARCH_RUN_32BIT="true"
7502 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007503 3-way)
7504 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7505 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7506 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7507 ;;
7508 *)
7509 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7510 ;;
7511 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512
Ned Deily87adb6e2013-10-18 21:09:56 -07007513 if test "${UNIVERSALSDK}" != "/"
7514 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007515 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7516 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007517 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007518 else
7519 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7520 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007521 fi
7522 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523
Ned Deily87adb6e2013-10-18 21:09:56 -07007524 # Calculate an appropriate deployment target for this build:
7525 # The deployment target value is used explicitly to enable certain
7526 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007527 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007528 # component of the string returned by distutils.get_platform().
7529 #
7530 # Use the value from:
7531 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7532 # 2. the operating system version of the build machine if >= 10.6
7533 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7534 # below to pick either 10.3, 10.4, or 10.5 as the target.
7535 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536
Ned Deily87adb6e2013-10-18 21:09:56 -07007537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7538$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007539 cur_target_major=`sw_vers -productVersion | \
7540 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7541 cur_target_minor=`sw_vers -productVersion | \
7542 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7543 cur_target="${cur_target_major}.${cur_target_minor}"
7544 if test ${cur_target_major} -eq 10 && \
7545 test ${cur_target_minor} -ge 3 && \
7546 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007547 then
Ned Deily36820b62014-06-25 13:44:22 -07007548 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007549 cur_target=10.3
7550 if test ${enable_universalsdk}
7551 then
7552 case "$UNIVERSAL_ARCHS" in
7553 all|3-way|intel|64-bit)
7554 # These configurations were first supported in 10.5
7555 cur_target='10.5'
7556 ;;
7557 esac
7558 else
7559 if test `/usr/bin/arch` = "i386"
7560 then
7561 # 10.4 was the first release to support Intel archs
7562 cur_target="10.4"
7563 fi
7564 fi
7565 fi
7566 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007567
Ned Deily87adb6e2013-10-18 21:09:56 -07007568 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7569 # environment with a value that is the same as what we'll use
7570 # in the Makefile to ensure that we'll get the same compiler
7571 # environment during configure and build time.
7572 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7573 export MACOSX_DEPLOYMENT_TARGET
7574 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7576$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007577
Ned Deily87adb6e2013-10-18 21:09:56 -07007578 # end of Darwin* tests
7579 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580 esac
7581 ;;
7582
7583*)
7584 case $ac_sys_system in
7585 OpenUNIX*|UnixWare*)
7586 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7587 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 SCO_SV*)
7589 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7590 ;;
7591 esac
7592 ;;
7593esac
7594
Zachary Ware5af85642015-12-21 12:09:17 -06007595case "$CC" in
7596*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007597 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007598 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7599 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007600*xlc*)
7601 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7602 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007603esac
7604
T. Woutersddbfa2c2017-05-23 01:30:49 +02007605if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606 :
7607else
7608 OPT="-DNDEBUG $OPT"
7609fi
7610
7611if test "$ac_arch_flags"
7612then
7613 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7614fi
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616# On some compilers, pthreads are available without further options
7617# (e.g. MacOS X). On some of these systems, the compiler will not
7618# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7619# So we have to see first whether pthreads are available without
7620# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7622$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007623if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627 ac_cv_pthread_is_default=no
7628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630/* end confdefs.h. */
7631
Stefan Krah7dba5942012-11-22 22:49:11 +01007632#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633#include <pthread.h>
7634
7635void* routine(void* p){return NULL;}
7636
7637int main(){
7638 pthread_t p;
7639 if(pthread_create(&p,NULL,routine,NULL)!=0)
7640 return 1;
7641 (void)pthread_detach(p);
7642 return 0;
7643}
7644
7645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007646if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647
7648 ac_cv_pthread_is_default=yes
7649 ac_cv_kthread=no
7650 ac_cv_pthread=no
7651
7652else
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7656 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657fi
7658
7659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660fi
7661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7663$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664
7665
7666if test $ac_cv_pthread_is_default = yes
7667then
7668 ac_cv_kpthread=no
7669else
7670# -Kpthread, if available, provides the right #defines
7671# and linker options to make pthread_create available
7672# Some compilers won't report that they do not support -Kpthread,
7673# so we need to run a program to see whether it really made the
7674# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7676$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007677if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679else
7680 ac_save_cc="$CC"
7681CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007682if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683 ac_cv_kpthread=no
7684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686/* end confdefs.h. */
7687
Stefan Krah7dba5942012-11-22 22:49:11 +01007688#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689#include <pthread.h>
7690
7691void* routine(void* p){return NULL;}
7692
7693int main(){
7694 pthread_t p;
7695 if(pthread_create(&p,NULL,routine,NULL)!=0)
7696 return 1;
7697 (void)pthread_detach(p);
7698 return 0;
7699}
7700
7701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007702if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703 ac_cv_kpthread=yes
7704else
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
7710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711CC="$ac_save_cc"
7712fi
7713
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7715$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716fi
7717
7718if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7719then
7720# -Kthread, if available, provides the right #defines
7721# and linker options to make pthread_create available
7722# Some compilers won't report that they do not support -Kthread,
7723# so we need to run a program to see whether it really made the
7724# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7726$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007727if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729else
7730 ac_save_cc="$CC"
7731CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007732if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733 ac_cv_kthread=no
7734else
Matthias Kloseb9621712010-04-24 17:59:49 +00007735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736/* end confdefs.h. */
7737
Stefan Krah7dba5942012-11-22 22:49:11 +01007738#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739#include <pthread.h>
7740
7741void* routine(void* p){return NULL;}
7742
7743int main(){
7744 pthread_t p;
7745 if(pthread_create(&p,NULL,routine,NULL)!=0)
7746 return 1;
7747 (void)pthread_detach(p);
7748 return 0;
7749}
7750
7751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007752if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007753 ac_cv_kthread=yes
7754else
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759fi
7760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761CC="$ac_save_cc"
7762fi
7763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7765$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766fi
7767
7768if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7769then
7770# -pthread, if available, provides the right #defines
7771# and linker options to make pthread_create available
7772# Some compilers won't report that they do not support -pthread,
7773# so we need to run a program to see whether it really made the
7774# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7776$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007777if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779else
7780 ac_save_cc="$CC"
7781CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007782if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783 ac_cv_pthread=no
7784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786/* end confdefs.h. */
7787
Stefan Krah7dba5942012-11-22 22:49:11 +01007788#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789#include <pthread.h>
7790
7791void* routine(void* p){return NULL;}
7792
7793int main(){
7794 pthread_t p;
7795 if(pthread_create(&p,NULL,routine,NULL)!=0)
7796 return 1;
7797 (void)pthread_detach(p);
7798 return 0;
7799}
7800
7801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007802if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803 ac_cv_pthread=yes
7804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809fi
7810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811CC="$ac_save_cc"
7812fi
7813
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7815$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007816fi
7817
7818# If we have set a CC compiler flag for thread support then
7819# check if it works for CXX, too.
7820ac_cv_cxx_thread=no
7821if test ! -z "$CXX"
7822then
Matthias Kloseb9621712010-04-24 17:59:49 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7824$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825ac_save_cxx="$CXX"
7826
7827if test "$ac_cv_kpthread" = "yes"
7828then
7829 CXX="$CXX -Kpthread"
7830 ac_cv_cxx_thread=yes
7831elif test "$ac_cv_kthread" = "yes"
7832then
7833 CXX="$CXX -Kthread"
7834 ac_cv_cxx_thread=yes
7835elif test "$ac_cv_pthread" = "yes"
7836then
7837 CXX="$CXX -pthread"
7838 ac_cv_cxx_thread=yes
7839fi
7840
7841if test $ac_cv_cxx_thread = yes
7842then
7843 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7844 $CXX -c conftest.$ac_ext 2>&5
7845 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7846 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7847 then
7848 ac_cv_cxx_thread=yes
7849 else
7850 ac_cv_cxx_thread=no
7851 fi
7852 rm -fr conftest*
7853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7855$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856fi
7857CXX="$ac_save_cxx"
7858
7859
7860# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7862$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007863if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007867/* end confdefs.h. */
7868#include <stdlib.h>
7869#include <stdarg.h>
7870#include <string.h>
7871#include <float.h>
7872
7873int
7874main ()
7875{
7876
7877 ;
7878 return 0;
7879}
7880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882 ac_cv_header_stdc=yes
7883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7887
7888if test $ac_cv_header_stdc = yes; then
7889 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007891/* end confdefs.h. */
7892#include <string.h>
7893
7894_ACEOF
7895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 $EGREP "memchr" >/dev/null 2>&1; then :
7897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007898else
7899 ac_cv_header_stdc=no
7900fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007901rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007902
7903fi
7904
7905if test $ac_cv_header_stdc = yes; then
7906 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007908/* end confdefs.h. */
7909#include <stdlib.h>
7910
7911_ACEOF
7912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 $EGREP "free" >/dev/null 2>&1; then :
7914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007915else
7916 ac_cv_header_stdc=no
7917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007918rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007919
7920fi
7921
7922if test $ac_cv_header_stdc = yes; then
7923 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007925 :
7926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928/* end confdefs.h. */
7929#include <ctype.h>
7930#include <stdlib.h>
7931#if ((' ' & 0x0FF) == 0x020)
7932# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7933# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7934#else
7935# define ISLOWER(c) \
7936 (('a' <= (c) && (c) <= 'i') \
7937 || ('j' <= (c) && (c) <= 'r') \
7938 || ('s' <= (c) && (c) <= 'z'))
7939# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7940#endif
7941
7942#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7943int
7944main ()
7945{
7946 int i;
7947 for (i = 0; i < 256; i++)
7948 if (XOR (islower (i), ISLOWER (i))
7949 || toupper (i) != TOUPPER (i))
7950 return 2;
7951 return 0;
7952}
7953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007954if ac_fn_c_try_run "$LINENO"; then :
7955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007956else
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007961fi
7962
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007963fi
7964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7966$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007967if test $ac_cv_header_stdc = yes; then
7968
Matthias Kloseb9621712010-04-24 17:59:49 +00007969$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007970
7971fi
7972
stratakise768c862018-01-23 16:11:24 +01007973for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007974fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007975ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007976sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007977utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007978poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007979sys/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 +01007980sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007981sys/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 +01007982sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007983sys/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 -07007984libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007985linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007986sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007987do :
7988 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7989ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007990if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007992#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007993_ACEOF
7994
7995fi
7996
Guido van Rossum627b2d71993-12-24 10:39:16 +00007997done
7998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007999ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008000for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8003$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008004if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008008/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008009#include <sys/types.h>
8010#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008011
Martin v. Löwis11437992002-04-12 09:54:03 +00008012int
8013main ()
8014{
8015if ((DIR *) 0)
8016return 0;
8017 ;
8018 return 0;
8019}
8020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008023else
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008028eval ac_res=\$$as_ac_Header
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8030$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008031if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008033#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008034_ACEOF
8035
8036ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039done
8040# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8041if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8043$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046else
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051/* Override any GCC internal prototype to avoid an error.
8052 Use char because int might match the return type of a GCC
8053 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054#ifdef __cplusplus
8055extern "C"
8056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008057char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 ;
8063 return 0;
8064}
8065_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066for ac_lib in '' dir; do
8067 if test -z "$ac_lib"; then
8068 ac_res="none required"
8069 else
8070 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008071 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076rm -f core conftest.err conftest.$ac_objext \
8077 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008078 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081done
Victor Stinnere0be4232011-10-25 13:06:09 +02008082if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084else
8085 ac_cv_search_opendir=no
8086fi
8087rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008088LIBS=$ac_func_search_save_LIBS
8089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8091$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008093if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008096fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
Michael W. Hudson54241132001-12-07 15:38:26 +00008098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8100$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008101if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008103else
8104 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108/* Override any GCC internal prototype to avoid an error.
8109 Use char because int might match the return type of a GCC
8110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008111#ifdef __cplusplus
8112extern "C"
8113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008114char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008115int
8116main ()
8117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ;
8120 return 0;
8121}
8122_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123for ac_lib in '' x; do
8124 if test -z "$ac_lib"; then
8125 ac_res="none required"
8126 else
8127 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008128 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008133rm -f core conftest.err conftest.$ac_objext \
8134 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008135 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138done
Victor Stinnere0be4232011-10-25 13:06:09 +02008139if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141else
8142 ac_cv_search_opendir=no
8143fi
8144rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008145LIBS=$ac_func_search_save_LIBS
8146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8148$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008150if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008152
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008153fi
8154
8155fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8158$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008159if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008161else
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008163/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008164#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008165int
8166main ()
8167{
8168return makedev(0, 0);
8169 ;
8170 return 0;
8171}
8172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008174 ac_cv_header_sys_types_h_makedev=yes
8175else
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008178rm -f core conftest.err conftest.$ac_objext \
8179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008180
8181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8183$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008184
8185if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008186ac_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 +02008187if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008190
8191fi
8192
8193
8194
8195 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008196 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 +02008197if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008200
8201fi
8202
8203
8204 fi
8205fi
8206
Michael W. Hudson54241132001-12-07 15:38:26 +00008207
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008208# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8209# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8210SAVE_CFLAGS=$CFLAGS
8211CFLAGS="-std=c99 $CFLAGS"
8212for ac_header in bluetooth/bluetooth.h
8213do :
8214 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8215if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8216 cat >>confdefs.h <<_ACEOF
8217#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8218_ACEOF
8219
8220fi
8221
8222done
8223
8224CFLAGS=$SAVE_CFLAGS
8225
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008226# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8227for ac_header in net/if.h
8228do :
8229 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8230#ifdef STDC_HEADERS
8231# include <stdlib.h>
8232# include <stddef.h>
8233#else
8234# ifdef HAVE_STDLIB_H
8235# include <stdlib.h>
8236# endif
8237#endif
8238#ifdef HAVE_SYS_SOCKET_H
8239# include <sys/socket.h>
8240#endif
8241
8242"
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008244 cat >>confdefs.h <<_ACEOF
8245#define HAVE_NET_IF_H 1
8246_ACEOF
8247
8248fi
8249
8250done
8251
8252
Martin v. Löwis11017b12006-01-14 18:12:57 +00008253# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008254for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008255do :
8256 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 +00008257#ifdef HAVE_ASM_TYPES_H
8258#include <asm/types.h>
8259#endif
8260#ifdef HAVE_SYS_SOCKET_H
8261#include <sys/socket.h>
8262#endif
8263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264"
Victor Stinnere0be4232011-10-25 13:06:09 +02008265if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008267#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008268_ACEOF
8269
8270fi
8271
8272done
8273
8274
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008275# On Linux, qrtr.h requires asm/types.h
8276for ac_header in linux/qrtr.h
8277do :
8278 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8279#ifdef HAVE_ASM_TYPES_H
8280#include <asm/types.h>
8281#endif
8282#ifdef HAVE_SYS_SOCKET_H
8283#include <sys/socket.h>
8284#endif
8285
8286"
8287if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8288 cat >>confdefs.h <<_ACEOF
8289#define HAVE_LINUX_QRTR_H 1
8290_ACEOF
8291
8292fi
8293
8294done
8295
8296
caaveryeffc12f2017-09-06 18:18:10 -04008297for ac_header in linux/vm_sockets.h
8298do :
8299 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8300#ifdef HAVE_SYS_SOCKET_H
8301#include <sys/socket.h>
8302#endif
8303
8304"
8305if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8306 cat >>confdefs.h <<_ACEOF
8307#define HAVE_LINUX_VM_SOCKETS_H 1
8308_ACEOF
8309
8310fi
8311
8312done
8313
8314
karl ding360371f2020-04-29 15:31:19 -07008315# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8316for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008317do :
8318 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8319ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8320#ifdef HAVE_SYS_SOCKET_H
8321#include <sys/socket.h>
8322#endif
8323
8324"
8325if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8326 cat >>confdefs.h <<_ACEOF
8327#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8328_ACEOF
8329
8330fi
8331
8332done
8333
8334
Guido van Rossum627b2d71993-12-24 10:39:16 +00008335# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008336was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8338$as_echo_n "checking for clock_t in time.h... " >&6; }
8339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008340/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
8343_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008346 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008347else
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
8349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008351
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008352
Guido van Rossum627b2d71993-12-24 10:39:16 +00008353fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008354rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8357$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8360$as_echo_n "checking for makedev... " >&6; }
8361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008362/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008363
Jesus Cea740f53a2010-04-28 11:35:30 +00008364#if defined(MAJOR_IN_MKDEV)
8365#include <sys/mkdev.h>
8366#elif defined(MAJOR_IN_SYSMACROS)
8367#include <sys/sysmacros.h>
8368#else
8369#include <sys/types.h>
8370#endif
8371
Neal Norwitz11690112002-07-30 01:08:28 +00008372int
8373main ()
8374{
Jesus Cea740f53a2010-04-28 11:35:30 +00008375
8376 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008377 ;
8378 return 0;
8379}
Matthias Kloseb159a552010-04-25 21:00:44 +00008380
Neal Norwitz11690112002-07-30 01:08:28 +00008381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008382if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008383 ac_cv_has_makedev=yes
8384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008387rm -f core conftest.err conftest.$ac_objext \
8388 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8390$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008391if test "$ac_cv_has_makedev" = "yes"; then
8392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008394
8395fi
8396
Christian Heimes985ecdc2013-11-20 11:46:18 +01008397# byte swapping
8398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8399$as_echo_n "checking for le64toh... " >&6; }
8400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8401/* end confdefs.h. */
8402
8403#ifdef HAVE_ENDIAN_H
8404#include <endian.h>
8405#elif defined(HAVE_SYS_ENDIAN_H)
8406#include <sys/endian.h>
8407#endif
8408
8409int
8410main ()
8411{
8412
8413 le64toh(1)
8414 ;
8415 return 0;
8416}
8417
8418_ACEOF
8419if ac_fn_c_try_link "$LINENO"; then :
8420 ac_cv_has_le64toh=yes
8421else
8422 ac_cv_has_le64toh=no
8423fi
8424rm -f core conftest.err conftest.$ac_objext \
8425 conftest$ac_exeext conftest.$ac_ext
8426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8427$as_echo "$ac_cv_has_le64toh" >&6; }
8428if test "$ac_cv_has_le64toh" = "yes"; then
8429
8430$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8431
8432fi
8433
Martin v. Löwis399a6892002-10-04 10:22:02 +00008434use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008435# Don't use largefile support for GNU/Hurd
8436case $ac_sys_system in GNU*)
8437 use_lfs=no
8438esac
8439
Martin v. Löwis399a6892002-10-04 10:22:02 +00008440if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008441# Two defines needed to enable largefile support on various platforms
8442# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008443case $ac_sys_system/$ac_sys_release in
8444AIX*)
8445
8446$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8447
8448 ;;
8449esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008452
8453
Matthias Kloseb9621712010-04-24 17:59:49 +00008454$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008455
Martin v. Löwis399a6892002-10-04 10:22:02 +00008456fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008457
Guido van Rossum84e7b241996-08-19 21:59:00 +00008458# Add some code to confdefs.h so that the test for off_t works on SCO
8459cat >> confdefs.h <<\EOF
8460#if defined(SCO_DS)
8461#undef _OFF_T
8462#endif
8463EOF
8464
Guido van Rossumef2255b2000-03-10 22:30:29 +00008465# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008466ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008467if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
8471cat >>confdefs.h <<_ACEOF
8472#define mode_t int
8473_ACEOF
8474
8475fi
8476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008478if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008479
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008480else
Martin v. Löwis11437992002-04-12 09:54:03 +00008481
8482cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008484_ACEOF
8485
8486fi
8487
Matthias Kloseb9621712010-04-24 17:59:49 +00008488ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008491else
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
8493cat >>confdefs.h <<_ACEOF
8494#define pid_t int
8495_ACEOF
8496
8497fi
8498
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008501#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008503
Matthias Kloseb9621712010-04-24 17:59:49 +00008504ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008505if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508
8509cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008511_ACEOF
8512
8513fi
8514
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8516$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008519else
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008522#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
8524_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008527 ac_cv_type_uid_t=yes
8528else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008529 ac_cv_type_uid_t=no
8530fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008531rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008532
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8535$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008536if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008537
Matthias Kloseb9621712010-04-24 17:59:49 +00008538$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008539
8540
Matthias Kloseb9621712010-04-24 17:59:49 +00008541$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008542
8543fi
8544
Mark Dickinson983bc162012-12-02 12:11:38 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008547if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
Matthias Kloseb9621712010-04-24 17:59:49 +00008549$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008550
8551fi
8552
Stefan Krah1919b7e2012-03-21 18:25:23 +01008553ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8554if test "x$ac_cv_type___uint128_t" = xyes; then :
8555
8556$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8557
8558fi
8559
Jack Jansendd19cf82001-12-06 22:36:17 +00008560
Michael W. Hudson54241132001-12-07 15:38:26 +00008561# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008562# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563# The cast to long int works around a bug in the HP C Compiler
8564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8568$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008569if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 if test "$ac_cv_type_int" = yes; then
8576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008578as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008579See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580 else
8581 ac_cv_sizeof_int=0
8582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8587$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588
8589
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008592#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008594
8595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8601$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 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 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607else
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 if test "$ac_cv_type_long" = yes; then
8609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008611as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008612See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 else
8614 ac_cv_sizeof_long=0
8615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8620$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621
8622
8623
Martin v. Löwis11437992002-04-12 09:54:03 +00008624cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008625#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008626_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008627
8628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629# The cast to long int works around a bug in the HP C Compiler
8630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8632# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8634$as_echo_n "checking size of long long... " >&6; }
8635if ${ac_cv_sizeof_long_long+:} false; then :
8636 $as_echo_n "(cached) " >&6
8637else
8638 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8639
8640else
8641 if test "$ac_cv_type_long_long" = yes; then
8642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8644as_fn_error 77 "cannot compute sizeof (long long)
8645See \`config.log' for more details" "$LINENO" 5; }
8646 else
8647 ac_cv_sizeof_long_long=0
8648 fi
8649fi
8650
8651fi
8652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8653$as_echo "$ac_cv_sizeof_long_long" >&6; }
8654
8655
8656
8657cat >>confdefs.h <<_ACEOF
8658#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8659_ACEOF
8660
8661
8662# The cast to long int works around a bug in the HP C Compiler
8663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8667$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008668if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 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 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673else
Matthias Kloseb9621712010-04-24 17:59:49 +00008674 if test "$ac_cv_type_void_p" = yes; then
8675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008677as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008678See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 else
8680 ac_cv_sizeof_void_p=0
8681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8686$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687
8688
8689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008691#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008692_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008693
8694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695# The cast to long int works around a bug in the HP C Compiler
8696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8700$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008703else
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 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 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if test "$ac_cv_type_short" = yes; then
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008710as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008711See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712 else
8713 ac_cv_sizeof_short=0
8714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8719$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720
8721
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008724#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008725_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008726
8727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728# The cast to long int works around a bug in the HP C Compiler
8729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8733$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008734if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 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 +00008738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if test "$ac_cv_type_float" = yes; then
8741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008743as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008744See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745 else
8746 ac_cv_sizeof_float=0
8747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749
Martin v. Löwis11437992002-04-12 09:54:03 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8752$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753
8754
8755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008757#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008758_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008759
8760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761# The cast to long int works around a bug in the HP C Compiler
8762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8766$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008767if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008769else
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 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 +00008771
Martin v. Löwis11437992002-04-12 09:54:03 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if test "$ac_cv_type_double" = yes; then
8774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008776as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008777See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778 else
8779 ac_cv_sizeof_double=0
8780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782
Martin v. Löwis11437992002-04-12 09:54:03 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8785$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786
8787
8788
Martin v. Löwis11437992002-04-12 09:54:03 +00008789cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008790#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008791_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008792
8793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794# The cast to long int works around a bug in the HP C Compiler
8795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8799$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008800if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008802else
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 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 +00008804
Martin v. Löwis11437992002-04-12 09:54:03 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 if test "$ac_cv_type_fpos_t" = yes; then
8807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008809as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008810See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811 else
8812 ac_cv_sizeof_fpos_t=0
8813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8818$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819
8820
8821
Martin v. Löwis11437992002-04-12 09:54:03 +00008822cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008823#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008824_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008825
Michael W. Hudson54241132001-12-07 15:38:26 +00008826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827# The cast to long int works around a bug in the HP C Compiler
8828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8832$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008833if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 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 +00008837
Martin v. Löwis18e16552006-02-15 17:27:45 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 if test "$ac_cv_type_size_t" = yes; then
8840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008842as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008843See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844 else
8845 ac_cv_sizeof_size_t=0
8846 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848
Martin v. Löwis18e16552006-02-15 17:27:45 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8851$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852
8853
8854
Martin v. Löwis18e16552006-02-15 17:27:45 +00008855cat >>confdefs.h <<_ACEOF
8856#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8857_ACEOF
8858
8859
Christian Heimes400adb02008-02-01 08:12:03 +00008860# The cast to long int works around a bug in the HP C Compiler
8861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8863# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8865$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008866if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008868else
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 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 +00008870
Christian Heimes400adb02008-02-01 08:12:03 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 if test "$ac_cv_type_pid_t" = yes; then
8873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008875as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008876See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008877 else
8878 ac_cv_sizeof_pid_t=0
8879 fi
8880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881
Christian Heimes400adb02008-02-01 08:12:03 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8884$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008885
8886
8887
8888cat >>confdefs.h <<_ACEOF
8889#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8890_ACEOF
8891
8892
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008893# The cast to long int works around a bug in the HP C Compiler
8894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8896# This bug is HP SR number 8606223364.
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8898$as_echo_n "checking size of uintptr_t... " >&6; }
8899if ${ac_cv_sizeof_uintptr_t+:} false; then :
8900 $as_echo_n "(cached) " >&6
8901else
8902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8903
8904else
8905 if test "$ac_cv_type_uintptr_t" = yes; then
8906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8908as_fn_error 77 "cannot compute sizeof (uintptr_t)
8909See \`config.log' for more details" "$LINENO" 5; }
8910 else
8911 ac_cv_sizeof_uintptr_t=0
8912 fi
8913fi
8914
8915fi
8916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8917$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8918
8919
8920
8921cat >>confdefs.h <<_ACEOF
8922#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8923_ACEOF
8924
8925
Michael W. Hudson54241132001-12-07 15:38:26 +00008926
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008927
Eitan Adler3055c942018-05-15 22:58:09 -07008928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8929$as_echo_n "checking for long double... " >&6; }
8930if ${ac_cv_type_long_double+:} false; then :
8931 $as_echo_n "(cached) " >&6
8932else
8933 if test "$GCC" = yes; then
8934 ac_cv_type_long_double=yes
8935 else
8936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8937/* end confdefs.h. */
8938/* The Stardent Vistra knows sizeof (long double), but does
8939 not support it. */
8940 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008941int
8942main ()
8943{
Eitan Adler3055c942018-05-15 22:58:09 -07008944static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8945 sizeof (double) <= sizeof (long double))];
8946test_array [0] = 0;
8947return test_array [0];
8948
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008949 ;
8950 return 0;
8951}
8952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008953if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008954 ac_cv_type_long_double=yes
8955else
8956 ac_cv_type_long_double=no
8957fi
8958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8959 fi
8960fi
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8962$as_echo "$ac_cv_type_long_double" >&6; }
8963 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964
Matthias Kloseb9621712010-04-24 17:59:49 +00008965$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008966
Eitan Adler3055c942018-05-15 22:58:09 -07008967 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008968
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008969# The cast to long int works around a bug in the HP C Compiler
8970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8974$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008975if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008977else
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 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 +00008979
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008980else
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 if test "$ac_cv_type_long_double" = yes; then
8982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008984as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008985See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008986 else
8987 ac_cv_sizeof_long_double=0
8988 fi
8989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8993$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008994
8995
8996
8997cat >>confdefs.h <<_ACEOF
8998#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8999_ACEOF
9000
9001
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003# The cast to long int works around a bug in the HP C Compiler
9004# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9005# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9006# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9008$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009011else
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 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 +00009013
Thomas Woutersb2137042007-02-01 18:02:27 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 if test "$ac_cv_type__Bool" = yes; then
9016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009018as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009019See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020 else
9021 ac_cv_sizeof__Bool=0
9022 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009024
Thomas Woutersb2137042007-02-01 18:02:27 +00009025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9027$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028
9029
9030
Thomas Woutersb2137042007-02-01 18:02:27 +00009031cat >>confdefs.h <<_ACEOF
9032#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9033_ACEOF
9034
9035
Thomas Woutersb2137042007-02-01 18:02:27 +00009036
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037# The cast to long int works around a bug in the HP C Compiler
9038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9040# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9042$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009047#ifdef HAVE_SYS_TYPES_H
9048#include <sys/types.h>
9049#endif
9050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 if test "$ac_cv_type_off_t" = yes; then
9055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009057as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009058See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059 else
9060 ac_cv_sizeof_off_t=0
9061 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009063
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9066$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068
9069
Martin v. Löwis11437992002-04-12 09:54:03 +00009070cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009071#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009073
Michael W. Hudson54241132001-12-07 15:38:26 +00009074
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009075
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9077$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009078if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009079 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009080
Matthias Kloseb9621712010-04-24 17:59:49 +00009081$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9084$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009085else
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9087$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009088fi
9089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009090# The cast to long int works around a bug in the HP C Compiler
9091# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9092# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9093# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9095$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009096if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098else
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009100#ifdef HAVE_SYS_TYPES_H
9101#include <sys/types.h>
9102#endif
9103#ifdef HAVE_TIME_H
9104#include <time.h>
9105#endif
9106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009109else
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 if test "$ac_cv_type_time_t" = yes; then
9111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009113as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009114See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115 else
9116 ac_cv_sizeof_time_t=0
9117 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009119
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9122$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009124
9125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009127#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009128_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009129
Michael W. Hudson54241132001-12-07 15:38:26 +00009130
9131
Trent Mick635f6fb2000-08-23 21:33:05 +00009132# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009133ac_save_cc="$CC"
9134if test "$ac_cv_kpthread" = "yes"
9135then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009136elif test "$ac_cv_kthread" = "yes"
9137then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009138elif test "$ac_cv_pthread" = "yes"
9139then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009140fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009141
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9143$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009144have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009146/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009147
9148 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009149int
9150main ()
9151{
Guido van Rossum12580492000-09-24 16:47:19 +00009152pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ;
9154 return 0;
9155}
Matthias Kloseb159a552010-04-25 21:00:44 +00009156
Martin v. Löwis11437992002-04-12 09:54:03 +00009157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009158if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009159 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9163$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009164if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009165 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009166# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9167# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9168# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9170$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009171if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009173else
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009175#ifdef HAVE_PTHREAD_H
9176#include <pthread.h>
9177#endif
9178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009181else
Matthias Kloseb9621712010-04-24 17:59:49 +00009182 if test "$ac_cv_type_pthread_t" = yes; then
9183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009185as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009186See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009187 else
9188 ac_cv_sizeof_pthread_t=0
9189 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009191
Trent Mick635f6fb2000-08-23 21:33:05 +00009192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9194$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009196
9197
Martin v. Löwis11437992002-04-12 09:54:03 +00009198cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009199#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009200_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009202
Trent Mick635f6fb2000-08-23 21:33:05 +00009203fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009204
9205# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9206# This checking will be unnecessary after removing deprecated TLS API.
9207# The cast to long int works around a bug in the HP C Compiler
9208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9210# This bug is HP SR number 8606223364.
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9212$as_echo_n "checking size of pthread_key_t... " >&6; }
9213if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9214 $as_echo_n "(cached) " >&6
9215else
9216 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9217"; then :
9218
9219else
9220 if test "$ac_cv_type_pthread_key_t" = yes; then
9221 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9223as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9224See \`config.log' for more details" "$LINENO" 5; }
9225 else
9226 ac_cv_sizeof_pthread_key_t=0
9227 fi
9228fi
9229
9230fi
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9232$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9233
9234
9235
9236cat >>confdefs.h <<_ACEOF
9237#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9238_ACEOF
9239
9240
9241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9242$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9243if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9245/* end confdefs.h. */
9246#include <pthread.h>
9247int
9248main ()
9249{
9250pthread_key_t k; k * 1;
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255if ac_fn_c_try_compile "$LINENO"; then :
9256 ac_pthread_key_t_is_arithmetic_type=yes
9257else
9258 ac_pthread_key_t_is_arithmetic_type=no
9259
9260fi
9261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9263$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9264 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9265
9266$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9267
9268 fi
9269else
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
9272fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009273CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009274
Michael W. Hudson54241132001-12-07 15:38:26 +00009275
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009276case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009277 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009278 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9279 ;;
9280 Darwin/*)
9281 OTHER_LIBTOOL_OPT=""
9282 ;;
9283esac
9284
9285
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009286
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009287case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009288 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009289 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9290 if test "${enable_universalsdk}"; then
9291 :
9292 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009293 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009294 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009297 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009298 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009299 if test ${gcc_version} '<' 4.0
9300 then
9301 LIBTOOL_CRUFT="-lcc_dynamic"
9302 else
9303 LIBTOOL_CRUFT=""
9304 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009306 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009307else
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009309/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009310
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009311 #include <unistd.h>
9312 int main(int argc, char*argv[])
9313 {
9314 if (sizeof(long) == 4) {
9315 return 0;
9316 } else {
9317 return 1;
9318 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009319 }
9320
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009322if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009323 ac_osx_32bit=yes
9324else
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009329fi
9330
9331
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009332 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009333 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009334 i386)
9335 MACOSX_DEFAULT_ARCH="i386"
9336 ;;
9337 ppc)
9338 MACOSX_DEFAULT_ARCH="ppc"
9339 ;;
9340 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009341 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009342 ;;
9343 esac
9344 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009345 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009346 i386)
9347 MACOSX_DEFAULT_ARCH="x86_64"
9348 ;;
9349 ppc)
9350 MACOSX_DEFAULT_ARCH="ppc64"
9351 ;;
9352 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009353 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009354 ;;
9355 esac
9356
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009357 fi
9358
9359 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009360 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009361 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9364$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009365if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009367 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009369 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009372
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9374$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009375 if test $enable_shared = "yes"
9376 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009377 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 +00009378 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009379else
Matthias Kloseb9621712010-04-24 17:59:49 +00009380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9381$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009382fi
9383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9385$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009386case $ac_sys_system/$ac_sys_release in
9387 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9392$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009393 ;;
9394 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009397 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009398esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009399
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009401
Michael W. Hudson54241132001-12-07 15:38:26 +00009402
9403
9404
9405
Benjamin Peterson99f03762010-04-11 22:15:28 +00009406
Thomas Wouters477c8d52006-05-27 19:21:47 +00009407
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009408# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9409# -- usually .so, .sl on HP-UX, .dll on Cygwin
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9411$as_echo_n "checking the extension of shared libraries... " >&6; }
9412if test -z "$SHLIB_SUFFIX"; then
9413 case $ac_sys_system in
9414 hp*|HP*)
9415 case `uname -m` in
9416 ia64) SHLIB_SUFFIX=.so;;
9417 *) SHLIB_SUFFIX=.sl;;
9418 esac
9419 ;;
9420 CYGWIN*) SHLIB_SUFFIX=.dll;;
9421 *) SHLIB_SUFFIX=.so;;
9422 esac
9423fi
9424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9425$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009426
Guido van Rossum0a516c91994-09-12 10:58:40 +00009427# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009428# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009429# (Shared libraries in this instance are shared modules to be loaded into
9430# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9432$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433if test -z "$LDSHARED"
9434then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009435 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009436 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009437 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009438 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009439 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 if test "$GCC" = "yes" ; then
9442 LDSHARED='$(CC) -shared'
9443 LDCXXSHARED='$(CXX) -shared'
9444 else
9445 LDSHARED='$(CC) -G'
9446 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009447 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009448 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009449 if test "$GCC" = "yes" ; then
9450 LDSHARED='$(CC) -shared'
9451 LDCXXSHARED='$(CXX) -shared'
9452 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009453 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009454 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009455 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009456 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009457 LDSHARED='$(CC) -bundle'
9458 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009459 if test "$enable_framework" ; then
9460 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009461 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9462 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009463 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009464 else
9465 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009466 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009467 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009468 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009469 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009470 LDSHARED='$(CC) -bundle'
9471 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009472 if test "$enable_framework" ; then
9473 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009474 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9475 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009476 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009477 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009478 # No framework, use the Python app as bundle-loader
9479 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009480 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009481 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009482 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009483 Darwin/*)
9484 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9485 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009486
Ned Deily36820b62014-06-25 13:44:22 -07009487 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9488 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9489 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9490 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9491 if test ${dep_target_major} -eq 10 && \
9492 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009493 then
Ned Deily36820b62014-06-25 13:44:22 -07009494 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009495 LDSHARED='$(CC) -bundle'
9496 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009497 if test "$enable_framework" ; then
9498 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009499 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9500 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009501 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009502 else
9503 # No framework, use the Python app as bundle-loader
9504 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9505 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009506 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009507 fi
Ned Deily36820b62014-06-25 13:44:22 -07009508 else
9509 # building for OS X 10.3 and later
9510 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9511 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9512 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009513 fi
9514 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009515 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009516 LDSHARED='$(CC) -shared'
9517 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009518 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009519 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009520 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009521 LDSHARED='$(CC) -shared'
9522 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009523 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009524 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009525 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009526 OpenBSD*)
9527 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9528 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009529 LDSHARED='$(CC) -shared $(CCSHARED)'
9530 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009531 else
9532 case `uname -r` in
9533 [01].* | 2.[0-7] | 2.[0-7].*)
9534 LDSHARED="ld -Bshareable ${LDFLAGS}"
9535 ;;
9536 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009537 LDSHARED='$(CC) -shared $(CCSHARED)'
9538 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009539 ;;
9540 esac
9541 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009542 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009543 LDSHARED='$(CC) -shared'
9544 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009545 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009546 if test "$GCC" = "yes" ; then
9547 LDSHARED='$(CC) -shared'
9548 LDCXXSHARED='$(CXX) -shared'
9549 else
9550 LDSHARED='$(CC) -G'
9551 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009552 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009553 SCO_SV*)
9554 LDSHARED='$(CC) -Wl,-G,-Bexport'
9555 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9556 CYGWIN*)
9557 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9558 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009559 *) LDSHARED="ld";;
9560 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9563$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009564LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009565BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009566# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009567# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9569$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009570if test -z "$CCSHARED"
9571then
Guido van Rossum07397971997-04-29 21:49:50 +00009572 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009573 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009574 then CCSHARED="-fPIC";
9575 elif test `uname -p` = sparc;
9576 then CCSHARED="-xcode=pic32";
9577 else CCSHARED="-Kpic";
9578 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009579 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009580 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009581 else CCSHARED="+z";
9582 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009583 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009584 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009585 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009586 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009587 if test "$GCC" = "yes"
9588 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009589 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009590 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009591 SCO_SV*)
9592 if test "$GCC" = "yes"
9593 then CCSHARED="-fPIC"
9594 else CCSHARED="-Kpic -belf"
9595 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009596 VxWorks*)
9597 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009598 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9601$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009602# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009603# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9605$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009606if test -z "$LINKFORSHARED"
9607then
Guido van Rossum07397971997-04-29 21:49:50 +00009608 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009609 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009610 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009611 LINKFORSHARED="-Wl,-E -Wl,+s";;
9612# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009613 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009614 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009615 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009617 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009618
9619 # Issue #18075: the default maximum stack size (8MBytes) is too
9620 # small for the default recursion limit. Increase the stack size
9621 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009622 # Note: This matches the value of THREAD_STACK_SIZE in
9623 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009624 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9625
Jack Jansene578a632001-08-15 01:27:14 +00009626 if test "$enable_framework"
9627 then
Jack Jansenda49e192005-01-07 13:08:22 +00009628 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009629 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009630 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009631 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009632 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009633 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009634 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009635 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9636 then
9637 LINKFORSHARED="-Wl,--export-dynamic"
9638 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009639 SunOS/5*) case $CC in
9640 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009641 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009642 then
9643 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009644 fi;;
9645 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009646 CYGWIN*)
9647 if test $enable_shared = "no"
9648 then
9649 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9650 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009651 QNX*)
9652 # -Wl,-E causes the symbols to be added to the dynamic
9653 # symbol table so that they can be found when a module
9654 # is loaded. -N 2048K causes the stack size to be set
9655 # to 2048 kilobytes so that the stack doesn't overflow
9656 # when running test_compile.py.
9657 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009658 VxWorks*)
9659 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009660 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9663$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009664
Michael W. Hudson54241132001-12-07 15:38:26 +00009665
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9668$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009669if test ! "$LIBRARY" = "$LDLIBRARY"
9670then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009671 case $ac_sys_system in
9672 CYGWIN*)
9673 # Cygwin needs CCSHARED when building extension DLLs
9674 # but not when building the interpreter DLL.
9675 CFLAGSFORSHARED='';;
9676 *)
9677 CFLAGSFORSHARED='$(CCSHARED)'
9678 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9681$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009682
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009683# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9684# library (with --enable-shared).
9685# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009686# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9687# if it is not required, since it creates a dependency of the shared library
9688# to LIBS. This, in turn, means that applications linking the shared libpython
9689# don't need to link LIBS explicitly. The default should be only changed
9690# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009691
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9693$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009694case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009695 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009696 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009697esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9699$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009700
9701
Guido van Rossum627b2d71993-12-24 10:39:16 +00009702# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9704$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009706 $as_echo_n "(cached) " >&6
9707else
9708 ac_check_lib_save_LIBS=$LIBS
9709LIBS="-lsendfile $LIBS"
9710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9711/* end confdefs.h. */
9712
9713/* Override any GCC internal prototype to avoid an error.
9714 Use char because int might match the return type of a GCC
9715 builtin and then its argument prototype would still apply. */
9716#ifdef __cplusplus
9717extern "C"
9718#endif
9719char sendfile ();
9720int
9721main ()
9722{
9723return sendfile ();
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728if ac_fn_c_try_link "$LINENO"; then :
9729 ac_cv_lib_sendfile_sendfile=yes
9730else
9731 ac_cv_lib_sendfile_sendfile=no
9732fi
9733rm -f core conftest.err conftest.$ac_objext \
9734 conftest$ac_exeext conftest.$ac_ext
9735LIBS=$ac_check_lib_save_LIBS
9736fi
9737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9738$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009739if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009740 cat >>confdefs.h <<_ACEOF
9741#define HAVE_LIBSENDFILE 1
9742_ACEOF
9743
9744 LIBS="-lsendfile $LIBS"
9745
9746fi
9747
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9749$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009750if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009752else
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009754LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758/* Override any GCC internal prototype to avoid an error.
9759 Use char because int might match the return type of a GCC
9760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009761#ifdef __cplusplus
9762extern "C"
9763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009764char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009765int
9766main ()
9767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009778rm -f core conftest.err conftest.$ac_objext \
9779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009780LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9783$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009784if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 cat >>confdefs.h <<_ACEOF
9786#define HAVE_LIBDL 1
9787_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009789 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009791fi
9792 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9794$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009795if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009799LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803/* Override any GCC internal prototype to avoid an error.
9804 Use char because int might match the return type of a GCC
9805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#ifdef __cplusplus
9807extern "C"
9808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009809char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009810int
9811main ()
9812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ;
9815 return 0;
9816}
9817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820else
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823rm -f core conftest.err conftest.$ac_objext \
9824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9828$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009829if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 cat >>confdefs.h <<_ACEOF
9831#define HAVE_LIBDLD 1
9832_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009833
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009834 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009836fi
9837 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009838
Michael Felt0d3ccb42017-12-30 22:39:20 +01009839# checks for uuid.h location
9840for ac_header in uuid/uuid.h uuid.h
9841do :
9842 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9843ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9844if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9845 cat >>confdefs.h <<_ACEOF
9846#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9847_ACEOF
9848
9849fi
9850
9851done
9852
9853
Berker Peksag9a10ff42017-11-08 23:09:16 +03009854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9855$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857/* end confdefs.h. */
9858#include <uuid/uuid.h>
9859int
9860main ()
9861{
9862
9863#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009864void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009865#endif
9866
9867 ;
9868 return 0;
9869}
9870_ACEOF
9871if ac_fn_c_try_compile "$LINENO"; then :
9872
9873$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9874
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9876$as_echo "yes" >&6; }
9877else
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9879$as_echo "no" >&6; }
9880
9881fi
9882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9883
Michael Felt0d3ccb42017-12-30 22:39:20 +01009884# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009885# FreeBSD and OpenBSD provides support as well
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9887$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9889/* end confdefs.h. */
9890#include <uuid.h>
9891int
9892main ()
9893{
9894
9895#ifndef uuid_create
9896void *x = uuid_create
9897#endif
9898
9899 ;
9900 return 0;
9901}
9902_ACEOF
9903if ac_fn_c_try_compile "$LINENO"; then :
9904
9905$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9906
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9908$as_echo "yes" >&6; }
9909else
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
9912
9913fi
9914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9915
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009916# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9917# stream in big-endian byte-order
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9919$as_echo_n "checking for uuid_enc_be... " >&6; }
9920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9921/* end confdefs.h. */
9922#include <uuid.h>
9923int
9924main ()
9925{
9926
9927#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009928void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009929#endif
9930
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935if ac_fn_c_try_compile "$LINENO"; then :
9936
9937$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9938
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9940$as_echo "yes" >&6; }
9941else
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; }
9944
9945fi
9946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9947
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009948# 'Real Time' functions on Solaris
9949# posix4 on Solaris 2.6
9950# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009953if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009955else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009956 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009960/* Override any GCC internal prototype to avoid an error.
9961 Use char because int might match the return type of a GCC
9962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009963#ifdef __cplusplus
9964extern "C"
9965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009966char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009967int
9968main ()
9969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 ;
9972 return 0;
9973}
9974_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975for ac_lib in '' pthread rt posix4; do
9976 if test -z "$ac_lib"; then
9977 ac_res="none required"
9978 else
9979 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009980 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009983 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009987 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009988 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990done
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993else
9994 ac_cv_search_sem_init=no
9995fi
9996rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009997LIBS=$ac_func_search_save_LIBS
9998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10000$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010002if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010004
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010005fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010006
Martin v. Löwis519adae2003-09-20 10:47:47 +000010007
Martin v. Löwis19d17342003-06-14 21:03:05 +000010008# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10010$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010011if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010013else
10014 ac_check_lib_save_LIBS=$LIBS
10015LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010017/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019/* Override any GCC internal prototype to avoid an error.
10020 Use char because int might match the return type of a GCC
10021 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010022#ifdef __cplusplus
10023extern "C"
10024#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010025char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010026int
10027main ()
10028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010029return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010030 ;
10031 return 0;
10032}
10033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010035 ac_cv_lib_intl_textdomain=yes
10036else
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010039rm -f core conftest.err conftest.$ac_objext \
10040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010041LIBS=$ac_check_lib_save_LIBS
10042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10044$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010045if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010048
Brett Cannonc6d936e2009-06-07 20:09:53 +000010049 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010050fi
10051
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010052
10053# checks for system dependent C++ extensions support
10054case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10056$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010058/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010059
Georg Brandl59e87bd2011-02-15 19:48:59 +000010060 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010061int
10062main ()
10063{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010064loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ;
10066 return 0;
10067}
Matthias Kloseb159a552010-04-25 21:00:44 +000010068
Martin v. Löwis11437992002-04-12 09:54:03 +000010069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010070if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010071
Matthias Kloseb159a552010-04-25 21:00:44 +000010072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
Matthias Kloseb159a552010-04-25 21:00:44 +000010075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010076$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010077
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010078else
Matthias Kloseb159a552010-04-25 21:00:44 +000010079
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010081$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010082
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010085 conftest$ac_exeext conftest.$ac_ext
10086# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10087# of the AIX system used to build/package Python executable. This tag serves
10088# as a baseline for bdist module packages
10089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10090$as_echo_n "checking for the system builddate... " >&6; }
10091 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10092
10093cat >>confdefs.h <<_ACEOF
10094#define AIX_BUILDDATE $AIX_BUILDDATE
10095_ACEOF
10096
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10098$as_echo "$AIX_BUILDDATE" >&6; }
10099 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010100 *) ;;
10101esac
10102
Christian Heimes985ecdc2013-11-20 11:46:18 +010010103# check for systems that require aligned memory access
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10105$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010106if ${ac_cv_aligned_required+:} false; then :
10107 $as_echo_n "(cached) " >&6
10108else
10109 if test "$cross_compiling" = yes; then :
10110 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010111else
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113/* end confdefs.h. */
10114
10115int main()
10116{
10117 char s[16];
10118 int i, *p1, *p2;
10119 for (i=0; i < 16; i++)
10120 s[i] = i;
10121 p1 = (int*)(s+1);
10122 p2 = (int*)(s+2);
10123 if (*p1 == *p2)
10124 return 1;
10125 return 0;
10126}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010127_ACEOF
10128if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010129 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010130else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010131 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010132fi
10133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10134 conftest.$ac_objext conftest.beam conftest.$ac_ext
10135fi
10136
10137
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010138fi
10139
10140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10141$as_echo "$ac_cv_aligned_required" >&6; }
10142if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010143
10144$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10145
10146fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010147
10148# str, bytes and memoryview hash algorithm
10149
10150
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10152$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10153
10154# Check whether --with-hash_algorithm was given.
10155if test "${with_hash_algorithm+set}" = set; then :
10156 withval=$with_hash_algorithm;
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10158$as_echo "$withval" >&6; }
10159case "$withval" in
10160 siphash24)
10161 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10162
10163 ;;
10164 fnv)
10165 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10166
10167 ;;
10168 *)
10169 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10170 ;;
10171esac
10172
10173else
10174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10175$as_echo "default" >&6; }
10176fi
10177
10178
Paul Ganssle62972d92020-05-16 04:20:06 -040010179validate_tzpath() {
10180 # Checks that each element of hte path is an absolute path
10181 if test -z "$1"; then
10182 # Empty string is allowed: it indicates no system TZPATH
10183 return 0
10184 fi
10185
10186 # Bad paths are those that don't start with /
10187 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10188 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10189 return 1;
10190 fi
10191}
10192
10193TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10195$as_echo_n "checking for --with-tzpath... " >&6; }
10196
10197# Check whether --with-tzpath was given.
10198if test "${with_tzpath+set}" = set; then :
10199 withval=$with_tzpath;
10200case "$withval" in
10201 yes)
10202 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10203 ;;
10204 *)
10205 validate_tzpath "$withval"
10206 TZPATH="$withval"
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10208$as_echo "\"$withval\"" >&6; }
10209 ;;
10210esac
10211
10212else
10213 validate_tzpath "$TZPATH"
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10215$as_echo "\"$TZPATH\"" >&6; }
10216fi
10217
10218
10219
Charles-François Natalid30b0222014-05-08 23:08:51 +010010220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10221$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10222
10223# Check whether --with-address_sanitizer was given.
10224if test "${with_address_sanitizer+set}" = set; then :
10225 withval=$with_address_sanitizer;
10226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10227$as_echo "$withval" >&6; }
10228BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10229LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010230# ASan works by controlling memory allocation, our own malloc interferes.
10231with_pymalloc="no"
10232
10233else
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
10236fi
10237
10238
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10240$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10241
10242# Check whether --with-memory_sanitizer was given.
10243if test "${with_memory_sanitizer+set}" = set; then :
10244 withval=$with_memory_sanitizer;
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10246$as_echo "$withval" >&6; }
10247BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10248LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10249# MSan works by controlling memory allocation, our own malloc interferes.
10250with_pymalloc="no"
10251
10252else
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255fi
10256
10257
10258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10259$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10260
10261# Check whether --with-undefined_behavior_sanitizer was given.
10262if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10263 withval=$with_undefined_behavior_sanitizer;
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10265$as_echo "$withval" >&6; }
10266BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10267LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010268
10269else
10270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }
10272fi
10273
10274
Guido van Rossum70c7f481998-03-26 18:44:10 +000010275# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10277$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010278if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010280else
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010282LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286/* Override any GCC internal prototype to avoid an error.
10287 Use char because int might match the return type of a GCC
10288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010289#ifdef __cplusplus
10290extern "C"
10291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010292char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010293int
10294main ()
10295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 ;
10298 return 0;
10299}
10300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010301if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010303else
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010306rm -f core conftest.err conftest.$ac_objext \
10307 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010308LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10311$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010312if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010313 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010314fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010315 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10317$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010318if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010320else
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010322LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326/* Override any GCC internal prototype to avoid an error.
10327 Use char because int might match the return type of a GCC
10328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010329#ifdef __cplusplus
10330extern "C"
10331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010332char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010333int
10334main ()
10335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 ;
10338 return 0;
10339}
10340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010346rm -f core conftest.err conftest.$ac_objext \
10347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010348LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10351$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010352if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010353 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010354fi
10355 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010356
Matthias Kloseb9621712010-04-24 17:59:49 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10358$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010362 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10364$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010365LIBS="$withval $LIBS"
10366
10367else
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370fi
10371
Guido van Rossum7f43da71994-08-01 12:15:30 +000010372
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010373
10374
10375
10376
10377
10378
Victor Stinnerb477d192020-01-22 22:48:16 +010010379
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010380if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10381 if test -n "$ac_tool_prefix"; then
10382 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10383set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10385$as_echo_n "checking for $ac_word... " >&6; }
10386if ${ac_cv_path_PKG_CONFIG+:} false; then :
10387 $as_echo_n "(cached) " >&6
10388else
10389 case $PKG_CONFIG in
10390 [\\/]* | ?:[\\/]*)
10391 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10392 ;;
10393 *)
10394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10395for as_dir in $PATH
10396do
10397 IFS=$as_save_IFS
10398 test -z "$as_dir" && as_dir=.
10399 for ac_exec_ext in '' $ac_executable_extensions; do
10400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10401 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10403 break 2
10404 fi
10405done
10406 done
10407IFS=$as_save_IFS
10408
10409 ;;
10410esac
10411fi
10412PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10413if test -n "$PKG_CONFIG"; then
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10415$as_echo "$PKG_CONFIG" >&6; }
10416else
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419fi
10420
10421
10422fi
10423if test -z "$ac_cv_path_PKG_CONFIG"; then
10424 ac_pt_PKG_CONFIG=$PKG_CONFIG
10425 # Extract the first word of "pkg-config", so it can be a program name with args.
10426set dummy pkg-config; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10430 $as_echo_n "(cached) " >&6
10431else
10432 case $ac_pt_PKG_CONFIG in
10433 [\\/]* | ?:[\\/]*)
10434 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10435 ;;
10436 *)
10437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440 IFS=$as_save_IFS
10441 test -z "$as_dir" && as_dir=.
10442 for ac_exec_ext in '' $ac_executable_extensions; do
10443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10444 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446 break 2
10447 fi
10448done
10449 done
10450IFS=$as_save_IFS
10451
10452 ;;
10453esac
10454fi
10455ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10456if test -n "$ac_pt_PKG_CONFIG"; then
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10458$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10459else
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464 if test "x$ac_pt_PKG_CONFIG" = x; then
10465 PKG_CONFIG=""
10466 else
10467 case $cross_compiling:$ac_tool_warned in
10468yes:)
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10471ac_tool_warned=yes ;;
10472esac
10473 PKG_CONFIG=$ac_pt_PKG_CONFIG
10474 fi
10475else
10476 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10477fi
10478
10479fi
10480if test -n "$PKG_CONFIG"; then
10481 _pkg_min_version=0.9.0
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10483$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10484 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10486$as_echo "yes" >&6; }
10487 else
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489$as_echo "no" >&6; }
10490 PKG_CONFIG=""
10491 fi
10492fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010493
10494# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10496$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010497
10498# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010500 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010501else
10502 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010503fi
10504
10505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10507$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010508
10509# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10511$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010512
10513# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010514if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010515 withval=$with_system_ffi;
10516fi
10517
10518
Zachary Waref40d4dd2016-09-17 01:25:24 -050010519if test "$ac_sys_system" = "Darwin"
10520then
10521 case "$with_system_ffi" in
10522 "")
10523 with_system_ffi="no"
10524 ;;
10525 yes|no)
10526 ;;
10527 *)
10528 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10529 ;;
10530 esac
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10532$as_echo "$with_system_ffi" >&6; }
10533else
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10535$as_echo "yes" >&6; }
10536 if test "$with_system_ffi" != ""
10537 then
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10539$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10540 fi
10541 with_system_ffi="yes"
10542fi
Zachary Ware935043d2016-09-09 17:01:21 -070010543
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010544if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010545 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10546else
10547 LIBFFI_INCLUDEDIR=""
10548fi
10549
10550
Stefan Krah60187b52012-03-23 19:06:27 +010010551# Check for use of the system libmpdec library
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10553$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10554
10555# Check whether --with-system_libmpdec was given.
10556if test "${with_system_libmpdec+set}" = set; then :
10557 withval=$with_system_libmpdec;
10558else
10559 with_system_libmpdec="no"
10560fi
10561
10562
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10564$as_echo "$with_system_libmpdec" >&6; }
10565
Stefan Krah815280e2020-02-29 19:43:42 +010010566# Check whether _decimal should use a coroutine-local or thread-local context
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10568$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10569
10570# Check whether --with-decimal_contextvar was given.
10571if test "${with_decimal_contextvar+set}" = set; then :
10572 withval=$with_decimal_contextvar;
10573else
10574 with_decimal_contextvar="yes"
10575fi
10576
10577
10578if test "$with_decimal_contextvar" != "no"
10579then
10580
10581$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10582
10583fi
10584
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10586$as_echo "$with_decimal_contextvar" >&6; }
10587
Benjamin Peterson076ed002010-10-31 17:11:02 +000010588# Check for support for loadable sqlite extensions
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10590$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10591# Check whether --enable-loadable-sqlite-extensions was given.
10592if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10593 enableval=$enable_loadable_sqlite_extensions;
10594else
10595 enable_loadable_sqlite_extensions="no"
10596fi
10597
10598
10599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10600$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10601
Ned Deilyd819b932013-09-06 01:07:05 -070010602# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10603
10604
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10606$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10607
10608# Check whether --with-tcltk-includes was given.
10609if test "${with_tcltk_includes+set}" = set; then :
10610 withval=$with_tcltk_includes;
10611else
10612 with_tcltk_includes="default"
10613fi
10614
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10616$as_echo "$with_tcltk_includes" >&6; }
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10618$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10619
10620# Check whether --with-tcltk-libs was given.
10621if test "${with_tcltk_libs+set}" = set; then :
10622 withval=$with_tcltk_libs;
10623else
10624 with_tcltk_libs="default"
10625fi
10626
10627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10628$as_echo "$with_tcltk_libs" >&6; }
10629if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10630then
10631 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10632 then
10633 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10634 fi
10635 TCLTK_INCLUDES=""
10636 TCLTK_LIBS=""
10637else
10638 TCLTK_INCLUDES="$with_tcltk_includes"
10639 TCLTK_LIBS="$with_tcltk_libs"
10640fi
10641
Matthias Klose55708cc2009-04-30 08:06:49 +000010642# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10644$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010645
10646# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010648 withval=$with_dbmliborder;
10649if test x$with_dbmliborder = xyes
10650then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010651as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010652else
10653 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10654 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10655 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010656 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010657 fi
10658 done
10659fi
10660fi
10661
Matthias Kloseb9621712010-04-24 17:59:49 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10663$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010664
Martin v. Löwis11437992002-04-12 09:54:03 +000010665# Templates for things AC_DEFINEd more than once.
10666# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010667
10668
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010669if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010670then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010671 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010673
10674 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010675 if test "$ac_sys_system" = "SunOS"; then
10676 CFLAGS="$CFLAGS -D_REENTRANT"
10677 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010678elif test "$ac_cv_kpthread" = "yes"
10679then
10680 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010681 if test "$ac_cv_cxx_thread" = "yes"; then
10682 CXX="$CXX -Kpthread"
10683 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010684 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010685elif test "$ac_cv_kthread" = "yes"
10686then
10687 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010688 if test "$ac_cv_cxx_thread" = "yes"; then
10689 CXX="$CXX -Kthread"
10690 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010691 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692elif test "$ac_cv_pthread" = "yes"
10693then
10694 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010695 if test "$ac_cv_cxx_thread" = "yes"; then
10696 CXX="$CXX -pthread"
10697 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010699else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010700 if test ! -z "$withval" -a -d "$withval"
10701 then LDFLAGS="$LDFLAGS -L$withval"
10702 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010703
10704 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010705 # define _POSIX_THREADS in unistd.h. Some apparently don't
10706 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10708$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010710/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010711
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010712#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010713#ifdef _POSIX_THREADS
10714yes
10715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010716
10717_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010718if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010720 unistd_defines_pthreads=yes
10721else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010722 unistd_defines_pthreads=no
10723fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010724rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10727$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010728
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010730
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010731 # Just looking for pthread_create in libpthread is not enough:
10732 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10733 # So we really have to include pthread.h, and then link.
10734 _libs=$LIBS
10735 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10737$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010740
10741#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010742#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010743
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010744void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010745int
10746main ()
10747{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010748
10749pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 ;
10751 return 0;
10752}
10753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10757$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010758 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010759
Guido van Rossum02a1c402000-02-25 19:26:31 +000010760else
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010762 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010764if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010765
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010766 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010767
Guido van Rossumad678af1998-10-02 14:42:15 +000010768else
Guido van Rossumad678af1998-10-02 14:42:15 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10771$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010772if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774else
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010776LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010780/* Override any GCC internal prototype to avoid an error.
10781 Use char because int might match the return type of a GCC
10782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010783#ifdef __cplusplus
10784extern "C"
10785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010786char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010787int
10788main ()
10789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010791 ;
10792 return 0;
10793}
10794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010797else
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010800rm -f core conftest.err conftest.$ac_objext \
10801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010802LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10805$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010806if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010807
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010808 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010809 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010810
Greg Steinadf63d62000-07-05 10:38:09 +000010811else
Greg Steinadf63d62000-07-05 10:38:09 +000010812
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10814$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010815if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010817else
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010819LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823/* Override any GCC internal prototype to avoid an error.
10824 Use char because int might match the return type of a GCC
10825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010826#ifdef __cplusplus
10827extern "C"
10828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010829char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010830int
10831main ()
10832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 ;
10835 return 0;
10836}
10837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010840else
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010843rm -f core conftest.err conftest.$ac_objext \
10844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010845LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10848$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010849if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010851 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010852 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010853
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010854else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10857$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010858if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010860else
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010862LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866/* Override any GCC internal prototype to avoid an error.
10867 Use char because int might match the return type of a GCC
10868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010869#ifdef __cplusplus
10870extern "C"
10871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010872char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010873int
10874main ()
10875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 ;
10878 return 0;
10879}
10880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010883else
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010886rm -f core conftest.err conftest.$ac_objext \
10887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10891$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010892if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010893
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010894 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010895 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010896
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10900$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010901if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010903else
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010905LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909/* Override any GCC internal prototype to avoid an error.
10910 Use char because int might match the return type of a GCC
10911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010912#ifdef __cplusplus
10913extern "C"
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010916int
10917main ()
10918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010919return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 ;
10921 return 0;
10922}
10923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010925 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010926else
Matthias Kloseb9621712010-04-24 17:59:49 +000010927 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929rm -f core conftest.err conftest.$ac_objext \
10930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010931LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10934$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010935if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010936
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010937 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010938 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010939
Guido van Rossumb93a8621998-05-07 13:27:32 +000010940else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010941
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010942 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10943
Guido van Rossum2d38f911996-06-26 19:47:01 +000010944fi
10945
Guido van Rossum627b2d71993-12-24 10:39:16 +000010946
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010947fi
10948
Guido van Rossum0be3e491997-05-22 20:33:33 +000010949fi
10950
Guido van Rossum49545951997-12-02 19:28:29 +000010951fi
10952
Guido van Rossumb93a8621998-05-07 13:27:32 +000010953fi
10954
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010956rm -f core conftest.err conftest.$ac_objext \
10957 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10960$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010961if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010963else
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010965LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969/* Override any GCC internal prototype to avoid an error.
10970 Use char because int might match the return type of a GCC
10971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010972#ifdef __cplusplus
10973extern "C"
10974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010975char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010976int
10977main ()
10978{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ;
10981 return 0;
10982}
10983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010986else
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010989rm -f core conftest.err conftest.$ac_objext \
10990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010991LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10994$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010995if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010996
Martin v. Löwis130fb172001-07-19 11:00:41 +000010997 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010998
Guido van Rossum627b2d71993-12-24 10:39:16 +000010999fi
11000
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011001
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011002fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011004if test "$posix_threads" = "yes"; then
11005 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011008
11009 fi
11010
11011 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11012 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011013 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011015
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011016 ;;
11017 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011019
11020 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011021 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011023
11024 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011025 esac
11026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11028$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011029 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011033 ac_cv_pthread_system_supported=no
11034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011037
11038 #include <stdio.h>
11039 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011040 void *foo(void *parm) {
11041 return NULL;
11042 }
11043 main() {
11044 pthread_attr_t attr;
11045 pthread_t id;
11046 if (pthread_attr_init(&attr)) exit(-1);
11047 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11048 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11049 exit(0);
11050 }
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011053 ac_cv_pthread_system_supported=yes
11054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062fi
11063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11065$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011066 if test "$ac_cv_pthread_system_supported" = "yes"; then
11067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011069
11070 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 for ac_func in pthread_sigmask
11072do :
11073 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011074if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011075 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011076#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011077_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011078 case $ac_sys_system in
11079 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011082
11083 ;;
11084 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011085fi
11086done
11087
pdoxe14679c2017-10-05 00:01:56 -070011088 for ac_func in pthread_getcpuclockid
11089do :
11090 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11091if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11092 cat >>confdefs.h <<_ACEOF
11093#define HAVE_PTHREAD_GETCPUCLOCKID 1
11094_ACEOF
11095
11096fi
11097done
11098
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011099fi
11100
11101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011103
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11105$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011106# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011107if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011108 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11111$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112 ipv6=no
11113 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11115$as_echo "yes" >&6; }
11116 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117
11118 ipv6=yes
11119 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121else
Martin v. Löwis11437992002-04-12 09:54:03 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125 /* AF_INET6 available check */
11126#include <sys/types.h>
11127#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011128int
11129main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011131int domain = AF_INET6;
11132 ;
11133 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134}
Martin v. Löwis11437992002-04-12 09:54:03 +000011135_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011136if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011137
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11139$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011141
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142else
Matthias Kloseb159a552010-04-25 21:00:44 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11145$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011147
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011151if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11153$as_echo_n "checking if RFC2553 API is available... " >&6; }
11154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011155/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011156
11157 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011158#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011159int
11160main ()
11161{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011162struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011163 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ;
11165 return 0;
11166}
Matthias Kloseb159a552010-04-25 21:00:44 +000011167
Martin v. Löwis11437992002-04-12 09:54:03 +000011168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011170
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011173 ipv6=yes
11174
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011175else
Matthias Kloseb159a552010-04-25 21:00:44 +000011176
11177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011178$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011179 ipv6=no
11180
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011183fi
11184
11185if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011187
11188fi
11189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190fi
11191
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011192
11193ipv6type=unknown
11194ipv6lib=none
11195ipv6trylibc=no
11196
11197if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11199$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011200 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11201 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011202 case $i in
11203 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011207#include <netinet/in.h>
11208#ifdef IPV6_INRIA_VERSION
11209yes
11210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011214 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011215fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011217
11218 ;;
11219 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011222
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011223#include <netinet/in.h>
11224#ifdef __KAME__
11225yes
11226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011227_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011230 ipv6type=$i;
11231 ipv6lib=inet6
11232 ipv6libdir=/usr/local/v6/lib
11233 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011234fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011235rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011236
11237 ;;
11238 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011241
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011242#include <features.h>
11243#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11244yes
11245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011246_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011249 ipv6type=$i;
11250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011251fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011252rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011253
11254 ;;
11255 linux-inet6)
11256 if test -d /usr/inet6; then
11257 ipv6type=$i
11258 ipv6lib=inet6
11259 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011260 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011261 fi
11262 ;;
11263 solaris)
11264 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011265 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011266 ipv6type=$i
11267 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011268 fi
11269 fi
11270 ;;
11271 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011274
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011275#include <sys/param.h>
11276#ifdef _TOSHIBA_INET6
11277yes
11278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011279_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011282 ipv6type=$i;
11283 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011284 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011285fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011286rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011287
11288 ;;
11289 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011292
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011293#include </usr/local/v6/include/sys/v6config.h>
11294#ifdef __V6D__
11295yes
11296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011297_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011299 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011300 ipv6type=$i;
11301 ipv6lib=v6;
11302 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011303 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011305rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306
11307 ;;
11308 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011311
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011312#include <sys/param.h>
11313#ifdef _ZETA_MINAMI_INET6
11314yes
11315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011316_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011319 ipv6type=$i;
11320 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011321 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011323rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011324
11325 ;;
11326 esac
11327 if test "$ipv6type" != "unknown"; then
11328 break
11329 fi
11330 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11332$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011333fi
11334
11335if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11336 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11337 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11338 echo "using lib$ipv6lib"
11339 else
11340 if test $ipv6trylibc = "yes"; then
11341 echo "using libc"
11342 else
11343 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11344 echo "You need to fetch lib$ipv6lib.a from appropriate"
11345 echo 'ipv6 kit and compile beforehand.'
11346 exit 1
11347 fi
11348 fi
11349fi
11350
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11352$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11354/* end confdefs.h. */
11355 /* CAN_RAW_FD_FRAMES available check */
11356#include <linux/can/raw.h>
11357int
11358main ()
11359{
11360int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11361 ;
11362 return 0;
11363}
11364_ACEOF
11365if ac_fn_c_try_compile "$LINENO"; then :
11366
11367
11368$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11369
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11371$as_echo "yes" >&6; }
11372
11373else
11374
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
11377
11378fi
11379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11380
Zackery Spytz97e0de02020-04-09 06:03:49 -060011381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11382$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11384/* end confdefs.h. */
11385
11386#include <linux/can/raw.h>
11387int
11388main ()
11389{
11390int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11391 ;
11392 return 0;
11393}
11394_ACEOF
11395if ac_fn_c_try_compile "$LINENO"; then :
11396
11397
11398$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11399
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11401$as_echo "yes" >&6; }
11402
11403else
11404
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406$as_echo "no" >&6; }
11407
11408fi
11409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11410
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011411# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11413$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011416if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417 withval=$with_doc_strings;
11418fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011419
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011420
11421if test -z "$with_doc_strings"
11422then with_doc_strings="yes"
11423fi
11424if test "$with_doc_strings" != "no"
11425then
11426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011428
11429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11431$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011432
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011433# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11435$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011438if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439 withval=$with_pymalloc;
11440fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011441
Neil Schemenauera35c6882001-02-27 04:45:05 +000011442
Neil Schemenauer16c22972002-03-22 15:34:49 +000011443if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011444then
11445 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011446fi
11447if test "$with_pymalloc" != "no"
11448then
Martin v. Löwis11437992002-04-12 09:54:03 +000011449
Matthias Kloseb9621712010-04-24 17:59:49 +000011450$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011451
11452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11454$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011455
Nick Coghlan6ea41862017-06-11 13:16:15 +100011456# Check for --with-c-locale-coercion
11457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11458$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11459
11460# Check whether --with-c-locale-coercion was given.
11461if test "${with_c_locale_coercion+set}" = set; then :
11462 withval=$with_c_locale_coercion;
11463fi
11464
11465
11466if test -z "$with_c_locale_coercion"
11467then
11468 with_c_locale_coercion="yes"
11469fi
11470if test "$with_c_locale_coercion" != "no"
11471then
11472
11473$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11474
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11477$as_echo "$with_c_locale_coercion" >&6; }
11478
Benjamin Peterson05159c42009-12-03 03:01:27 +000011479# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11481$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011482
11483# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011485 withval=$with_valgrind;
11486else
11487 with_valgrind=no
11488fi
11489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11491$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011492if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 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 +020011494if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011495
Matthias Kloseb9621712010-04-24 17:59:49 +000011496$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011497
11498else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011499 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011500
11501fi
11502
11503
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011504 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011505fi
11506
Łukasz Langaa785c872016-09-09 17:37:37 -070011507# Check for DTrace support
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11509$as_echo_n "checking for --with-dtrace... " >&6; }
11510
11511# Check whether --with-dtrace was given.
11512if test "${with_dtrace+set}" = set; then :
11513 withval=$with_dtrace;
11514else
11515 with_dtrace=no
11516fi
11517
11518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11519$as_echo "$with_dtrace" >&6; }
11520
11521
11522
11523
11524
11525DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011526DTRACE_HEADERS=
11527DTRACE_OBJS=
11528
11529if test "$with_dtrace" = "yes"
11530then
11531 # Extract the first word of "dtrace", so it can be a program name with args.
11532set dummy dtrace; ac_word=$2
11533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11534$as_echo_n "checking for $ac_word... " >&6; }
11535if ${ac_cv_path_DTRACE+:} false; then :
11536 $as_echo_n "(cached) " >&6
11537else
11538 case $DTRACE in
11539 [\\/]* | ?:[\\/]*)
11540 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11541 ;;
11542 *)
11543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11544for as_dir in $PATH
11545do
11546 IFS=$as_save_IFS
11547 test -z "$as_dir" && as_dir=.
11548 for ac_exec_ext in '' $ac_executable_extensions; do
11549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11550 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11552 break 2
11553 fi
11554done
11555 done
11556IFS=$as_save_IFS
11557
11558 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11559 ;;
11560esac
11561fi
11562DTRACE=$ac_cv_path_DTRACE
11563if test -n "$DTRACE"; then
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11565$as_echo "$DTRACE" >&6; }
11566else
11567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568$as_echo "no" >&6; }
11569fi
11570
11571
11572 if test "$DTRACE" = "not found"; then
11573 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11574 fi
11575
11576$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11577
11578 DTRACE_HEADERS="Include/pydtrace_probes.h"
11579
11580 # On OS X, DTrace providers do not need to be explicitly compiled and
11581 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11582 # generation flag '-G'. We check for presence of this flag, rather than
11583 # hardcoding support by OS, in the interest of robustness.
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11585$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11586if ${ac_cv_dtrace_link+:} false; then :
11587 $as_echo_n "(cached) " >&6
11588else
11589 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011590 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011591 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011592 ac_cv_dtrace_link=yes
11593
11594fi
11595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11596$as_echo "$ac_cv_dtrace_link" >&6; }
11597 if test "$ac_cv_dtrace_link" = "yes"; then
11598 DTRACE_OBJS="Python/pydtrace.o"
11599 fi
11600fi
11601
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011602# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011603
Guido van Rossum98935bf2001-09-05 19:13:16 +000011604DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011605
Guido van Rossume97ee181999-12-20 21:27:22 +000011606# the dlopen() function means we might want to use dynload_shlib.o. some
11607# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011608for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011609do :
11610 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011614_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011615
Guido van Rossume97ee181999-12-20 21:27:22 +000011616fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011617done
Guido van Rossume97ee181999-12-20 21:27:22 +000011618
Michael W. Hudson54241132001-12-07 15:38:26 +000011619
Guido van Rossume97ee181999-12-20 21:27:22 +000011620# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11621# loading of modules.
11622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11624$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011625if test -z "$DYNLOADFILE"
11626then
11627 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011628 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11629 if test "$ac_cv_func_dlopen" = yes
11630 then DYNLOADFILE="dynload_shlib.o"
11631 else DYNLOADFILE="dynload_aix.o"
11632 fi
11633 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011634 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011635 *)
11636 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11637 # out any dynamic loading
11638 if test "$ac_cv_func_dlopen" = yes
11639 then DYNLOADFILE="dynload_shlib.o"
11640 else DYNLOADFILE="dynload_stub.o"
11641 fi
11642 ;;
11643 esac
11644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11646$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011647if test "$DYNLOADFILE" != "dynload_stub.o"
11648then
Martin v. Löwis11437992002-04-12 09:54:03 +000011649
Matthias Kloseb9621712010-04-24 17:59:49 +000011650$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011651
11652fi
11653
Neil Schemenauer4e425612001-06-19 15:44:15 +000011654# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11655
Michael W. Hudson54241132001-12-07 15:38:26 +000011656
Matthias Kloseb9621712010-04-24 17:59:49 +000011657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11658$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011659if test -z "$MACHDEP_OBJS"
11660then
Jack Jansene578a632001-08-15 01:27:14 +000011661 MACHDEP_OBJS=$extra_machdep_objs
11662else
11663 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011664fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011665if test -z "$MACHDEP_OBJS"; then
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11667$as_echo "none" >&6; }
11668else
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11670$as_echo "$MACHDEP_OBJS" >&6; }
11671fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011672
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011674for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011675 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11676 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011677 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011678 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011679 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011680 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011681 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011682 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011683 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011684 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011685 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011686 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011687 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011688 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011689 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011690 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011691 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011692 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11693 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011694 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011695 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011696 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011697 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011698 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011699do :
11700 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11701ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011702if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011703 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011704#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011705_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011706
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011707fi
11708done
11709
Michael W. Hudson54241132001-12-07 15:38:26 +000011710
Benjamin Peterson40caa052018-09-12 15:52:40 -070011711# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11712# links. Some libc implementations have a stub lchmod implementation that always
11713# returns an error.
11714if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011715 for ac_func in lchmod
11716do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011717 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11718if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011719 cat >>confdefs.h <<_ACEOF
11720#define HAVE_LCHMOD 1
11721_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011722
11723fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011724done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011725
11726fi
11727
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011728ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11729 #include <dirent.h>
11730"
11731if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11732
11733$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11734
11735fi
11736
11737
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011738# For some functions, having a definition is not sufficient, since
11739# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11741$as_echo_n "checking for chroot... " >&6; }
11742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011744#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011745int
11746main ()
11747{
11748void *x=chroot
11749 ;
11750 return 0;
11751}
11752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011753if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011756
Matthias Kloseb159a552010-04-25 21:00:44 +000011757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011758$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011762
11763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11766$as_echo_n "checking for link... " >&6; }
11767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011768/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011769#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011770int
11771main ()
11772{
11773void *x=link
11774 ;
11775 return 0;
11776}
11777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011781
Matthias Kloseb159a552010-04-25 21:00:44 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011787
11788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11791$as_echo_n "checking for symlink... " >&6; }
11792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011793/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011794#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011795int
11796main ()
11797{
11798void *x=symlink
11799 ;
11800 return 0;
11801}
11802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011803if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011806
Matthias Kloseb159a552010-04-25 21:00:44 +000011807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011808$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11811$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011812
11813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11816$as_echo_n "checking for fchdir... " >&6; }
11817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011819#include <unistd.h>
11820int
11821main ()
11822{
11823void *x=fchdir
11824 ;
11825 return 0;
11826}
11827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011828if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011831
Matthias Kloseb159a552010-04-25 21:00:44 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011833$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11836$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011837
11838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11841$as_echo_n "checking for fsync... " >&6; }
11842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011843/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011844#include <unistd.h>
11845int
11846main ()
11847{
11848void *x=fsync
11849 ;
11850 return 0;
11851}
11852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011856
Matthias Kloseb159a552010-04-25 21:00:44 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011858$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011859else
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11861$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011862
11863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11866$as_echo_n "checking for fdatasync... " >&6; }
11867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011868/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011869#include <unistd.h>
11870int
11871main ()
11872{
11873void *x=fdatasync
11874 ;
11875 return 0;
11876}
11877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011881
Matthias Kloseb159a552010-04-25 21:00:44 +000011882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011883$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11886$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011887
11888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11891$as_echo_n "checking for epoll... " >&6; }
11892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011893/* end confdefs.h. */
11894#include <sys/epoll.h>
11895int
11896main ()
11897{
11898void *x=epoll_create
11899 ;
11900 return 0;
11901}
11902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011906
Matthias Kloseb159a552010-04-25 21:00:44 +000011907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011908$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011912
11913fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11916$as_echo_n "checking for epoll_create1... " >&6; }
11917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918/* end confdefs.h. */
11919#include <sys/epoll.h>
11920int
11921main ()
11922{
11923void *x=epoll_create1
11924 ;
11925 return 0;
11926}
11927_ACEOF
11928if ac_fn_c_try_compile "$LINENO"; then :
11929
11930$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11931
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11933$as_echo "yes" >&6; }
11934else
11935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11936$as_echo "no" >&6; }
11937
11938fi
11939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11941$as_echo_n "checking for kqueue... " >&6; }
11942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011943/* end confdefs.h. */
11944
11945#include <sys/types.h>
11946#include <sys/event.h>
11947
11948int
11949main ()
11950{
11951int x=kqueue()
11952 ;
11953 return 0;
11954}
11955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011956if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011959
Matthias Kloseb159a552010-04-25 21:00:44 +000011960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11964$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011965
11966fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11969$as_echo_n "checking for prlimit... " >&6; }
11970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971/* end confdefs.h. */
11972
11973#include <sys/time.h>
11974#include <sys/resource.h>
11975
11976int
11977main ()
11978{
11979void *x=prlimit
11980 ;
11981 return 0;
11982}
11983_ACEOF
11984if ac_fn_c_try_compile "$LINENO"; then :
11985
11986$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11987
11988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11989$as_echo "yes" >&6; }
11990else
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
11993
11994fi
11995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11996
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11998$as_echo_n "checking for memfd_create... " >&6; }
11999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12000/* end confdefs.h. */
12001
12002#ifdef HAVE_SYS_MMAN_H
12003#include <sys/mman.h>
12004#endif
12005#ifdef HAVE_SYS_MEMFD_H
12006#include <sys/memfd.h>
12007#endif
12008
12009int
12010main ()
12011{
12012void *x=memfd_create
12013 ;
12014 return 0;
12015}
12016_ACEOF
12017if ac_fn_c_try_compile "$LINENO"; then :
12018
12019$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12020
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12022$as_echo "yes" >&6; }
12023else
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12025$as_echo "no" >&6; }
12026
12027fi
12028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12029
Martin v. Löwisd5843682002-11-21 20:41:28 +000012030# On some systems (eg. FreeBSD 5), we would find a definition of the
12031# functions ctermid_r, setgroups in the library, but no prototype
12032# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12033# address to avoid compiler warnings and potential miscompilations
12034# because of the missing prototypes.
12035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12037$as_echo_n "checking for ctermid_r... " >&6; }
12038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012039/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012040
Martin v. Löwisd5843682002-11-21 20:41:28 +000012041#include <stdio.h>
12042
Martin v. Löwisd5843682002-11-21 20:41:28 +000012043int
12044main ()
12045{
12046void* p = ctermid_r
12047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012054
Matthias Kloseb159a552010-04-25 21:00:44 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012060
12061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12063
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12065$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012066if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012067 $as_echo_n "(cached) " >&6
12068else
12069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012070/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012071#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012072int
12073main ()
12074{
12075void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012076
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012077 ;
12078 return 0;
12079}
12080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012081if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012082 ac_cv_flock_decl=yes
12083else
12084 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012085
12086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012088
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012089fi
12090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12091$as_echo "$ac_cv_flock_decl" >&6; }
12092if test "x${ac_cv_flock_decl}" = xyes; then
12093 for ac_func in flock
12094do :
12095 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012097 cat >>confdefs.h <<_ACEOF
12098#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012099_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012100
Antoine Pitroua3000072010-09-07 14:52:42 +000012101else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012103$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012105 $as_echo_n "(cached) " >&6
12106else
12107 ac_check_lib_save_LIBS=$LIBS
12108LIBS="-lbsd $LIBS"
12109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12110/* end confdefs.h. */
12111
12112/* Override any GCC internal prototype to avoid an error.
12113 Use char because int might match the return type of a GCC
12114 builtin and then its argument prototype would still apply. */
12115#ifdef __cplusplus
12116extern "C"
12117#endif
12118char flock ();
12119int
12120main ()
12121{
12122return flock ();
12123 ;
12124 return 0;
12125}
12126_ACEOF
12127if ac_fn_c_try_link "$LINENO"; then :
12128 ac_cv_lib_bsd_flock=yes
12129else
12130 ac_cv_lib_bsd_flock=no
12131fi
12132rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
12134LIBS=$ac_check_lib_save_LIBS
12135fi
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12137$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012138if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012139 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012140
12141
12142$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12143
12144
12145fi
12146
12147
12148fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012149done
12150
Antoine Pitroua3000072010-09-07 14:52:42 +000012151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12154$as_echo_n "checking for getpagesize... " >&6; }
12155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012156/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012157
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012158#include <unistd.h>
12159
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012160int
12161main ()
12162{
12163void* p = getpagesize
12164 ;
12165 return 0;
12166}
12167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012171
Matthias Kloseb159a552010-04-25 21:00:44 +000012172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012174else
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12176$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012177
12178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012180
Victor Stinner984890f2011-11-24 13:53:38 +010012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12182$as_echo_n "checking for broken unsetenv... " >&6; }
12183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12184/* end confdefs.h. */
12185
12186#include <stdlib.h>
12187
12188int
12189main ()
12190{
12191int res = unsetenv("DUMMY")
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196if ac_fn_c_try_compile "$LINENO"; then :
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12198$as_echo "no" >&6; }
12199else
12200
12201$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12202
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12204$as_echo "yes" >&6; }
12205
12206fi
12207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12208
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012209for ac_prog in true
12210do
12211 # Extract the first word of "$ac_prog", so it can be a program name with args.
12212set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12214$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012215if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012217else
12218 if test -n "$TRUE"; then
12219 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12220else
12221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12222for as_dir in $PATH
12223do
12224 IFS=$as_save_IFS
12225 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012228 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 $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 +000012230 break 2
12231 fi
12232done
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012235
12236fi
12237fi
12238TRUE=$ac_cv_prog_TRUE
12239if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12241$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012242else
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12244$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012245fi
12246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012248 test -n "$TRUE" && break
12249done
12250test -n "$TRUE" || TRUE="/bin/true"
12251
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12254$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012257else
12258 ac_check_lib_save_LIBS=$LIBS
12259LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012261/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263/* Override any GCC internal prototype to avoid an error.
12264 Use char because int might match the return type of a GCC
12265 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012266#ifdef __cplusplus
12267extern "C"
12268#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012269char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012270int
12271main ()
12272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012279 ac_cv_lib_c_inet_aton=yes
12280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283rm -f core conftest.err conftest.$ac_objext \
12284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012285LIBS=$ac_check_lib_save_LIBS
12286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12288$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012289if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012290 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012291else
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12293$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012294if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012296else
12297 ac_check_lib_save_LIBS=$LIBS
12298LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302/* Override any GCC internal prototype to avoid an error.
12303 Use char because int might match the return type of a GCC
12304 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012305#ifdef __cplusplus
12306extern "C"
12307#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012308char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012309int
12310main ()
12311{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012318 ac_cv_lib_resolv_inet_aton=yes
12319else
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012322rm -f core conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012324LIBS=$ac_check_lib_save_LIBS
12325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12327$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012329 cat >>confdefs.h <<_ACEOF
12330#define HAVE_LIBRESOLV 1
12331_ACEOF
12332
12333 LIBS="-lresolv $LIBS"
12334
12335fi
12336
12337
12338fi
12339
12340
Christian Heimesd0764e22007-12-04 15:00:33 +000012341# On Tru64, chflags seems to be present, but calling it will
12342# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12344$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012345if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012347else
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012349 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012350else
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012352/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012353
Christian Heimesd0764e22007-12-04 15:00:33 +000012354#include <sys/stat.h>
12355#include <unistd.h>
12356int main(int argc, char*argv[])
12357{
12358 if(chflags(argv[0], 0) != 0)
12359 return 1;
12360 return 0;
12361}
Ned Deily3eb67d52011-06-28 00:00:28 -070012362
Christian Heimesd0764e22007-12-04 15:00:33 +000012363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012365 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012366else
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12370 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012371fi
12372
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012373
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12376$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012377if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012379if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012380 ac_cv_have_chflags="yes"
12381else
12382 ac_cv_have_chflags="no"
12383fi
12384
12385fi
12386if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012389
12390fi
12391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12393$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012394if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012398 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012401/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012402
Christian Heimesd0764e22007-12-04 15:00:33 +000012403#include <sys/stat.h>
12404#include <unistd.h>
12405int main(int argc, char*argv[])
12406{
12407 if(lchflags(argv[0], 0) != 0)
12408 return 1;
12409 return 0;
12410}
Ned Deily3eb67d52011-06-28 00:00:28 -070012411
Christian Heimesd0764e22007-12-04 15:00:33 +000012412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012414 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012415else
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012420fi
12421
12422
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12425$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012426if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012428if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012429 ac_cv_have_lchflags="yes"
12430else
12431 ac_cv_have_lchflags="no"
12432fi
12433
12434fi
12435if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012436
Matthias Kloseb9621712010-04-24 17:59:49 +000012437$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012438
12439fi
12440
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012441case $ac_sys_system/$ac_sys_release in
12442Darwin/*)
12443 _CUR_CFLAGS="${CFLAGS}"
12444 _CUR_LDFLAGS="${LDFLAGS}"
12445 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12446 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12447 ;;
12448esac
12449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12451$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012452if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012454else
12455 ac_check_lib_save_LIBS=$LIBS
12456LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012458/* end confdefs.h. */
12459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460/* Override any GCC internal prototype to avoid an error.
12461 Use char because int might match the return type of a GCC
12462 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012463#ifdef __cplusplus
12464extern "C"
12465#endif
12466char inflateCopy ();
12467int
12468main ()
12469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012471 ;
12472 return 0;
12473}
12474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012476 ac_cv_lib_z_inflateCopy=yes
12477else
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012480rm -f core conftest.err conftest.$ac_objext \
12481 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012482LIBS=$ac_check_lib_save_LIBS
12483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12485$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012486if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012489
12490fi
12491
12492
12493case $ac_sys_system/$ac_sys_release in
12494Darwin/*)
12495 CFLAGS="${_CUR_CFLAGS}"
12496 LDFLAGS="${_CUR_LDFLAGS}"
12497 ;;
12498esac
12499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12501$as_echo_n "checking for hstrerror... " >&6; }
12502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012504
Martin v. Löwise9416172003-05-03 10:12:45 +000012505#include <netdb.h>
12506
Martin v. Löwise9416172003-05-03 10:12:45 +000012507int
12508main ()
12509{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012510void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012511 ;
12512 return 0;
12513}
12514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012518
Matthias Kloseb159a552010-04-25 21:00:44 +000012519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012520$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012524
12525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012526rm -f core conftest.err conftest.$ac_objext \
12527 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528
Matthias Kloseb9621712010-04-24 17:59:49 +000012529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12530$as_echo_n "checking for inet_aton... " >&6; }
12531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012532/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012533
Martin v. Löwis86d66262006-02-17 08:40:11 +000012534#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012535#include <sys/socket.h>
12536#include <netinet/in.h>
12537#include <arpa/inet.h>
12538
Martin v. Löwise9416172003-05-03 10:12:45 +000012539int
12540main ()
12541{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012542void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012543 ;
12544 return 0;
12545}
12546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012550
Matthias Kloseb159a552010-04-25 21:00:44 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012552$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012553else
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012556
12557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560
Matthias Kloseb9621712010-04-24 17:59:49 +000012561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12562$as_echo_n "checking for inet_pton... " >&6; }
12563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012564/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012565
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012566#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012567#include <sys/socket.h>
12568#include <netinet/in.h>
12569#include <arpa/inet.h>
12570
Martin v. Löwise9416172003-05-03 10:12:45 +000012571int
12572main ()
12573{
12574void* p = inet_pton
12575 ;
12576 return 0;
12577}
12578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012582
Matthias Kloseb159a552010-04-25 21:00:44 +000012583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012584$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012585else
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12587$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012588
12589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012591
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012592# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12594$as_echo_n "checking for setgroups... " >&6; }
12595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012596/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012597
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012598#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012599#ifdef HAVE_GRP_H
12600#include <grp.h>
12601#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012602
Martin v. Löwisd5843682002-11-21 20:41:28 +000012603int
12604main ()
12605{
12606void* p = setgroups
12607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012614
Matthias Kloseb159a552010-04-25 21:00:44 +000012615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012616$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012617else
Matthias Kloseb9621712010-04-24 17:59:49 +000012618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12619$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012620
12621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012623
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012624# check for openpty and forkpty
12625
12626for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012627do :
12628 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012629if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012632_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012633
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012634else
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12636$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012637if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012639else
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012641LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645/* Override any GCC internal prototype to avoid an error.
12646 Use char because int might match the return type of a GCC
12647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012648#ifdef __cplusplus
12649extern "C"
12650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012651char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ;
12657 return 0;
12658}
12659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012662else
Matthias Kloseb9621712010-04-24 17:59:49 +000012663 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012665rm -f core conftest.err conftest.$ac_objext \
12666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012667LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12670$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012671if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012673 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12676$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012677if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012679else
12680 ac_check_lib_save_LIBS=$LIBS
12681LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012683/* end confdefs.h. */
12684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685/* Override any GCC internal prototype to avoid an error.
12686 Use char because int might match the return type of a GCC
12687 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012688#ifdef __cplusplus
12689extern "C"
12690#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012691char openpty ();
12692int
12693main ()
12694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012701 ac_cv_lib_bsd_openpty=yes
12702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012705rm -f core conftest.err conftest.$ac_objext \
12706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012707LIBS=$ac_check_lib_save_LIBS
12708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12710$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012711if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012713 LIBS="$LIBS -lbsd"
12714fi
12715
12716
12717fi
12718
Fred Drake8cef4cf2000-06-28 16:40:38 +000012719
12720fi
12721done
12722
12723for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012724do :
12725 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012726if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012729_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012730
Fred Drake8cef4cf2000-06-28 16:40:38 +000012731else
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12733$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012734if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012736else
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012738LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742/* Override any GCC internal prototype to avoid an error.
12743 Use char because int might match the return type of a GCC
12744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012745#ifdef __cplusplus
12746extern "C"
12747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012748char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012749int
12750main ()
12751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ;
12754 return 0;
12755}
12756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012759else
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012762rm -f core conftest.err conftest.$ac_objext \
12763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012764LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12767$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012768if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012770 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012771else
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12773$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012776else
12777 ac_check_lib_save_LIBS=$LIBS
12778LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012780/* end confdefs.h. */
12781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782/* Override any GCC internal prototype to avoid an error.
12783 Use char because int might match the return type of a GCC
12784 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012785#ifdef __cplusplus
12786extern "C"
12787#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012788char forkpty ();
12789int
12790main ()
12791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012798 ac_cv_lib_bsd_forkpty=yes
12799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012802rm -f core conftest.err conftest.$ac_objext \
12803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012804LIBS=$ac_check_lib_save_LIBS
12805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12807$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012808if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012810 LIBS="$LIBS -lbsd"
12811fi
12812
12813
12814fi
12815
Fred Drake8cef4cf2000-06-28 16:40:38 +000012816
12817fi
12818done
12819
Jack Jansendd19cf82001-12-06 22:36:17 +000012820
Michael W. Hudson54241132001-12-07 15:38:26 +000012821# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012822for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012823do :
12824 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12825ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012826if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012829_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012831fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012832done
12833
Michael W. Hudson54241132001-12-07 15:38:26 +000012834
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012835ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012836if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012837 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012838
Martin v. Löwis1142de32002-03-29 16:28:31 +000012839else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012841 *" dup2.$ac_objext "* ) ;;
12842 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012844esac
12845
Martin v. Löwis1142de32002-03-29 16:28:31 +000012846fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012847
Martin v. Löwis1142de32002-03-29 16:28:31 +000012848
12849for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012850do :
12851 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012852if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012853 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012862getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012863 ;
12864 return 0;
12865}
12866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012868
Matthias Kloseb9621712010-04-24 17:59:49 +000012869$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012870
Guido van Rossum627b2d71993-12-24 10:39:16 +000012871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012873
Guido van Rossum627b2d71993-12-24 10:39:16 +000012874fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012875done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012876
Jack Jansen150753c2003-03-29 22:07:47 +000012877for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012878do :
12879 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012880if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012881 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012886#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012887int
12888main ()
12889{
12890setpgrp(0,0);
12891 ;
12892 return 0;
12893}
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012898
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012901
12902fi
12903done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012904
Michael W. Hudson54241132001-12-07 15:38:26 +000012905
Gregory P. Smith387512c2018-12-30 15:42:32 -080012906# We search for both crypt and crypt_r as one or the other may be defined
12907# This gets us our -lcrypt in LIBS when required on the target platform.
12908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12909$as_echo_n "checking for library containing crypt... " >&6; }
12910if ${ac_cv_search_crypt+:} false; then :
12911 $as_echo_n "(cached) " >&6
12912else
12913 ac_func_search_save_LIBS=$LIBS
12914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12915/* end confdefs.h. */
12916
12917/* Override any GCC internal prototype to avoid an error.
12918 Use char because int might match the return type of a GCC
12919 builtin and then its argument prototype would still apply. */
12920#ifdef __cplusplus
12921extern "C"
12922#endif
12923char crypt ();
12924int
12925main ()
12926{
12927return crypt ();
12928 ;
12929 return 0;
12930}
12931_ACEOF
12932for ac_lib in '' crypt; do
12933 if test -z "$ac_lib"; then
12934 ac_res="none required"
12935 else
12936 ac_res=-l$ac_lib
12937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12938 fi
12939 if ac_fn_c_try_link "$LINENO"; then :
12940 ac_cv_search_crypt=$ac_res
12941fi
12942rm -f core conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext
12944 if ${ac_cv_search_crypt+:} false; then :
12945 break
12946fi
12947done
12948if ${ac_cv_search_crypt+:} false; then :
12949
12950else
12951 ac_cv_search_crypt=no
12952fi
12953rm conftest.$ac_ext
12954LIBS=$ac_func_search_save_LIBS
12955fi
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12957$as_echo "$ac_cv_search_crypt" >&6; }
12958ac_res=$ac_cv_search_crypt
12959if test "$ac_res" != no; then :
12960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12961
12962fi
12963
12964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12965$as_echo_n "checking for library containing crypt_r... " >&6; }
12966if ${ac_cv_search_crypt_r+:} false; then :
12967 $as_echo_n "(cached) " >&6
12968else
12969 ac_func_search_save_LIBS=$LIBS
12970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12971/* end confdefs.h. */
12972
12973/* Override any GCC internal prototype to avoid an error.
12974 Use char because int might match the return type of a GCC
12975 builtin and then its argument prototype would still apply. */
12976#ifdef __cplusplus
12977extern "C"
12978#endif
12979char crypt_r ();
12980int
12981main ()
12982{
12983return crypt_r ();
12984 ;
12985 return 0;
12986}
12987_ACEOF
12988for ac_lib in '' crypt; do
12989 if test -z "$ac_lib"; then
12990 ac_res="none required"
12991 else
12992 ac_res=-l$ac_lib
12993 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12994 fi
12995 if ac_fn_c_try_link "$LINENO"; then :
12996 ac_cv_search_crypt_r=$ac_res
12997fi
12998rm -f core conftest.err conftest.$ac_objext \
12999 conftest$ac_exeext
13000 if ${ac_cv_search_crypt_r+:} false; then :
13001 break
13002fi
13003done
13004if ${ac_cv_search_crypt_r+:} false; then :
13005
13006else
13007 ac_cv_search_crypt_r=no
13008fi
13009rm conftest.$ac_ext
13010LIBS=$ac_func_search_save_LIBS
13011fi
13012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13013$as_echo "$ac_cv_search_crypt_r" >&6; }
13014ac_res=$ac_cv_search_crypt_r
13015if test "$ac_res" != no; then :
13016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13017
13018fi
13019
13020
13021ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13022if test "x$ac_cv_func_crypt_r" = xyes; then :
13023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024/* end confdefs.h. */
13025
13026#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13027#include <crypt.h>
13028
13029int
13030main ()
13031{
13032
13033struct crypt_data d;
13034char *r = crypt_r("", "", &d);
13035
13036 ;
13037 return 0;
13038}
13039_ACEOF
13040if ac_fn_c_try_compile "$LINENO"; then :
13041
13042$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13043
13044fi
13045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13046
13047fi
13048
13049
Victor Stinnere0be4232011-10-25 13:06:09 +020013050for ac_func in clock_gettime
13051do :
13052 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13053if test "x$ac_cv_func_clock_gettime" = xyes; then :
13054 cat >>confdefs.h <<_ACEOF
13055#define HAVE_CLOCK_GETTIME 1
13056_ACEOF
13057
13058else
13059
13060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13061$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13062if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13063 $as_echo_n "(cached) " >&6
13064else
13065 ac_check_lib_save_LIBS=$LIBS
13066LIBS="-lrt $LIBS"
13067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13068/* end confdefs.h. */
13069
13070/* Override any GCC internal prototype to avoid an error.
13071 Use char because int might match the return type of a GCC
13072 builtin and then its argument prototype would still apply. */
13073#ifdef __cplusplus
13074extern "C"
13075#endif
13076char clock_gettime ();
13077int
13078main ()
13079{
13080return clock_gettime ();
13081 ;
13082 return 0;
13083}
13084_ACEOF
13085if ac_fn_c_try_link "$LINENO"; then :
13086 ac_cv_lib_rt_clock_gettime=yes
13087else
13088 ac_cv_lib_rt_clock_gettime=no
13089fi
13090rm -f core conftest.err conftest.$ac_objext \
13091 conftest$ac_exeext conftest.$ac_ext
13092LIBS=$ac_check_lib_save_LIBS
13093fi
13094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13095$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13096if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13097
Victor Stinner7efb8332014-08-29 15:41:08 +020013098 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013099 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13100
13101
13102$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13103
13104
13105fi
13106
13107
13108fi
13109done
13110
13111
13112for ac_func in clock_getres
13113do :
13114 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13115if test "x$ac_cv_func_clock_getres" = xyes; then :
13116 cat >>confdefs.h <<_ACEOF
13117#define HAVE_CLOCK_GETRES 1
13118_ACEOF
13119
13120else
13121
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13123$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13124if ${ac_cv_lib_rt_clock_getres+:} false; then :
13125 $as_echo_n "(cached) " >&6
13126else
13127 ac_check_lib_save_LIBS=$LIBS
13128LIBS="-lrt $LIBS"
13129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130/* end confdefs.h. */
13131
13132/* Override any GCC internal prototype to avoid an error.
13133 Use char because int might match the return type of a GCC
13134 builtin and then its argument prototype would still apply. */
13135#ifdef __cplusplus
13136extern "C"
13137#endif
13138char clock_getres ();
13139int
13140main ()
13141{
13142return clock_getres ();
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147if ac_fn_c_try_link "$LINENO"; then :
13148 ac_cv_lib_rt_clock_getres=yes
13149else
13150 ac_cv_lib_rt_clock_getres=no
13151fi
13152rm -f core conftest.err conftest.$ac_objext \
13153 conftest$ac_exeext conftest.$ac_ext
13154LIBS=$ac_check_lib_save_LIBS
13155fi
13156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13157$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13158if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13159
13160 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13161
13162
13163fi
13164
13165
13166fi
13167done
13168
13169
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013170for ac_func in clock_settime
13171do :
13172 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13173if test "x$ac_cv_func_clock_settime" = xyes; then :
13174 cat >>confdefs.h <<_ACEOF
13175#define HAVE_CLOCK_SETTIME 1
13176_ACEOF
13177
13178else
13179
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13181$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13182if ${ac_cv_lib_rt_clock_settime+:} false; then :
13183 $as_echo_n "(cached) " >&6
13184else
13185 ac_check_lib_save_LIBS=$LIBS
13186LIBS="-lrt $LIBS"
13187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188/* end confdefs.h. */
13189
13190/* Override any GCC internal prototype to avoid an error.
13191 Use char because int might match the return type of a GCC
13192 builtin and then its argument prototype would still apply. */
13193#ifdef __cplusplus
13194extern "C"
13195#endif
13196char clock_settime ();
13197int
13198main ()
13199{
13200return clock_settime ();
13201 ;
13202 return 0;
13203}
13204_ACEOF
13205if ac_fn_c_try_link "$LINENO"; then :
13206 ac_cv_lib_rt_clock_settime=yes
13207else
13208 ac_cv_lib_rt_clock_settime=no
13209fi
13210rm -f core conftest.err conftest.$ac_objext \
13211 conftest$ac_exeext conftest.$ac_ext
13212LIBS=$ac_check_lib_save_LIBS
13213fi
13214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13215$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13216if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13217
13218 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13219
13220
13221fi
13222
13223
13224fi
13225done
13226
13227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13229$as_echo_n "checking for major... " >&6; }
13230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013232
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013233#if defined(MAJOR_IN_MKDEV)
13234#include <sys/mkdev.h>
13235#elif defined(MAJOR_IN_SYSMACROS)
13236#include <sys/sysmacros.h>
13237#else
13238#include <sys/types.h>
13239#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013240
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013241int
13242main ()
13243{
13244
13245 makedev(major(0),minor(0));
13246
13247 ;
13248 return 0;
13249}
13250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013251if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013252
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13257$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013258
13259else
Skip Montanaro6dead952003-09-25 14:50:04 +000013260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13262$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013263
13264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013265rm -f core conftest.err conftest.$ac_objext \
13266 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013267
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013268# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013269# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13271$as_echo_n "checking for getaddrinfo... " >&6; }
13272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013273/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013274
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013275#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013276#include <sys/socket.h>
13277#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013278#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279
Martin v. Löwis11437992002-04-12 09:54:03 +000013280int
13281main ()
13282{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013283getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289 have_getaddrinfo=yes
13290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013293rm -f core conftest.err conftest.$ac_objext \
13294 conftest$ac_exeext conftest.$ac_ext
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13296$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013297if test $have_getaddrinfo = yes
13298then
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13300$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013301 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013305
13306if test "${enable_ipv6+set}" = set; then
13307 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13308else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013309 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013310fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013314
Stefan Krah19c21392012-11-22 23:47:32 +010013315#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316#include <sys/types.h>
13317#include <netdb.h>
13318#include <string.h>
13319#include <sys/socket.h>
13320#include <netinet/in.h>
13321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013323{
13324 int passive, gaierr, inet4 = 0, inet6 = 0;
13325 struct addrinfo hints, *ai, *aitop;
13326 char straddr[INET6_ADDRSTRLEN], strport[16];
13327
13328 for (passive = 0; passive <= 1; passive++) {
13329 memset(&hints, 0, sizeof(hints));
13330 hints.ai_family = AF_UNSPEC;
13331 hints.ai_flags = passive ? AI_PASSIVE : 0;
13332 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013333 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013334 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13335 (void)gai_strerror(gaierr);
13336 goto bad;
13337 }
13338 for (ai = aitop; ai; ai = ai->ai_next) {
13339 if (ai->ai_addr == NULL ||
13340 ai->ai_addrlen == 0 ||
13341 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13342 straddr, sizeof(straddr), strport, sizeof(strport),
13343 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13344 goto bad;
13345 }
13346 switch (ai->ai_family) {
13347 case AF_INET:
13348 if (strcmp(strport, "54321") != 0) {
13349 goto bad;
13350 }
13351 if (passive) {
13352 if (strcmp(straddr, "0.0.0.0") != 0) {
13353 goto bad;
13354 }
13355 } else {
13356 if (strcmp(straddr, "127.0.0.1") != 0) {
13357 goto bad;
13358 }
13359 }
13360 inet4++;
13361 break;
13362 case AF_INET6:
13363 if (strcmp(strport, "54321") != 0) {
13364 goto bad;
13365 }
13366 if (passive) {
13367 if (strcmp(straddr, "::") != 0) {
13368 goto bad;
13369 }
13370 } else {
13371 if (strcmp(straddr, "::1") != 0) {
13372 goto bad;
13373 }
13374 }
13375 inet6++;
13376 break;
13377 case AF_UNSPEC:
13378 goto bad;
13379 break;
13380 default:
13381 /* another family support? */
13382 break;
13383 }
13384 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013385 freeaddrinfo(aitop);
13386 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013387 }
13388
13389 if (!(inet4 == 0 || inet4 == 2))
13390 goto bad;
13391 if (!(inet6 == 0 || inet6 == 2))
13392 goto bad;
13393
13394 if (aitop)
13395 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013396 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013397
13398 bad:
13399 if (aitop)
13400 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013401 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013402}
13403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013406 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13411 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013414fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013415
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13419$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13420
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013421if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013422then
13423 if test $ipv6 = yes
13424 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013425 echo 'Fatal: You must get working getaddrinfo() function.'
13426 echo ' or you can specify "--disable-ipv6"'.
13427 exit 1
13428 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013429else
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013432
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013433fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013434
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013435for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013436do :
13437 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013438if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013440#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013441_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013442
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013443fi
13444done
13445
Michael W. Hudson54241132001-12-07 15:38:26 +000013446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013447# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13449$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013450if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013454/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455#include <sys/types.h>
13456#include <sys/time.h>
13457#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
13462if ((struct tm *) 0)
13463return 0;
13464 ;
13465 return 0;
13466}
13467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013469 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13476$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013477if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013478
Matthias Kloseb9621712010-04-24 17:59:49 +000013479$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480
13481fi
13482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13484$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013485if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487else
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490#include <sys/types.h>
13491#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493int
13494main ()
13495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496struct tm tm;
13497 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ;
13500 return 0;
13501}
13502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013503if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504 ac_cv_struct_tm=time.h
13505else
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13511$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013512if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515
13516fi
13517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518ac_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 +000013519#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521"
Victor Stinnere0be4232011-10-25 13:06:09 +020013522if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
13524cat >>confdefs.h <<_ACEOF
13525#define HAVE_STRUCT_TM_TM_ZONE 1
13526_ACEOF
13527
13528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534
13535else
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13537"
Victor Stinnere0be4232011-10-25 13:06:09 +020013538if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013542fi
13543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013545#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546_ACEOF
13547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13549$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013550if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552else
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013554/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013555#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556#if !HAVE_DECL_TZNAME
13557extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560int
13561main ()
13562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563return tzname[0][0];
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_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569 ac_cv_var_tzname=yes
13570else
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013573rm -f core conftest.err conftest.$ac_objext \
13574 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13577$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013578 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013582 fi
13583fi
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585ac_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 +020013586if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
13588cat >>confdefs.h <<_ACEOF
13589#define HAVE_STRUCT_STAT_ST_RDEV 1
13590_ACEOF
13591
13592
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013593fi
13594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595ac_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 +020013596if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013597
Martin v. Löwis11437992002-04-12 09:54:03 +000013598cat >>confdefs.h <<_ACEOF
13599#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13600_ACEOF
13601
13602
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013603fi
13604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605ac_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 +020013606if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013607
13608cat >>confdefs.h <<_ACEOF
13609#define HAVE_STRUCT_STAT_ST_FLAGS 1
13610_ACEOF
13611
13612
13613fi
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615ac_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 +020013616if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013617
13618cat >>confdefs.h <<_ACEOF
13619#define HAVE_STRUCT_STAT_ST_GEN 1
13620_ACEOF
13621
13622
13623fi
13624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625ac_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 +020013626if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013627
13628cat >>confdefs.h <<_ACEOF
13629#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13630_ACEOF
13631
13632
13633fi
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635ac_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 +020013636if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013637
Martin v. Löwis11437992002-04-12 09:54:03 +000013638cat >>confdefs.h <<_ACEOF
13639#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13640_ACEOF
13641
13642
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013643fi
13644
Stefan Krah267b6392016-04-26 01:09:18 +020013645ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13646 #include <sys/types.h>
13647 #include <pwd.h>
13648
13649"
13650if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13651
13652cat >>confdefs.h <<_ACEOF
13653#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13654_ACEOF
13655
13656
13657fi
13658ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13659 #include <sys/types.h>
13660 #include <pwd.h>
13661
13662"
13663if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13664
13665cat >>confdefs.h <<_ACEOF
13666#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13667_ACEOF
13668
13669
13670fi
13671
Zachary Ware6a6967e2016-10-01 00:47:27 -050013672# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13673ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13674"
13675if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13676
13677cat >>confdefs.h <<_ACEOF
13678#define HAVE_SIGINFO_T_SI_BAND 1
13679_ACEOF
13680
13681
13682fi
13683
Michael W. Hudson54241132001-12-07 15:38:26 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13686$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013687if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013689else
Matthias Kloseb159a552010-04-25 21:00:44 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013692/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013693#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013694int
13695main ()
13696{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013697return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ;
13699 return 0;
13700}
13701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013703 ac_cv_header_time_altzone=yes
13704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709fi
13710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13712$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716
13717fi
13718
Guido van Rossumda88dad1995-01-26 00:46:29 +000013719was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13721$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013723/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013724
13725#include <sys/types.h>
13726#include <sys/select.h>
13727#include <sys/time.h>
13728
Martin v. Löwis11437992002-04-12 09:54:03 +000013729int
13730main ()
13731{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732;
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 ;
13734 return 0;
13735}
13736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
13739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013742 was_it_defined=yes
13743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13747$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13750$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013751if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013753else
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013755/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013756#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013757int
13758main ()
13759{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013760struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ;
13762 return 0;
13763}
13764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013766 ac_cv_struct_addrinfo=yes
13767else
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13771fi
13772
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13774$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013775if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013778
13779fi
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13782$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013783if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013787/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013788
13789# include <sys/types.h>
13790# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013791int
13792main ()
13793{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013794struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 ;
13796 return 0;
13797}
13798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013800 ac_cv_struct_sockaddr_storage=yes
13801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13805fi
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13808$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013809if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013812
13813fi
13814
Christian Heimesdffa3942016-09-05 23:54:41 +020013815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13816$as_echo_n "checking for sockaddr_alg... " >&6; }
13817if ${ac_cv_struct_sockaddr_alg+:} false; then :
13818 $as_echo_n "(cached) " >&6
13819else
13820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821/* end confdefs.h. */
13822
13823# include <sys/types.h>
13824# include <sys/socket.h>
13825# include <linux/if_alg.h>
13826int
13827main ()
13828{
13829struct sockaddr_alg s
13830 ;
13831 return 0;
13832}
13833_ACEOF
13834if ac_fn_c_try_compile "$LINENO"; then :
13835 ac_cv_struct_sockaddr_alg=yes
13836else
13837 ac_cv_struct_sockaddr_alg=no
13838fi
13839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13840fi
13841
13842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13843$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13844if test $ac_cv_struct_sockaddr_alg = yes; then
13845
13846$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13847
13848fi
13849
Guido van Rossum627b2d71993-12-24 10:39:16 +000013850# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13853$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013854if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013859$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013860int
13861main ()
13862{
13863static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013864test_array [0] = 0;
13865return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
13867 ;
13868 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013869}
Martin v. Löwis11437992002-04-12 09:54:03 +000013870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013872 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13879$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013880if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882
13883fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13886$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013887if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013891/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013892
Martin v. Löwis11437992002-04-12 09:54:03 +000013893int
13894main ()
13895{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013896
Martin v. Löwis11437992002-04-12 09:54:03 +000013897#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013898 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013900 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 char const *const *pcpcc;
13903 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 /* NEC SVR4.0.2 mips cc rejects this. */
13905 struct point {int x, y;};
13906 static struct point const zero = {0,0};
13907 /* AIX XL C 1.02.0.0 rejects this.
13908 It does not let you subtract one const X* pointer from another in
13909 an arm of an if-expression whose if-part is not a constant
13910 expression */
13911 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 ++pcpcc;
13915 ppc = (char**) pcpcc;
13916 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013917 { /* SCO 3.2v4 cc rejects this sort of thing. */
13918 char tx;
13919 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 }
13925 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13926 int x[] = {25, 17};
13927 const int *foo = &x[0];
13928 ++foo;
13929 }
13930 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13931 typedef const int *iptr;
13932 iptr p = 0;
13933 ++p;
13934 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013935 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013937 struct s { int j; const int *ap[3]; } bx;
13938 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 }
13940 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13941 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013945#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013946
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ;
13948 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013949}
Martin v. Löwis11437992002-04-12 09:54:03 +000013950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952 ac_cv_c_const=yes
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13959$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013963
13964fi
13965
Michael W. Hudson54241132001-12-07 15:38:26 +000013966
Guido van Rossumda88dad1995-01-26 00:46:29 +000013967works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13969$as_echo_n "checking for working signed char... " >&6; }
13970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973int
13974main ()
13975{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013976signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013982 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013983else
Skip Montanaro6dead952003-09-25 14:50:04 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013986
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013987
Guido van Rossum7f43da71994-08-01 12:15:30 +000013988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13991$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013992
Guido van Rossumda88dad1995-01-26 00:46:29 +000013993have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13995$as_echo_n "checking for prototypes... " >&6; }
13996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013997/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013998int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013999int
14000main ()
14001{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014002return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014003 ;
14004 return 0;
14005}
14006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Matthias Kloseb159a552010-04-25 21:00:44 +000014011 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14015$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016
Guido van Rossumda88dad1995-01-26 00:46:29 +000014017works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14019$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014021/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014022
14023#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014024int foo(int x, ...) {
14025 va_list va;
14026 va_start(va, x);
14027 va_arg(va, int);
14028 va_arg(va, char *);
14029 va_arg(va, double);
14030 return 0;
14031}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033int
14034main ()
14035{
Guido van Rossum90eea071996-08-30 20:58:57 +000014036return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 ;
14038 return 0;
14039}
14040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
14043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014046 works=yes
14047
Guido van Rossum627b2d71993-12-24 10:39:16 +000014048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14051$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052
Martin v. Löwisd6320502004-08-12 13:45:08 +000014053# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14055$as_echo_n "checking for socketpair... " >&6; }
14056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014057/* end confdefs.h. */
14058
14059#include <sys/types.h>
14060#include <sys/socket.h>
14061
14062int
14063main ()
14064{
14065void *x=socketpair
14066 ;
14067 return 0;
14068}
14069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014070if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014073
Matthias Kloseb159a552010-04-25 21:00:44 +000014074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014075$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14078$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014079
14080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014082
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014083# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14085$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014087/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014088#include <sys/types.h>
14089#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014090int
14091main ()
14092{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014093struct sockaddr x;
14094x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 ;
14096 return 0;
14097}
14098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014099if ac_fn_c_try_compile "$LINENO"; then :
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14101$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014104
14105else
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14107$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014108
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014111
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014113
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014116if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14121$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014122 OLD_CFLAGS=$CFLAGS
14123 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014125/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014126
14127# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Martin v. Löwis11437992002-04-12 09:54:03 +000014129int
14130main ()
14131{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132
14133 char *name;
14134 struct hostent *he, *res;
14135 char buffer[2048];
14136 int buflen = 2048;
14137 int h_errnop;
14138
14139 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014140
14141 ;
14142 return 0;
14143}
14144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014148
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14153$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014155else
Skip Montanaro6dead952003-09-25 14:50:04 +000014156
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14158$as_echo "no" >&6; }
14159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14160$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014163
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014164# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166int
14167main ()
14168{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014169
14170 char *name;
14171 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014172 char buffer[2048];
14173 int buflen = 2048;
14174 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014175
Matthias Kloseb159a552010-04-25 21:00:44 +000014176 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
14178 ;
14179 return 0;
14180}
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014185
Martin v. Löwis11437992002-04-12 09:54:03 +000014186
Matthias Kloseb159a552010-04-25 21:00:44 +000014187$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014188
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14190$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014191
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014192else
Skip Montanaro6dead952003-09-25 14:50:04 +000014193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14195$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14197$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14199/* end confdefs.h. */
14200
14201# include <netdb.h>
14202
14203int
14204main ()
14205{
14206
14207 char *name;
14208 struct hostent *he;
14209 struct hostent_data data;
14210
14211 (void) gethostbyname_r(name, he, &data);
14212
14213 ;
14214 return 0;
14215}
14216_ACEOF
14217if ac_fn_c_try_compile "$LINENO"; then :
14218
14219 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14220
14221
14222$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14223
14224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14225$as_echo "yes" >&6; }
14226
14227else
14228
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14230$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014231
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014237
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014240 CFLAGS=$OLD_CFLAGS
14241
14242else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014243
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 for ac_func in gethostbyname
14245do :
14246 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014249#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014250_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014251
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014252fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014253done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014254
Michael W. Hudson54241132001-12-07 15:38:26 +000014255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014256fi
14257
Michael W. Hudson54241132001-12-07 15:38:26 +000014258
14259
14260
14261
14262
14263
Guido van Rossum627b2d71993-12-24 10:39:16 +000014264# checks for system services
14265# (none yet)
14266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014267# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014268ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014269if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014270
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014271else
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14273$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014274if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014276else
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014278LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282/* Override any GCC internal prototype to avoid an error.
14283 Use char because int might match the return type of a GCC
14284 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014285#ifdef __cplusplus
14286extern "C"
14287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014288char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014289int
14290main ()
14291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 ;
14294 return 0;
14295}
14296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014297if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014299else
Matthias Kloseb9621712010-04-24 17:59:49 +000014300 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014302rm -f core conftest.err conftest.$ac_objext \
14303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014304LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14307$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014308if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014309 cat >>confdefs.h <<_ACEOF
14310#define HAVE_LIBIEEE 1
14311_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014312
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014313 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014314
Guido van Rossum627b2d71993-12-24 10:39:16 +000014315fi
14316
Michael W. Hudson54241132001-12-07 15:38:26 +000014317
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014318fi
14319
Michael W. Hudson54241132001-12-07 15:38:26 +000014320
Guido van Rossum7f43da71994-08-01 12:15:30 +000014321# check for --with-libm=...
14322
Guido van Rossum563e7081996-09-10 18:20:48 +000014323case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014324Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014325*) LIBM=-lm
14326esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14328$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014331if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014333if test "$withval" = no
14334then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14336$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014337elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014338then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14340$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014341else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014342fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014343else
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14345$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346fi
14347
Guido van Rossum7f43da71994-08-01 12:15:30 +000014348
14349# check for --with-libc=...
14350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14352$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014355if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014357if test "$withval" = no
14358then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14360$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014361elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014362then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14364$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014365else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014366fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014367else
Matthias Kloseb9621712010-04-24 17:59:49 +000014368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14369$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370fi
14371
Guido van Rossum7f43da71994-08-01 12:15:30 +000014372
Stefan Krah1919b7e2012-03-21 18:25:23 +010014373# **************************************
14374# * Check for gcc x64 inline assembler *
14375# **************************************
14376
14377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14378$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380/* end confdefs.h. */
14381
14382int
14383main ()
14384{
14385
14386 __asm__ __volatile__ ("movq %rcx, %rax");
14387
14388 ;
14389 return 0;
14390}
14391_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014392if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014393 have_gcc_asm_for_x64=yes
14394else
14395 have_gcc_asm_for_x64=no
14396fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014397rm -f core conftest.err conftest.$ac_objext \
14398 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14400$as_echo "$have_gcc_asm_for_x64" >&6; }
14401if test "$have_gcc_asm_for_x64" = yes
14402then
14403
14404$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14405
14406fi
14407
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014408# **************************************************
14409# * Check for various properties of floating point *
14410# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014411
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14413$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14414if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014416else
14417
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014418
14419ax_cv_c_float_words_bigendian=unknown
14420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014421/* end confdefs.h. */
14422
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014423
14424double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14425
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014426
14427_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014428if ac_fn_c_try_compile "$LINENO"; then :
14429
14430
Arnon Yaari5dd83602020-04-01 18:19:09 +030014431if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014432 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014433fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014434if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014435 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14436 ax_cv_c_float_words_bigendian=no
14437 else
14438 ax_cv_c_float_words_bigendian=unknown
14439 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014440fi
14441
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014442
14443fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014445fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14447$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014448
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014449case $ax_cv_c_float_words_bigendian in
14450 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014451
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014452$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14453 ;;
14454 no)
14455 ;;
14456 *)
14457 as_fn_error $? "
14458
14459Unknown float word ordering. You need to manually preset
14460ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14461
14462 " "$LINENO" 5 ;;
14463esac
14464
14465
14466if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014467then
14468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014470
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014471elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014472then
14473
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014474$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14475
14476else
14477 # Some ARM platforms use a mixed-endian representation for doubles.
14478 # While Python doesn't currently have full support for these platforms
14479 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14480 # conversions work.
14481 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14482 # or little, then it must be this?
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014485
14486fi
14487
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014488# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014489# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014490# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014491# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014492# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014493# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014494
14495# This inline assembler syntax may also work for suncc and icc,
14496# so we try it on all platforms.
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14499$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014501/* end confdefs.h. */
14502
14503int
14504main ()
14505{
14506
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014507 unsigned short cw;
14508 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14509 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014510
14511 ;
14512 return 0;
14513}
14514_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014515if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014516 have_gcc_asm_for_x87=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014519fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014520rm -f core conftest.err conftest.$ac_objext \
14521 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14523$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014524if test "$have_gcc_asm_for_x87" = yes
14525then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014528
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14532$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14534/* end confdefs.h. */
14535
14536int
14537main ()
14538{
14539
14540 unsigned int fpcr;
14541 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14542 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14543
14544 ;
14545 return 0;
14546}
14547_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014548if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014549 have_gcc_asm_for_mc68881=yes
14550else
14551 have_gcc_asm_for_mc68881=no
14552fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014553rm -f core conftest.err conftest.$ac_objext \
14554 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14556$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14557if test "$have_gcc_asm_for_mc68881" = yes
14558then
14559
14560$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14561
14562fi
14563
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014564# Detect whether system arithmetic is subject to x87-style double
14565# rounding issues. The result of this test has little meaning on non
14566# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14567# mode is round-to-nearest and double rounding issues are present, and
14568# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14570$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014571# $BASECFLAGS may affect the result
14572ac_save_cc="$CC"
14573CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014574if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014575 ac_cv_x87_double_rounding=no
14576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014578/* end confdefs.h. */
14579
14580#include <stdlib.h>
14581#include <math.h>
14582int main() {
14583 volatile double x, y, z;
14584 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14585 x = 0.99999999999999989; /* 1-2**-53 */
14586 y = 1./x;
14587 if (y != 1.)
14588 exit(0);
14589 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14590 x = 1e16;
14591 y = 2.99999;
14592 z = x + y;
14593 if (z != 1e16+4.)
14594 exit(0);
14595 /* both tests show evidence of double rounding */
14596 exit(1);
14597}
14598
14599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014600if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014601 ac_cv_x87_double_rounding=no
14602else
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014607fi
14608
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014609CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14611$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014612if test "$ac_cv_x87_double_rounding" = yes
14613then
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014616
14617fi
14618
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014619# ************************************
14620# * Check for mathematical functions *
14621# ************************************
14622
14623LIBS_SAVE=$LIBS
14624LIBS="$LIBS $LIBM"
14625
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014626for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14627do :
14628 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14629ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014630if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014631 cat >>confdefs.h <<_ACEOF
14632#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14633_ACEOF
14634
14635fi
14636done
14637
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014638for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014639do :
14640 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14641ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014642if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014643 cat >>confdefs.h <<_ACEOF
14644#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14645_ACEOF
14646
14647fi
14648done
14649
14650ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14651"
Victor Stinnere0be4232011-10-25 13:06:09 +020014652if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014653 ac_have_decl=1
14654else
14655 ac_have_decl=0
14656fi
14657
14658cat >>confdefs.h <<_ACEOF
14659#define HAVE_DECL_ISINF $ac_have_decl
14660_ACEOF
14661ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14662"
Victor Stinnere0be4232011-10-25 13:06:09 +020014663if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014664 ac_have_decl=1
14665else
14666 ac_have_decl=0
14667fi
14668
14669cat >>confdefs.h <<_ACEOF
14670#define HAVE_DECL_ISNAN $ac_have_decl
14671_ACEOF
14672ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14673"
Victor Stinnere0be4232011-10-25 13:06:09 +020014674if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014675 ac_have_decl=1
14676else
14677 ac_have_decl=0
14678fi
14679
14680cat >>confdefs.h <<_ACEOF
14681#define HAVE_DECL_ISFINITE $ac_have_decl
14682_ACEOF
14683
14684
Mark Dickinsona614f042009-11-28 12:48:43 +000014685# For multiprocessing module, check that sem_open
14686# actually works. For FreeBSD versions <= 7.2,
14687# the kernel module that provides POSIX semaphores
14688# isn't loaded by default, so an attempt to call
14689# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14691$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014692if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014696 ac_cv_posix_semaphores_enabled=yes
14697else
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014699/* end confdefs.h. */
14700
14701#include <unistd.h>
14702#include <fcntl.h>
14703#include <stdio.h>
14704#include <semaphore.h>
14705#include <sys/stat.h>
14706
14707int main(void) {
14708 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14709 if (a == SEM_FAILED) {
14710 perror("sem_open");
14711 return 1;
14712 }
14713 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014714 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014715 return 0;
14716}
14717
14718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014719if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014720 ac_cv_posix_semaphores_enabled=yes
14721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014726fi
14727
14728
Mark Dickinsona614f042009-11-28 12:48:43 +000014729fi
14730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14732$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014733if test $ac_cv_posix_semaphores_enabled = no
14734then
14735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014737
14738fi
14739
Mark Dickinson10683072009-04-18 21:18:19 +000014740# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14742$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014743if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014747 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014748else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014750/* end confdefs.h. */
14751
14752#include <unistd.h>
14753#include <fcntl.h>
14754#include <stdio.h>
14755#include <semaphore.h>
14756#include <sys/stat.h>
14757
14758int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014759 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014760 int count;
14761 int res;
14762 if(a==SEM_FAILED){
14763 perror("sem_open");
14764 return 1;
14765
14766 }
14767 res = sem_getvalue(a, &count);
14768 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014769 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014770 return res==-1 ? 1 : 0;
14771}
14772
Mark Dickinson10683072009-04-18 21:18:19 +000014773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014775 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014776else
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014781fi
14782
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014784fi
14785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14787$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014788if test $ac_cv_broken_sem_getvalue = yes
14789then
14790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014792
14793fi
14794
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014795ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14796"
14797if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14798 ac_have_decl=1
14799else
14800 ac_have_decl=0
14801fi
14802
14803cat >>confdefs.h <<_ACEOF
14804#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14805_ACEOF
14806ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14807"
14808if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14809 ac_have_decl=1
14810else
14811 ac_have_decl=0
14812fi
14813
14814cat >>confdefs.h <<_ACEOF
14815#define HAVE_DECL_RTLD_NOW $ac_have_decl
14816_ACEOF
14817ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14818"
14819if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14820 ac_have_decl=1
14821else
14822 ac_have_decl=0
14823fi
14824
14825cat >>confdefs.h <<_ACEOF
14826#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14827_ACEOF
14828ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14829"
14830if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14831 ac_have_decl=1
14832else
14833 ac_have_decl=0
14834fi
14835
14836cat >>confdefs.h <<_ACEOF
14837#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14838_ACEOF
14839ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14840"
14841if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14842 ac_have_decl=1
14843else
14844 ac_have_decl=0
14845fi
14846
14847cat >>confdefs.h <<_ACEOF
14848#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14849_ACEOF
14850ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14851"
14852if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14853 ac_have_decl=1
14854else
14855 ac_have_decl=0
14856fi
14857
14858cat >>confdefs.h <<_ACEOF
14859#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14860_ACEOF
14861ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14862"
14863if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14864 ac_have_decl=1
14865else
14866 ac_have_decl=0
14867fi
14868
14869cat >>confdefs.h <<_ACEOF
14870#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14871_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014872ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14873"
14874if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14875 ac_have_decl=1
14876else
14877 ac_have_decl=0
14878fi
14879
14880cat >>confdefs.h <<_ACEOF
14881#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14882_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014883
14884
Mark Dickinsonbd792642009-03-18 20:06:12 +000014885# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14887$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014888# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014889if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014890 enableval=$enable_big_digits; case $enable_big_digits in
14891yes)
14892 enable_big_digits=30 ;;
14893no)
14894 enable_big_digits=15 ;;
1489515|30)
14896 ;;
14897*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014898 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 +000014899esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14901$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014902
14903cat >>confdefs.h <<_ACEOF
14904#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14905_ACEOF
14906
14907
14908else
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14910$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014911fi
14912
14913
Guido van Rossumef2255b2000-03-10 22:30:29 +000014914# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014915ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014916if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014917
14918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014920
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014921 wchar_h="yes"
14922
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923else
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925
14926fi
14927
Michael W. Hudson54241132001-12-07 15:38:26 +000014928
Martin v. Löwis11437992002-04-12 09:54:03 +000014929
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014930# determine wchar_t size
14931if test "$wchar_h" = yes
14932then
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14936# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14938$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014939if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014941else
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14943"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014944
Martin v. Löwis11437992002-04-12 09:54:03 +000014945else
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 if test "$ac_cv_type_wchar_t" = yes; then
14947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014949as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014950See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951 else
14952 ac_cv_sizeof_wchar_t=0
14953 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014955
Martin v. Löwis11437992002-04-12 09:54:03 +000014956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14958$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959
14960
14961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014963#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014964_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014965
Michael W. Hudson54241132001-12-07 15:38:26 +000014966
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014967fi
14968
Matthias Kloseb9621712010-04-24 17:59:49 +000014969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14970$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014971have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014973/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014974
14975#include <tcl.h>
14976#if TCL_UTF_MAX != 6
14977# error "NOT UCS4_TCL"
14978#endif
14979int
14980main ()
14981{
14982
14983 ;
14984 return 0;
14985}
14986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014988
14989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014991
14992 have_ucs4_tcl=yes
14993
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14997$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014998
Skip Montanaro6dead952003-09-25 14:50:04 +000014999# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015000if test "$wchar_h" = yes
15001then
15002 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15004$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015005 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015007else
15008
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015010 ac_cv_wchar_t_signed=yes
15011else
Matthias Kloseb9621712010-04-24 17:59:49 +000015012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015013/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015014
15015 #include <wchar.h>
15016 int main()
15017 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015018 /* Success: exit code 0 */
15019 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015020 }
15021
15022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015023if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015024 ac_cv_wchar_t_signed=yes
15025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015030fi
15031
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015032fi
15033
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15035$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036fi
15037
Michael Osipov3738fad2018-08-24 18:17:19 +020015038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15039$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015040# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015041if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015042 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015043then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015046
Michael Osipov3738fad2018-08-24 18:17:19 +020015047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15048$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015049else
Michael Osipov3738fad2018-08-24 18:17:19 +020015050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15051$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015052fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015053
15054# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15056$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015057if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015059else
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 ac_cv_c_bigendian=unknown
15061 # See if we're dealing with a universal compiler.
15062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15063/* end confdefs.h. */
15064#ifndef __APPLE_CC__
15065 not a universal capable compiler
15066 #endif
15067 typedef int dummy;
15068
Skip Montanaro6dead952003-09-25 14:50:04 +000015069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if ac_fn_c_try_compile "$LINENO"; then :
15071
15072 # Check for potential -arch flags. It is not universal unless
15073 # there are at least two -arch flags with different values.
15074 ac_arch=
15075 ac_prev=
15076 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15077 if test -n "$ac_prev"; then
15078 case $ac_word in
15079 i?86 | x86_64 | ppc | ppc64)
15080 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15081 ac_arch=$ac_word
15082 else
15083 ac_cv_c_bigendian=universal
15084 break
15085 fi
15086 ;;
15087 esac
15088 ac_prev=
15089 elif test "x$ac_word" = "x-arch"; then
15090 ac_prev=arch
15091 fi
15092 done
15093fi
15094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15095 if test $ac_cv_c_bigendian = unknown; then
15096 # See if sys/param.h defines the BYTE_ORDER macro.
15097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015098/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015099#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015101
Martin v. Löwis11437992002-04-12 09:54:03 +000015102int
15103main ()
15104{
Matthias Kloseb9621712010-04-24 17:59:49 +000015105#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15106 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15107 && LITTLE_ENDIAN)
15108 bogus endian macros
15109 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
15111 ;
15112 return 0;
15113}
15114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015115if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015116 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015118/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015119#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015121
Martin v. Löwis11437992002-04-12 09:54:03 +000015122int
15123main ()
15124{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 not big endian
15127 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015128
15129 ;
15130 return 0;
15131}
15132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015133if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015134 ac_cv_c_bigendian=yes
15135else
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015139fi
15140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15141 fi
15142 if test $ac_cv_c_bigendian = unknown; then
15143 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015145/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015146#include <limits.h>
15147
Martin v. Löwis11437992002-04-12 09:54:03 +000015148int
15149main ()
15150{
Matthias Kloseb9621712010-04-24 17:59:49 +000015151#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15152 bogus endian macros
15153 #endif
15154
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ;
15156 return 0;
15157}
15158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015159if ac_fn_c_try_compile "$LINENO"; then :
15160 # It does; now see whether it defined to _BIG_ENDIAN or not.
15161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15162/* end confdefs.h. */
15163#include <limits.h>
15164
15165int
15166main ()
15167{
15168#ifndef _BIG_ENDIAN
15169 not big endian
15170 #endif
15171
15172 ;
15173 return 0;
15174}
15175_ACEOF
15176if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015178else
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15182fi
15183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15184 fi
15185 if test $ac_cv_c_bigendian = unknown; then
15186 # Compile a test program.
15187 if test "$cross_compiling" = yes; then :
15188 # Try to guess by grepping values from an object file.
15189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15190/* end confdefs.h. */
15191short int ascii_mm[] =
15192 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15193 short int ascii_ii[] =
15194 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15195 int use_ascii (int i) {
15196 return ascii_mm[i] + ascii_ii[i];
15197 }
15198 short int ebcdic_ii[] =
15199 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15200 short int ebcdic_mm[] =
15201 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15202 int use_ebcdic (int i) {
15203 return ebcdic_mm[i] + ebcdic_ii[i];
15204 }
15205 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207int
15208main ()
15209{
15210return use_ascii (foo) == use_ebcdic (foo);
15211 ;
15212 return 0;
15213}
15214_ACEOF
15215if ac_fn_c_try_compile "$LINENO"; then :
15216 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15217 ac_cv_c_bigendian=yes
15218 fi
15219 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15220 if test "$ac_cv_c_bigendian" = unknown; then
15221 ac_cv_c_bigendian=no
15222 else
15223 # finding both strings is unlikely to happen, but who knows?
15224 ac_cv_c_bigendian=unknown
15225 fi
15226 fi
15227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015229else
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015233int
15234main ()
15235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 /* Are we little or big endian? From Harbison&Steele. */
15238 union
15239 {
15240 long int l;
15241 char c[sizeof (long int)];
15242 } u;
15243 u.l = 1;
15244 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245
15246 ;
15247 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015248}
Martin v. Löwis11437992002-04-12 09:54:03 +000015249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015251 ac_cv_c_bigendian=no
15252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15256 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15262$as_echo "$ac_cv_c_bigendian" >&6; }
15263 case $ac_cv_c_bigendian in #(
15264 yes)
15265 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15266;; #(
15267 no)
15268 ;; #(
15269 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015270
Matthias Kloseb9621712010-04-24 17:59:49 +000015271$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 ;; #(
15274 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015275 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015276 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015278
Michael W. Hudson54241132001-12-07 15:38:26 +000015279
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015280# ABI version string for Python extension modules. This appears between the
15281# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15282# from the following attributes which affect the ABI of this Python build (in
15283# this order):
15284#
15285# * The Python implementation (always 'cpython-' for us)
15286# * The major and minor version numbers
15287# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015288#
15289# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015290# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15291# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015292#
15293# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15294# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015295
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15297$as_echo_n "checking ABIFLAGS... " >&6; }
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15299$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15301$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015302SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15304$as_echo "$SOABI" >&6; }
15305
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015306# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15307if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015308 # Similar to SOABI but remove "d" flag from ABIFLAGS
15309
15310 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15311
15312cat >>confdefs.h <<_ACEOF
15313#define ALT_SOABI "${ALT_SOABI}"
15314_ACEOF
15315
15316fi
15317
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015318
15319case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015320 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015321 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15322 *)
15323 EXT_SUFFIX=${SHLIB_SUFFIX};;
15324esac
15325
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15327$as_echo_n "checking LDVERSION... " >&6; }
15328LDVERSION='$(VERSION)$(ABIFLAGS)'
15329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15330$as_echo "$LDVERSION" >&6; }
15331
E. M. Brayc994c8f2019-05-24 17:33:47 +020015332# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015333
E. M. Brayb1fc4172019-05-24 18:39:39 +020015334if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015335 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015336else
15337 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015338fi
15339
doko@python.org87421192013-01-26 11:39:31 +010015340
Victor Stinner51ae31e2020-06-09 15:32:43 +020015341
15342BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15343
15344
15345# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015346# /usr/$LIDIRNAME/python$VERSION
15347
15348PLATLIBDIR="lib"
15349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15350$as_echo_n "checking for --with-platlibdir... " >&6; }
15351
15352# Check whether --with-platlibdir was given.
15353if test "${with_platlibdir+set}" = set; then :
15354 withval=$with_platlibdir;
15355# ignore 3 options:
15356# --with-platlibdir
15357# --with-platlibdir=
15358# --without-platlibdir
15359if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15360then
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15362$as_echo "yes" >&6; }
15363 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015364 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015365else
Victor Stinner8510f432020-03-10 09:53:09 +010015366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15367$as_echo "no" >&6; }
15368fi
15369else
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15371$as_echo "no" >&6; }
15372fi
15373
15374
15375
15376
15377if test x$PLATFORM_TRIPLET = x; then
15378 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15379else
15380 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015381fi
doko@python.org87421192013-01-26 11:39:31 +010015382
15383
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015384# Check whether right shifting a negative integer extends the sign bit
15385# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15387$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015390else
Martin v. Löwis11437992002-04-12 09:54:03 +000015391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015393 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015396/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015397
15398int main()
15399{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015400 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015401}
15402
Martin v. Löwis11437992002-04-12 09:54:03 +000015403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015404if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015405 ac_cv_rshift_extends_sign=yes
15406else
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15410 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015411fi
15412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413fi
15414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15416$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015417if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015418then
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015421
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015422fi
15423
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015424# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15426$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015427if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430
Matthias Kloseb9621712010-04-24 17:59:49 +000015431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015432/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015433#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015434int
15435main ()
15436{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015437
15438 FILE *f = fopen("/dev/null", "r");
15439 flockfile(f);
15440 getc_unlocked(f);
15441 funlockfile(f);
15442
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 ;
15444 return 0;
15445}
15446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015447if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015448 ac_cv_have_getc_unlocked=yes
15449else
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 ac_cv_have_getc_unlocked=no
15451fi
15452rm -f core conftest.err conftest.$ac_objext \
15453 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15457$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015458if test "$ac_cv_have_getc_unlocked" = yes
15459then
Martin v. Löwis11437992002-04-12 09:54:03 +000015460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015462
15463fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015464
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015465# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015466# save the value of LIBS so we don't actually link Python with readline
15467LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015468
Gregory P. Smith18820942008-09-07 06:24:49 +000015469# On some systems we need to link readline to a termcap compatible
15470# library. NOTE: Keep the precedence of listed libraries synchronised
15471# with setup.py.
15472py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15474$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015475for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015476 if test -z "$py_libtermcap"; then
15477 READLINE_LIBS="-lreadline"
15478 else
15479 READLINE_LIBS="-lreadline -l$py_libtermcap"
15480 fi
15481 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015483/* end confdefs.h. */
15484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485/* Override any GCC internal prototype to avoid an error.
15486 Use char because int might match the return type of a GCC
15487 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015488#ifdef __cplusplus
15489extern "C"
15490#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015491char readline ();
15492int
15493main ()
15494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015496 ;
15497 return 0;
15498}
15499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015500if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015501 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015503rm -f core conftest.err conftest.$ac_objext \
15504 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015505 if test $py_cv_lib_readline = yes; then
15506 break
15507 fi
15508done
15509# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15510#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015511if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15513$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015514else
Matthias Kloseb9621712010-04-24 17:59:49 +000015515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15516$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015517
Matthias Kloseb9621712010-04-24 17:59:49 +000015518$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015519
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015520fi
15521
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015522# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015524/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015525#include <readline/readline.h>
15526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015528 have_readline=yes
15529else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015530 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015531
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015532fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015533rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015534if test $have_readline = yes
15535then
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015537/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015538#include <readline/readline.h>
15539
15540_ACEOF
15541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015545
15546fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015547rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +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_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015556
Matthias Kloseb9621712010-04-24 17:59:49 +000015557$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015558
15559fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015560rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015561
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015562fi
15563
Martin v. Löwis0daad592001-09-30 21:09:59 +000015564# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15566$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015567if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015569else
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015571LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575/* Override any GCC internal prototype to avoid an error.
15576 Use char because int might match the return type of a GCC
15577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015578#ifdef __cplusplus
15579extern "C"
15580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015581char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015582int
15583main ()
15584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 ;
15587 return 0;
15588}
15589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015595rm -f core conftest.err conftest.$ac_objext \
15596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015597LIBS=$ac_check_lib_save_LIBS
15598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15600$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015601if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015604
Martin v. Löwis0daad592001-09-30 21:09:59 +000015605fi
15606
Michael W. Hudson54241132001-12-07 15:38:26 +000015607
Thomas Wouters89d996e2007-09-08 17:39:28 +000015608# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15610$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015611if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015613else
15614 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015615LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015617/* end confdefs.h. */
15618
15619/* Override any GCC internal prototype to avoid an error.
15620 Use char because int might match the return type of a GCC
15621 builtin and then its argument prototype would still apply. */
15622#ifdef __cplusplus
15623extern "C"
15624#endif
15625char rl_completion_display_matches_hook ();
15626int
15627main ()
15628{
15629return rl_completion_display_matches_hook ();
15630 ;
15631 return 0;
15632}
15633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015634if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015635 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15636else
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015639rm -f core conftest.err conftest.$ac_objext \
15640 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015641LIBS=$ac_check_lib_save_LIBS
15642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15644$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015645if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015648
15649fi
15650
15651
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015652# also in 4.0, but not in editline
15653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15654$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15655if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15656 $as_echo_n "(cached) " >&6
15657else
15658 ac_check_lib_save_LIBS=$LIBS
15659LIBS="-lreadline $READLINE_LIBS $LIBS"
15660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15661/* end confdefs.h. */
15662
15663/* Override any GCC internal prototype to avoid an error.
15664 Use char because int might match the return type of a GCC
15665 builtin and then its argument prototype would still apply. */
15666#ifdef __cplusplus
15667extern "C"
15668#endif
15669char rl_resize_terminal ();
15670int
15671main ()
15672{
15673return rl_resize_terminal ();
15674 ;
15675 return 0;
15676}
15677_ACEOF
15678if ac_fn_c_try_link "$LINENO"; then :
15679 ac_cv_lib_readline_rl_resize_terminal=yes
15680else
15681 ac_cv_lib_readline_rl_resize_terminal=no
15682fi
15683rm -f core conftest.err conftest.$ac_objext \
15684 conftest$ac_exeext conftest.$ac_ext
15685LIBS=$ac_check_lib_save_LIBS
15686fi
15687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15688$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15689if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15690
15691$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15692
15693fi
15694
15695
Martin v. Löwis0daad592001-09-30 21:09:59 +000015696# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15698$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015699if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015701else
Martin v. Löwis11437992002-04-12 09:54:03 +000015702 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015703LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707/* Override any GCC internal prototype to avoid an error.
15708 Use char because int might match the return type of a GCC
15709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015710#ifdef __cplusplus
15711extern "C"
15712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015713char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015714int
15715main ()
15716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 ;
15719 return 0;
15720}
15721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015722if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015724else
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015727rm -f core conftest.err conftest.$ac_objext \
15728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015729LIBS=$ac_check_lib_save_LIBS
15730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15732$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015733if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015736
Guido van Rossum353ae582001-07-10 16:45:32 +000015737fi
15738
Jack Jansendd19cf82001-12-06 22:36:17 +000015739
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015740# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015742/* end confdefs.h. */
15743#include <readline/readline.h>
15744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015745if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015746 have_readline=yes
15747else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015748 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015749
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015750fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015751rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015752if test $have_readline = yes
15753then
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015755/* end confdefs.h. */
15756#include <readline/readline.h>
15757
15758_ACEOF
15759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015761
Matthias Kloseb9621712010-04-24 17:59:49 +000015762$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015763
15764fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015765rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015766
15767fi
15768
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15770$as_echo_n "checking for append_history in -lreadline... " >&6; }
15771if ${ac_cv_lib_readline_append_history+:} false; then :
15772 $as_echo_n "(cached) " >&6
15773else
15774 ac_check_lib_save_LIBS=$LIBS
15775LIBS="-lreadline $READLINE_LIBS $LIBS"
15776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15777/* end confdefs.h. */
15778
15779/* Override any GCC internal prototype to avoid an error.
15780 Use char because int might match the return type of a GCC
15781 builtin and then its argument prototype would still apply. */
15782#ifdef __cplusplus
15783extern "C"
15784#endif
15785char append_history ();
15786int
15787main ()
15788{
15789return append_history ();
15790 ;
15791 return 0;
15792}
15793_ACEOF
15794if ac_fn_c_try_link "$LINENO"; then :
15795 ac_cv_lib_readline_append_history=yes
15796else
15797 ac_cv_lib_readline_append_history=no
15798fi
15799rm -f core conftest.err conftest.$ac_objext \
15800 conftest$ac_exeext conftest.$ac_ext
15801LIBS=$ac_check_lib_save_LIBS
15802fi
15803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15804$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15805if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15806
15807$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15808
15809fi
15810
15811
Martin v. Löwis82bca632006-02-10 20:49:30 +000015812# End of readline checks: restore LIBS
15813LIBS=$LIBS_no_readline
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15816$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015817if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015819else
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015822 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015823else
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015825/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015826
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015827#include <stdlib.h>
15828#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015829int main()
15830{
15831 int val1 = nice(1);
15832 if (val1 != -1 && val1 == nice(2))
15833 exit(0);
15834 exit(1);
15835}
15836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015838if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015839 ac_cv_broken_nice=yes
15840else
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015845fi
15846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847fi
15848
Matthias Kloseb9621712010-04-24 17:59:49 +000015849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15850$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015851if test "$ac_cv_broken_nice" = yes
15852then
Martin v. Löwis11437992002-04-12 09:54:03 +000015853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015855
15856fi
15857
Matthias Kloseb9621712010-04-24 17:59:49 +000015858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15859$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015860if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015864 ac_cv_broken_poll=no
15865else
Matthias Kloseb9621712010-04-24 17:59:49 +000015866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015867/* end confdefs.h. */
15868
15869#include <poll.h>
15870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015871int main()
15872{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015873 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015874 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015875
15876 close (42);
15877
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015878 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015879 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015880 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015881 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015882 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015883 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015884 return 1;
15885}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015886
15887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015888if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015889 ac_cv_broken_poll=yes
15890else
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015897fi
15898
Matthias Kloseb9621712010-04-24 17:59:49 +000015899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15900$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015901if test "$ac_cv_broken_poll" = yes
15902then
15903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015905
15906fi
15907
Martin v. Löwis1d459062005-03-14 21:23:33 +000015908# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15910$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015911if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015913else
15914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015916 ac_cv_working_tzset=no
15917else
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015919/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015920
15921#include <stdlib.h>
15922#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015923#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015924
15925#if HAVE_TZNAME
15926extern char *tzname[];
15927#endif
15928
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015929int main()
15930{
Brett Cannon18367812003-09-19 00:59:16 +000015931 /* Note that we need to ensure that not only does tzset(3)
15932 do 'something' with localtime, but it works as documented
15933 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015934 This includes making sure that tzname is set properly if
15935 tm->tm_zone does not exist since it is the alternative way
15936 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015937
15938 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015939 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015940 */
15941
Martin v. Löwis1d459062005-03-14 21:23:33 +000015942 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015943 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15944
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015945 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015946 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015947 if (localtime(&groundhogday)->tm_hour != 0)
15948 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015949#if HAVE_TZNAME
15950 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15951 if (strcmp(tzname[0], "UTC") ||
15952 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15953 exit(1);
15954#endif
Brett Cannon18367812003-09-19 00:59:16 +000015955
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015956 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015957 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015958 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015959 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015960#if HAVE_TZNAME
15961 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15962 exit(1);
15963#endif
Brett Cannon18367812003-09-19 00:59:16 +000015964
15965 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15966 tzset();
15967 if (localtime(&groundhogday)->tm_hour != 11)
15968 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015969#if HAVE_TZNAME
15970 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15971 exit(1);
15972#endif
15973
15974#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015975 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15976 exit(1);
15977 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15978 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015979#endif
Brett Cannon18367812003-09-19 00:59:16 +000015980
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015981 exit(0);
15982}
15983
15984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015985if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015986 ac_cv_working_tzset=yes
15987else
Matthias Kloseb9621712010-04-24 17:59:49 +000015988 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015992fi
15993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994fi
15995
Matthias Kloseb9621712010-04-24 17:59:49 +000015996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15997$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015998if test "$ac_cv_working_tzset" = yes
15999then
16000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016002
16003fi
16004
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016005# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16007$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016008if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016010else
Matthias Kloseb9621712010-04-24 17:59:49 +000016011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016012/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016013#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016014int
16015main ()
16016{
16017
16018struct stat st;
16019st.st_mtim.tv_nsec = 1;
16020
16021 ;
16022 return 0;
16023}
16024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016026 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016027else
Matthias Kloseb9621712010-04-24 17:59:49 +000016028 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16031fi
16032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16034$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016035if test "$ac_cv_stat_tv_nsec" = yes
16036then
16037
Matthias Kloseb9621712010-04-24 17:59:49 +000016038$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016039
16040fi
16041
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016042# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16044$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016045if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016046 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016047else
Matthias Kloseb9621712010-04-24 17:59:49 +000016048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016049/* end confdefs.h. */
16050#include <sys/stat.h>
16051int
16052main ()
16053{
16054
16055struct stat st;
16056st.st_mtimespec.tv_nsec = 1;
16057
16058 ;
16059 return 0;
16060}
16061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016063 ac_cv_stat_tv_nsec2=yes
16064else
Matthias Kloseb9621712010-04-24 17:59:49 +000016065 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16068fi
16069
Matthias Kloseb9621712010-04-24 17:59:49 +000016070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16071$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016072if test "$ac_cv_stat_tv_nsec2" = yes
16073then
16074
Matthias Kloseb9621712010-04-24 17:59:49 +000016075$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016076
16077fi
16078
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016079# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016080ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016081if test "$cross_compiling" = no; then
16082 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16083fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016084
16085for ac_header in curses.h ncurses.h
16086do :
16087 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16088ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16089if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16090 cat >>confdefs.h <<_ACEOF
16091#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16092_ACEOF
16093
16094fi
16095
16096done
16097
16098
16099# On Solaris, term.h requires curses.h
16100for ac_header in term.h
16101do :
16102 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16103#ifdef HAVE_CURSES_H
16104#include <curses.h>
16105#endif
16106
16107"
16108if test "x$ac_cv_header_term_h" = xyes; then :
16109 cat >>confdefs.h <<_ACEOF
16110#define HAVE_TERM_H 1
16111_ACEOF
16112
16113fi
16114
16115done
16116
16117
Jack Jansen666b1e72001-10-31 12:11:48 +000016118# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16120$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016121if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016123else
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016125/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016126#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016127int
16128main ()
16129{
Jack Jansen666b1e72001-10-31 12:11:48 +000016130
16131 int rtn;
16132 rtn = mvwdelch(0,0,0);
16133
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 ;
16135 return 0;
16136}
16137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016138if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016139 ac_cv_mvwdelch_is_expression=yes
16140else
Matthias Kloseb9621712010-04-24 17:59:49 +000016141 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144fi
16145
Matthias Kloseb9621712010-04-24 17:59:49 +000016146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16147$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016148
16149if test "$ac_cv_mvwdelch_is_expression" = yes
16150then
Martin v. Löwis11437992002-04-12 09:54:03 +000016151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016153
16154fi
16155
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016156# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16157# structs since version 5.7. If the macro is defined as zero before including
16158# [n]curses.h, ncurses will expose fields of the structs regardless of the
16159# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16161$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016162if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016163 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016164else
Matthias Kloseb9621712010-04-24 17:59:49 +000016165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016166/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016167
16168 #define NCURSES_OPAQUE 0
16169 #include <curses.h>
16170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171int
16172main ()
16173{
Jack Jansen666b1e72001-10-31 12:11:48 +000016174
16175 WINDOW *w;
16176 w->_flags = 0;
16177
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ;
16179 return 0;
16180}
16181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016182if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016183 ac_cv_window_has_flags=yes
16184else
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16188fi
16189
Matthias Kloseb9621712010-04-24 17:59:49 +000016190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16191$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016192
Jack Jansen666b1e72001-10-31 12:11:48 +000016193
16194if test "$ac_cv_window_has_flags" = yes
16195then
Martin v. Löwis11437992002-04-12 09:54:03 +000016196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016198
16199fi
16200
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16202$as_echo_n "checking for is_pad... " >&6; }
16203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16204/* end confdefs.h. */
16205#include <curses.h>
16206int
16207main ()
16208{
16209
16210#ifndef is_pad
16211void *x=is_pad
16212#endif
16213
16214 ;
16215 return 0;
16216}
16217_ACEOF
16218if ac_fn_c_try_compile "$LINENO"; then :
16219
16220$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16221
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16223$as_echo "yes" >&6; }
16224else
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16226$as_echo "no" >&6; }
16227
16228fi
16229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16232$as_echo_n "checking for is_term_resized... " >&6; }
16233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016234/* end confdefs.h. */
16235#include <curses.h>
16236int
16237main ()
16238{
16239void *x=is_term_resized
16240 ;
16241 return 0;
16242}
16243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016245
Matthias Kloseb9621712010-04-24 17:59:49 +000016246$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016247
Matthias Kloseb159a552010-04-25 21:00:44 +000016248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016249$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016250else
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16252$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016253
16254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16256
Matthias Kloseb9621712010-04-24 17:59:49 +000016257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16258$as_echo_n "checking for resize_term... " >&6; }
16259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016260/* end confdefs.h. */
16261#include <curses.h>
16262int
16263main ()
16264{
16265void *x=resize_term
16266 ;
16267 return 0;
16268}
16269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016270if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016271
Matthias Kloseb9621712010-04-24 17:59:49 +000016272$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016273
Matthias Kloseb159a552010-04-25 21:00:44 +000016274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016275$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016276else
Matthias Kloseb9621712010-04-24 17:59:49 +000016277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16278$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016279
16280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282
Matthias Kloseb9621712010-04-24 17:59:49 +000016283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16284$as_echo_n "checking for resizeterm... " >&6; }
16285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016286/* end confdefs.h. */
16287#include <curses.h>
16288int
16289main ()
16290{
16291void *x=resizeterm
16292 ;
16293 return 0;
16294}
16295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016296if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016297
Matthias Kloseb9621712010-04-24 17:59:49 +000016298$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016299
Matthias Kloseb159a552010-04-25 21:00:44 +000016300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016301$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016302else
Matthias Kloseb9621712010-04-24 17:59:49 +000016303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16304$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016305
16306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016308
16309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16310$as_echo_n "checking for immedok... " >&6; }
16311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16312/* end confdefs.h. */
16313#include <curses.h>
16314int
16315main ()
16316{
16317
16318#ifndef immedok
16319void *x=immedok
16320#endif
16321
16322 ;
16323 return 0;
16324}
16325_ACEOF
16326if ac_fn_c_try_compile "$LINENO"; then :
16327
16328$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16329
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16331$as_echo "yes" >&6; }
16332else
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16334$as_echo "no" >&6; }
16335
16336fi
16337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16338
16339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16340$as_echo_n "checking for syncok... " >&6; }
16341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16342/* end confdefs.h. */
16343#include <curses.h>
16344int
16345main ()
16346{
16347
16348#ifndef syncok
16349void *x=syncok
16350#endif
16351
16352 ;
16353 return 0;
16354}
16355_ACEOF
16356if ac_fn_c_try_compile "$LINENO"; then :
16357
16358$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16359
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16361$as_echo "yes" >&6; }
16362else
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16364$as_echo "no" >&6; }
16365
16366fi
16367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16368
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16370$as_echo_n "checking for wchgat... " >&6; }
16371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16372/* end confdefs.h. */
16373#include <curses.h>
16374int
16375main ()
16376{
16377
16378#ifndef wchgat
16379void *x=wchgat
16380#endif
16381
16382 ;
16383 return 0;
16384}
16385_ACEOF
16386if ac_fn_c_try_compile "$LINENO"; then :
16387
16388$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16389
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16391$as_echo "yes" >&6; }
16392else
16393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16394$as_echo "no" >&6; }
16395
16396fi
16397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16398
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16400$as_echo_n "checking for filter... " >&6; }
16401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16402/* end confdefs.h. */
16403#include <curses.h>
16404int
16405main ()
16406{
16407
16408#ifndef filter
16409void *x=filter
16410#endif
16411
16412 ;
16413 return 0;
16414}
16415_ACEOF
16416if ac_fn_c_try_compile "$LINENO"; then :
16417
16418$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16419
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16421$as_echo "yes" >&6; }
16422else
16423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16424$as_echo "no" >&6; }
16425
16426fi
16427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16428
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16430$as_echo_n "checking for has_key... " >&6; }
16431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16432/* end confdefs.h. */
16433#include <curses.h>
16434int
16435main ()
16436{
16437
16438#ifndef has_key
16439void *x=has_key
16440#endif
16441
16442 ;
16443 return 0;
16444}
16445_ACEOF
16446if ac_fn_c_try_compile "$LINENO"; then :
16447
16448$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16449
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16451$as_echo "yes" >&6; }
16452else
16453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16454$as_echo "no" >&6; }
16455
16456fi
16457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16458
16459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16460$as_echo_n "checking for typeahead... " >&6; }
16461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16462/* end confdefs.h. */
16463#include <curses.h>
16464int
16465main ()
16466{
16467
16468#ifndef typeahead
16469void *x=typeahead
16470#endif
16471
16472 ;
16473 return 0;
16474}
16475_ACEOF
16476if ac_fn_c_try_compile "$LINENO"; then :
16477
16478$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16479
16480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16481$as_echo "yes" >&6; }
16482else
16483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16484$as_echo "no" >&6; }
16485
16486fi
16487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16488
16489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16490$as_echo_n "checking for use_env... " >&6; }
16491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16492/* end confdefs.h. */
16493#include <curses.h>
16494int
16495main ()
16496{
16497
16498#ifndef use_env
16499void *x=use_env
16500#endif
16501
16502 ;
16503 return 0;
16504}
16505_ACEOF
16506if ac_fn_c_try_compile "$LINENO"; then :
16507
16508$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16509
16510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16511$as_echo "yes" >&6; }
16512else
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16514$as_echo "no" >&6; }
16515
16516fi
16517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016518# last curses configure check
16519CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16522$as_echo "$as_me: checking for device files" >&6;}
16523
16524if test "x$cross_compiling" = xyes; then
16525 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16527$as_echo_n "checking for /dev/ptmx... " >&6; }
16528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16529$as_echo "not set" >&6; }
16530 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16531 fi
16532 if test "${ac_cv_file__dev_ptc+set}" != set; then
16533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16534$as_echo_n "checking for /dev/ptc... " >&6; }
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16536$as_echo "not set" >&6; }
16537 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16538 fi
16539fi
16540
Matthias Kloseb9621712010-04-24 17:59:49 +000016541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16542$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016543if ${ac_cv_file__dev_ptmx+:} false; then :
16544 $as_echo_n "(cached) " >&6
16545else
16546 test "$cross_compiling" = yes &&
16547 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16548if test -r "/dev/ptmx"; then
16549 ac_cv_file__dev_ptmx=yes
16550else
16551 ac_cv_file__dev_ptmx=no
16552fi
16553fi
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16555$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16556if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016557
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016558fi
16559
16560if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016561
Matthias Kloseb9621712010-04-24 17:59:49 +000016562$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016563
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16566$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016567if ${ac_cv_file__dev_ptc+:} false; then :
16568 $as_echo_n "(cached) " >&6
16569else
16570 test "$cross_compiling" = yes &&
16571 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16572if test -r "/dev/ptc"; then
16573 ac_cv_file__dev_ptc=yes
16574else
16575 ac_cv_file__dev_ptc=no
16576fi
16577fi
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16579$as_echo "$ac_cv_file__dev_ptc" >&6; }
16580if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016581
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016582fi
16583
16584if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016585
Matthias Kloseb9621712010-04-24 17:59:49 +000016586$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016587
Neal Norwitz865400f2003-03-21 01:42:58 +000016588fi
16589
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016590if test $ac_sys_system = Darwin
16591then
16592 LIBS="$LIBS -framework CoreFoundation"
16593fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016594
Matthias Kloseb9621712010-04-24 17:59:49 +000016595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16596$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016597if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016598 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016599else
Matthias Kloseb9621712010-04-24 17:59:49 +000016600 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016601 ac_cv_have_size_t_format="cross -- assuming yes"
16602
Thomas Wouters477c8d52006-05-27 19:21:47 +000016603else
Matthias Kloseb9621712010-04-24 17:59:49 +000016604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016605/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016606
Thomas Wouters477c8d52006-05-27 19:21:47 +000016607#include <stdio.h>
16608#include <stddef.h>
16609#include <string.h>
16610
Christian Heimes2c181612007-12-17 20:04:13 +000016611#ifdef HAVE_SYS_TYPES_H
16612#include <sys/types.h>
16613#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016614
16615#ifdef HAVE_SSIZE_T
16616typedef ssize_t Py_ssize_t;
16617#elif SIZEOF_VOID_P == SIZEOF_LONG
16618typedef long Py_ssize_t;
16619#else
16620typedef int Py_ssize_t;
16621#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016622
Christian Heimes2c181612007-12-17 20:04:13 +000016623int main()
16624{
16625 char buffer[256];
16626
Thomas Wouters477c8d52006-05-27 19:21:47 +000016627 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16628 return 1;
16629
Thomas Wouters89f507f2006-12-13 04:49:30 +000016630 if (strcmp(buffer, "123"))
16631 return 1;
16632
16633 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16634 return 1;
16635
16636 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016637 return 1;
16638
16639 return 0;
16640}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016641
Thomas Wouters477c8d52006-05-27 19:21:47 +000016642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016643if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016644 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016645else
Matthias Kloseb9621712010-04-24 17:59:49 +000016646 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016650fi
16651
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16654$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016655if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016656
Matthias Kloseb9621712010-04-24 17:59:49 +000016657$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016658
16659fi
16660
Matthias Kloseb9621712010-04-24 17:59:49 +000016661ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016662#ifdef HAVE_SYS_TYPES_H
16663#include <sys/types.h>
16664#endif
16665#ifdef HAVE_SYS_SOCKET_H
16666#include <sys/socket.h>
16667#endif
16668
Matthias Kloseb9621712010-04-24 17:59:49 +000016669"
Victor Stinnere0be4232011-10-25 13:06:09 +020016670if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016671
Martin v. Löwis11437992002-04-12 09:54:03 +000016672else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016673
Matthias Kloseb9621712010-04-24 17:59:49 +000016674$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016675
16676fi
16677
Michael W. Hudson54241132001-12-07 15:38:26 +000016678
Matthias Kloseb9621712010-04-24 17:59:49 +000016679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16680$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016681if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016682 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016683else
Matthias Kloseb9621712010-04-24 17:59:49 +000016684 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016685 ac_cv_broken_mbstowcs=no
16686else
Matthias Kloseb9621712010-04-24 17:59:49 +000016687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016688/* end confdefs.h. */
16689
Stefan Krah19c21392012-11-22 23:47:32 +010016690#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016691#include<stdlib.h>
16692int main() {
16693 size_t len = -1;
16694 const char *str = "text";
16695 len = mbstowcs(NULL, str, 0);
16696 return (len != 4);
16697}
16698
16699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016700if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016701 ac_cv_broken_mbstowcs=no
16702else
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016707fi
16708
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016709fi
16710
Matthias Kloseb9621712010-04-24 17:59:49 +000016711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16712$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016713if test "$ac_cv_broken_mbstowcs" = yes
16714then
16715
Matthias Kloseb9621712010-04-24 17:59:49 +000016716$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016717
16718fi
16719
Antoine Pitroub52ec782009-01-25 16:34:23 +000016720# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16722$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016723
16724# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016725if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016726 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016727if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016728then
16729
Matthias Kloseb9621712010-04-24 17:59:49 +000016730$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016731
Matthias Kloseb9621712010-04-24 17:59:49 +000016732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16733$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016734fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016735if test "$withval" = no
16736then
16737
16738$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16739
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16741$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016742fi
16743
Antoine Pitrou042b1282010-08-13 21:15:58 +000016744else
16745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16746$as_echo "no value specified" >&6; }
16747fi
16748
Antoine Pitroub52ec782009-01-25 16:34:23 +000016749
Matthias Kloseb17289e2012-03-15 19:51:34 +010016750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16751$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16752if ${ac_cv_computed_gotos+:} false; then :
16753 $as_echo_n "(cached) " >&6
16754else
16755 if test "$cross_compiling" = yes; then :
16756 if test "${with_computed_gotos+set}" = set; then
16757 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16758 else
16759 ac_cv_computed_gotos=no
16760 fi
16761else
16762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763/* end confdefs.h. */
16764
16765int main(int argc, char **argv)
16766{
16767 static void *targets[1] = { &&LABEL1 };
16768 goto LABEL2;
16769LABEL1:
16770 return 0;
16771LABEL2:
16772 goto *targets[0];
16773 return 1;
16774}
16775
16776_ACEOF
16777if ac_fn_c_try_run "$LINENO"; then :
16778 ac_cv_computed_gotos=yes
16779else
16780 ac_cv_computed_gotos=no
16781fi
16782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16783 conftest.$ac_objext conftest.beam conftest.$ac_ext
16784fi
16785
16786fi
16787
16788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16789$as_echo "$ac_cv_computed_gotos" >&6; }
16790case "$ac_cv_computed_gotos" in yes*)
16791
16792$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16793
16794esac
16795
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016796case $ac_sys_system in
16797AIX*)
16798
16799$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16800 ;;
16801esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016802
Michael W. Hudson54241132001-12-07 15:38:26 +000016803
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016804
16805
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016806for h in `(cd $srcdir;echo Python/thread_*.h)`
16807do
16808 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16809done
16810
Michael W. Hudson54241132001-12-07 15:38:26 +000016811
Ned Deily8d02f912020-06-25 10:46:44 -040016812SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16814$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016815for dir in $SRCDIRS; do
16816 if test ! -d $dir; then
16817 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016818 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016819done
Matthias Kloseb9621712010-04-24 17:59:49 +000016820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16821$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016822
Stefan Krah1919b7e2012-03-21 18:25:23 +010016823# Availability of -O2:
16824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16825$as_echo_n "checking for -O2... " >&6; }
16826saved_cflags="$CFLAGS"
16827CFLAGS="-O2"
16828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16829/* end confdefs.h. */
16830
16831int
16832main ()
16833{
16834
16835
16836 ;
16837 return 0;
16838}
16839_ACEOF
16840if ac_fn_c_try_compile "$LINENO"; then :
16841 have_O2=yes
16842else
16843 have_O2=no
16844fi
16845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16847$as_echo "$have_O2" >&6; }
16848CFLAGS="$saved_cflags"
16849
16850# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16851# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16853$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16854saved_cflags="$CFLAGS"
16855CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16856if test "$have_O2" = no; then
16857 CFLAGS=""
16858fi
16859if test "$cross_compiling" = yes; then :
16860 have_glibc_memmove_bug=undefined
16861else
16862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16863/* end confdefs.h. */
16864
16865#include <stdio.h>
16866#include <stdlib.h>
16867#include <string.h>
16868void foo(void *p, void *q) { memmove(p, q, 19); }
16869int main() {
16870 char a[32] = "123456789000000000";
16871 foo(&a[9], a);
16872 if (strcmp(a, "123456789123456789000000000") != 0)
16873 return 1;
16874 foo(a, &a[9]);
16875 if (strcmp(a, "123456789000000000") != 0)
16876 return 1;
16877 return 0;
16878}
16879
16880_ACEOF
16881if ac_fn_c_try_run "$LINENO"; then :
16882 have_glibc_memmove_bug=no
16883else
16884 have_glibc_memmove_bug=yes
16885fi
16886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16887 conftest.$ac_objext conftest.beam conftest.$ac_ext
16888fi
16889
16890CFLAGS="$saved_cflags"
16891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16892$as_echo "$have_glibc_memmove_bug" >&6; }
16893if test "$have_glibc_memmove_bug" = yes; then
16894
16895$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16896
16897fi
16898
16899if test "$have_gcc_asm_for_x87" = yes; then
16900 # Some versions of gcc miscompile inline asm:
16901 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16902 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16903 case $CC in
16904 *gcc*)
16905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16906$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16907 saved_cflags="$CFLAGS"
16908 CFLAGS="-O2"
16909 if test "$cross_compiling" = yes; then :
16910 have_ipa_pure_const_bug=undefined
16911else
16912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16913/* end confdefs.h. */
16914
16915 __attribute__((noinline)) int
16916 foo(int *p) {
16917 int r;
16918 asm ( "movl \$6, (%1)\n\t"
16919 "xorl %0, %0\n\t"
16920 : "=r" (r) : "r" (p) : "memory"
16921 );
16922 return r;
16923 }
16924 int main() {
16925 int p = 8;
16926 if ((foo(&p) ? : p) != 6)
16927 return 1;
16928 return 0;
16929 }
16930
16931_ACEOF
16932if ac_fn_c_try_run "$LINENO"; then :
16933 have_ipa_pure_const_bug=no
16934else
16935 have_ipa_pure_const_bug=yes
16936fi
16937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16938 conftest.$ac_objext conftest.beam conftest.$ac_ext
16939fi
16940
16941 CFLAGS="$saved_cflags"
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16943$as_echo "$have_ipa_pure_const_bug" >&6; }
16944 if test "$have_ipa_pure_const_bug" = yes; then
16945
16946$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16947
16948 fi
16949 ;;
16950 esac
16951fi
16952
Victor Stinner4f5366e2015-01-09 02:13:19 +010016953# Check for stdatomic.h
16954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16955$as_echo_n "checking for stdatomic.h... " >&6; }
16956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16957/* end confdefs.h. */
16958
16959
16960 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016961 atomic_int int_var;
16962 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016963 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016964 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16965 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16966 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016967 return 0;
16968 }
16969
16970
16971_ACEOF
16972if ac_fn_c_try_link "$LINENO"; then :
16973 have_stdatomic_h=yes
16974else
16975 have_stdatomic_h=no
16976fi
16977rm -f core conftest.err conftest.$ac_objext \
16978 conftest$ac_exeext conftest.$ac_ext
16979
16980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16981$as_echo "$have_stdatomic_h" >&6; }
16982
16983if test "$have_stdatomic_h" = yes; then
16984
16985$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16986
16987fi
16988
16989# Check for GCC >= 4.7 __atomic builtins
16990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16991$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16993/* end confdefs.h. */
16994
16995
16996 volatile int val = 1;
16997 int main() {
16998 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16999 return 0;
17000 }
17001
17002
17003_ACEOF
17004if ac_fn_c_try_link "$LINENO"; then :
17005 have_builtin_atomic=yes
17006else
17007 have_builtin_atomic=no
17008fi
17009rm -f core conftest.err conftest.$ac_objext \
17010 conftest$ac_exeext conftest.$ac_ext
17011
17012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17013$as_echo "$have_builtin_atomic" >&6; }
17014
17015if test "$have_builtin_atomic" = yes; then
17016
17017$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17018
17019fi
17020
Ned Deily322f5ba2013-11-21 23:01:59 -080017021# ensurepip option
17022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17023$as_echo_n "checking for ensurepip... " >&6; }
17024
17025# Check whether --with-ensurepip was given.
17026if test "${with_ensurepip+set}" = set; then :
17027 withval=$with_ensurepip;
17028else
17029 with_ensurepip=upgrade
17030fi
17031
17032case $with_ensurepip in #(
17033 yes|upgrade) :
17034 ENSUREPIP=upgrade ;; #(
17035 install) :
17036 ENSUREPIP=install ;; #(
17037 no) :
17038 ENSUREPIP=no ;; #(
17039 *) :
17040 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17041esac
17042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17043$as_echo "$ENSUREPIP" >&6; }
17044
17045
Victor Stinner35a97c02015-03-08 02:59:09 +010017046# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17048$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17050/* end confdefs.h. */
17051
17052
17053 #include <dirent.h>
17054
17055 int main() {
17056 struct dirent entry;
17057 return entry.d_type == DT_UNKNOWN;
17058 }
17059
17060
17061_ACEOF
17062if ac_fn_c_try_link "$LINENO"; then :
17063 have_dirent_d_type=yes
17064else
17065 have_dirent_d_type=no
17066fi
17067rm -f core conftest.err conftest.$ac_objext \
17068 conftest$ac_exeext conftest.$ac_ext
17069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17070$as_echo "$have_dirent_d_type" >&6; }
17071
17072if test "$have_dirent_d_type" = yes; then
17073
17074$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17075
17076fi
17077
Victor Stinner9eb57c52015-03-19 22:21:49 +010017078# check if the Linux getrandom() syscall is available
17079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17080$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082/* end confdefs.h. */
17083
17084
Victor Stinner1b80b242016-04-12 22:34:58 +020017085 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017086 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017087 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017088
17089 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017090 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017091 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017092 const int flags = GRND_NONBLOCK;
17093 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017094 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017095 return 0;
17096 }
17097
17098
17099_ACEOF
17100if ac_fn_c_try_link "$LINENO"; then :
17101 have_getrandom_syscall=yes
17102else
17103 have_getrandom_syscall=no
17104fi
17105rm -f core conftest.err conftest.$ac_objext \
17106 conftest$ac_exeext conftest.$ac_ext
17107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17108$as_echo "$have_getrandom_syscall" >&6; }
17109
17110if test "$have_getrandom_syscall" = yes; then
17111
17112$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17113
17114fi
17115
Victor Stinner3abf44e2015-09-18 15:38:37 +020017116# check if the getrandom() function is available
17117# the test was written for the Solaris function of <sys/random.h>
17118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17119$as_echo_n "checking for the getrandom() function... " >&6; }
17120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17121/* end confdefs.h. */
17122
17123
17124 #include <sys/random.h>
17125
17126 int main() {
17127 char buffer[1];
17128 const size_t buflen = sizeof(buffer);
17129 const int flags = 0;
17130 /* ignore the result, Python checks for ENOSYS at runtime */
17131 (void)getrandom(buffer, buflen, flags);
17132 return 0;
17133 }
17134
17135
17136_ACEOF
17137if ac_fn_c_try_link "$LINENO"; then :
17138 have_getrandom=yes
17139else
17140 have_getrandom=no
17141fi
17142rm -f core conftest.err conftest.$ac_objext \
17143 conftest$ac_exeext conftest.$ac_ext
17144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17145$as_echo "$have_getrandom" >&6; }
17146
17147if test "$have_getrandom" = yes; then
17148
17149$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17150
17151fi
17152
Neil Schemenauer5741c452019-02-08 10:48:46 -080017153# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17154# shm_* may only be available if linking against librt
17155save_LIBS="$LIBS"
17156save_includes_default="$ac_includes_default"
17157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17158$as_echo_n "checking for library containing shm_open... " >&6; }
17159if ${ac_cv_search_shm_open+:} false; then :
17160 $as_echo_n "(cached) " >&6
17161else
17162 ac_func_search_save_LIBS=$LIBS
17163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17164/* end confdefs.h. */
17165
17166/* Override any GCC internal prototype to avoid an error.
17167 Use char because int might match the return type of a GCC
17168 builtin and then its argument prototype would still apply. */
17169#ifdef __cplusplus
17170extern "C"
17171#endif
17172char shm_open ();
17173int
17174main ()
17175{
17176return shm_open ();
17177 ;
17178 return 0;
17179}
17180_ACEOF
17181for ac_lib in '' rt; do
17182 if test -z "$ac_lib"; then
17183 ac_res="none required"
17184 else
17185 ac_res=-l$ac_lib
17186 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17187 fi
17188 if ac_fn_c_try_link "$LINENO"; then :
17189 ac_cv_search_shm_open=$ac_res
17190fi
17191rm -f core conftest.err conftest.$ac_objext \
17192 conftest$ac_exeext
17193 if ${ac_cv_search_shm_open+:} false; then :
17194 break
17195fi
17196done
17197if ${ac_cv_search_shm_open+:} false; then :
17198
17199else
17200 ac_cv_search_shm_open=no
17201fi
17202rm conftest.$ac_ext
17203LIBS=$ac_func_search_save_LIBS
17204fi
17205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17206$as_echo "$ac_cv_search_shm_open" >&6; }
17207ac_res=$ac_cv_search_shm_open
17208if test "$ac_res" != no; then :
17209 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17210
17211fi
17212
17213if test "$ac_cv_search_shm_open" = "-lrt"; then
17214
17215$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17216
17217fi
17218for ac_header in sys/mman.h
17219do :
17220 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17221if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17222 cat >>confdefs.h <<_ACEOF
17223#define HAVE_SYS_MMAN_H 1
17224_ACEOF
17225
17226fi
17227
17228done
17229
17230# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17231ac_includes_default="\
17232${ac_includes_default}
17233#ifndef __cplusplus
17234# ifdef HAVE_SYS_MMAN_H
17235# include <sys/mman.h>
17236# endif
17237#endif
17238"
17239for ac_func in shm_open shm_unlink
17240do :
17241 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17242ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17243if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17244 cat >>confdefs.h <<_ACEOF
17245#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17246_ACEOF
17247
17248fi
17249done
17250
17251# we don't want to link with librt always, restore LIBS
17252LIBS="$save_LIBS"
17253ac_includes_default="$save_includes_default"
17254
Christian Heimesff5be6e2018-01-20 13:19:21 +010017255# Check for usable OpenSSL
17256
17257 found=false
17258
17259# Check whether --with-openssl was given.
17260if test "${with_openssl+set}" = set; then :
17261 withval=$with_openssl;
17262 case "$withval" in
17263 "" | y | ye | yes | n | no)
17264 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17265 ;;
17266 *) ssldirs="$withval"
17267 ;;
17268 esac
17269
17270else
17271
17272 # if pkg-config is installed and openssl has installed a .pc file,
17273 # then use that information and don't search ssldirs
17274 if test -n "$ac_tool_prefix"; then
17275 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17276set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17278$as_echo_n "checking for $ac_word... " >&6; }
17279if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17280 $as_echo_n "(cached) " >&6
17281else
17282 if test -n "$PKG_CONFIG"; then
17283 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17284else
17285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17286for as_dir in $PATH
17287do
17288 IFS=$as_save_IFS
17289 test -z "$as_dir" && as_dir=.
17290 for ac_exec_ext in '' $ac_executable_extensions; do
17291 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17292 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17294 break 2
17295 fi
17296done
17297 done
17298IFS=$as_save_IFS
17299
17300fi
17301fi
17302PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17303if test -n "$PKG_CONFIG"; then
17304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17305$as_echo "$PKG_CONFIG" >&6; }
17306else
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17308$as_echo "no" >&6; }
17309fi
17310
17311
17312fi
17313if test -z "$ac_cv_prog_PKG_CONFIG"; then
17314 ac_ct_PKG_CONFIG=$PKG_CONFIG
17315 # Extract the first word of "pkg-config", so it can be a program name with args.
17316set dummy pkg-config; ac_word=$2
17317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17318$as_echo_n "checking for $ac_word... " >&6; }
17319if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17320 $as_echo_n "(cached) " >&6
17321else
17322 if test -n "$ac_ct_PKG_CONFIG"; then
17323 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17324else
17325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17326for as_dir in $PATH
17327do
17328 IFS=$as_save_IFS
17329 test -z "$as_dir" && as_dir=.
17330 for ac_exec_ext in '' $ac_executable_extensions; do
17331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17332 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17334 break 2
17335 fi
17336done
17337 done
17338IFS=$as_save_IFS
17339
17340fi
17341fi
17342ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17343if test -n "$ac_ct_PKG_CONFIG"; then
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17345$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17346else
17347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349fi
17350
17351 if test "x$ac_ct_PKG_CONFIG" = x; then
17352 PKG_CONFIG=""
17353 else
17354 case $cross_compiling:$ac_tool_warned in
17355yes:)
17356{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17357$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17358ac_tool_warned=yes ;;
17359esac
17360 PKG_CONFIG=$ac_ct_PKG_CONFIG
17361 fi
17362else
17363 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17364fi
17365
17366 if test x"$PKG_CONFIG" != x""; then
17367 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17368 if test $? = 0; then
17369 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17370 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17371 found=true
17372 fi
17373 fi
17374
17375 # no such luck; use some default ssldirs
17376 if ! $found; then
17377 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17378 fi
17379
17380
17381fi
17382
17383
17384
17385 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17386 # an 'openssl' subdirectory
17387
17388 if ! $found; then
17389 OPENSSL_INCLUDES=
17390 for ssldir in $ssldirs; do
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17392$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17393 if test -f "$ssldir/include/openssl/ssl.h"; then
17394 OPENSSL_INCLUDES="-I$ssldir/include"
17395 OPENSSL_LDFLAGS="-L$ssldir/lib"
17396 OPENSSL_LIBS="-lssl -lcrypto"
17397 found=true
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17399$as_echo "yes" >&6; }
17400 break
17401 else
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17403$as_echo "no" >&6; }
17404 fi
17405 done
17406
17407 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17408 # it will just work!
17409 fi
17410
17411 # try the preprocessor and linker with our new flags,
17412 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17413
17414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17415$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17416 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17417 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17418
17419 save_LIBS="$LIBS"
17420 save_LDFLAGS="$LDFLAGS"
17421 save_CPPFLAGS="$CPPFLAGS"
17422 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17423 LIBS="$OPENSSL_LIBS $LIBS"
17424 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17426/* end confdefs.h. */
17427#include <openssl/ssl.h>
17428int
17429main ()
17430{
17431SSL_new(NULL)
17432 ;
17433 return 0;
17434}
17435_ACEOF
17436if ac_fn_c_try_link "$LINENO"; then :
17437
17438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17439$as_echo "yes" >&6; }
17440 have_openssl=yes
17441
17442else
17443
17444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17445$as_echo "no" >&6; }
17446 have_openssl=no
17447
17448fi
17449rm -f core conftest.err conftest.$ac_objext \
17450 conftest$ac_exeext conftest.$ac_ext
17451 CPPFLAGS="$save_CPPFLAGS"
17452 LDFLAGS="$save_LDFLAGS"
17453 LIBS="$save_LIBS"
17454
17455
17456
17457
17458
17459
17460if test "$have_openssl" = yes; then
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17462$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17463
17464 save_LIBS="$LIBS"
17465 save_LDFLAGS="$LDFLAGS"
17466 save_CPPFLAGS="$CPPFLAGS"
17467 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17468 LIBS="$OPENSSL_LIBS $LIBS"
17469 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17470
17471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17472/* end confdefs.h. */
17473
17474 #include <openssl/x509_vfy.h>
17475
17476int
17477main ()
17478{
17479
17480 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17481 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17482 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17483 X509_VERIFY_PARAM_set_hostflags(p, 0);
17484
17485 ;
17486 return 0;
17487}
17488
17489_ACEOF
17490if ac_fn_c_try_link "$LINENO"; then :
17491
17492 ac_cv_has_x509_verify_param_set1_host=yes
17493
17494else
17495
17496 ac_cv_has_x509_verify_param_set1_host=no
17497
17498fi
17499rm -f core conftest.err conftest.$ac_objext \
17500 conftest$ac_exeext conftest.$ac_ext
17501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17502$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17503 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17504
17505$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17506
17507 fi
17508
17509 CPPFLAGS="$save_CPPFLAGS"
17510 LDFLAGS="$save_LDFLAGS"
17511 LIBS="$save_LIBS"
17512fi
17513
Christian Heimes892d66e2018-01-29 14:10:18 +010017514# ssl module default cipher suite string
17515
17516
17517
17518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17519$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17520
17521# Check whether --with-ssl-default-suites was given.
17522if test "${with_ssl_default_suites+set}" = set; then :
17523 withval=$with_ssl_default_suites;
17524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17525$as_echo "$withval" >&6; }
17526case "$withval" in
17527 python)
17528 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17529
17530 ;;
17531 openssl)
17532 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17533
17534 ;;
17535 *)
17536 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17537
17538 cat >>confdefs.h <<_ACEOF
17539#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17540_ACEOF
17541
17542 ;;
17543esac
17544
17545else
17546
17547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17548$as_echo "python" >&6; }
17549$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17550
17551
17552fi
17553
17554
Christian Heimes9b60e552020-05-15 23:54:53 +020017555# builtin hash modules
17556default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17557
17558$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17559
17560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17561$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17562
17563# Check whether --with-builtin-hashlib-hashes was given.
17564if test "${with_builtin_hashlib_hashes+set}" = set; then :
17565 withval=$with_builtin_hashlib_hashes;
17566case "$withval" in
17567 yes)
17568 withval=$default_hashlib_hashes
17569 ;;
17570 no)
17571 withval=""
17572 ;;
17573esac
17574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17575$as_echo "$withval" >&6; }
17576cat >>confdefs.h <<_ACEOF
17577#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17578_ACEOF
17579
17580
17581else
17582
17583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17584$as_echo "$default_hashlib_hashes" >&6; };
17585cat >>confdefs.h <<_ACEOF
17586#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17587_ACEOF
17588
17589
17590fi
17591
17592
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017593# --with-experimental-isolated-subinterpreters
17594
17595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17596$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17597
17598# Check whether --with-experimental-isolated-subinterpreters was given.
17599if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17600 withval=$with_experimental_isolated_subinterpreters;
17601if test "$withval" != no
17602then
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17604$as_echo "yes" >&6; };
17605 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17606
17607else
17608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17609$as_echo "no" >&6; };
17610fi
17611else
17612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17613$as_echo "no" >&6; }
17614fi
17615
17616
Christian Heimes892d66e2018-01-29 14:10:18 +010017617
Guido van Rossum627b2d71993-12-24 10:39:16 +000017618# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017619ac_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 +000017620
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017621ac_config_files="$ac_config_files Modules/ld_so_aix"
17622
Martin v. Löwis11437992002-04-12 09:54:03 +000017623cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017624# This file is a shell script that caches the results of configure
17625# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017626# scripts and configure runs, see configure's option --config-cache.
17627# It is not useful on other systems. If it contains results you don't
17628# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017629#
Martin v. Löwis11437992002-04-12 09:54:03 +000017630# config.status only pays attention to the cache file if you give it
17631# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017632#
Skip Montanaro6dead952003-09-25 14:50:04 +000017633# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017634# loading this file, other *unset* `ac_cv_foo' will be assigned the
17635# following values.
17636
17637_ACEOF
17638
Guido van Rossumf78abae1997-01-21 22:02:36 +000017639# The following way of writing the cache mishandles newlines in values,
17640# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017642# Ultrix sh set writes to stderr and can't be redirected directly,
17643# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644(
17645 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17646 eval ac_val=\$$ac_var
17647 case $ac_val in #(
17648 *${as_nl}*)
17649 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017650 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17651$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652 esac
17653 case $ac_var in #(
17654 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17656 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 esac ;;
17658 esac
17659 done
17660
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17663 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017664 # `set' does not quote correctly, so add quotes: double-quote
17665 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017667 "s/'/'\\\\''/g;
17668 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 *)
17671 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017673 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674 esac |
17675 sort
17676) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017677 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017679 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017681 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17682 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17684 :end' >>confcache
17685if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17686 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017687 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017688 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17689$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017690 if test ! -f "$cache_file" || test -h "$cache_file"; then
17691 cat confcache >"$cache_file"
17692 else
17693 case $cache_file in #(
17694 */* | ?:*)
17695 mv -f confcache "$cache_file"$$ &&
17696 mv -f "$cache_file"$$ "$cache_file" ;; #(
17697 *)
17698 mv -f confcache "$cache_file" ;;
17699 esac
17700 fi
17701 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017702 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017703 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17704$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017705 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017706fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017707rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017708
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017709test "x$prefix" = xNONE && prefix=$ac_default_prefix
17710# Let make expand exec_prefix.
17711test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017712
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017713DEFS=-DHAVE_CONFIG_H
17714
Skip Montanaro6dead952003-09-25 14:50:04 +000017715ac_libobjs=
17716ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017717U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017718for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17719 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17723 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017724 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17725 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017726done
17727LIBOBJS=$ac_libobjs
17728
17729LTLIBOBJS=$ac_ltlibobjs
17730
17731
Martin v. Löwis11437992002-04-12 09:54:03 +000017732
Matthias Kloseb9621712010-04-24 17:59:49 +000017733
Victor Stinnere0be4232011-10-25 13:06:09 +020017734: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017735ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017736ac_clean_files_save=$ac_clean_files
17737ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017738{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17739$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17740as_write_fail=0
17741cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017742#! $SHELL
17743# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017744# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017745# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017746# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017747
Martin v. Löwis11437992002-04-12 09:54:03 +000017748debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017749ac_cs_recheck=false
17750ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017751
Matthias Kloseb9621712010-04-24 17:59:49 +000017752SHELL=\${CONFIG_SHELL-$SHELL}
17753export SHELL
17754_ASEOF
17755cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17756## -------------------- ##
17757## M4sh Initialization. ##
17758## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760# Be more Bourne compatible
17761DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017762if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017763 emulate sh
17764 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017766 # is contrary to our usage. Disable this feature.
17767 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017769else
Matthias Kloseb9621712010-04-24 17:59:49 +000017770 case `(set -o) 2>/dev/null` in #(
17771 *posix*) :
17772 set -o posix ;; #(
17773 *) :
17774 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017775esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017776fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017777
17778
Matthias Kloseb9621712010-04-24 17:59:49 +000017779as_nl='
17780'
17781export as_nl
17782# Printing a long string crashes Solaris 7 /usr/bin/printf.
17783as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17784as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17785as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17786# Prefer a ksh shell builtin over an external printf program on Solaris,
17787# but without wasting forks for bash or zsh.
17788if test -z "$BASH_VERSION$ZSH_VERSION" \
17789 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17790 as_echo='print -r --'
17791 as_echo_n='print -rn --'
17792elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17793 as_echo='printf %s\n'
17794 as_echo_n='printf %s'
17795else
17796 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17797 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17798 as_echo_n='/usr/ucb/echo -n'
17799 else
17800 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17801 as_echo_n_body='eval
17802 arg=$1;
17803 case $arg in #(
17804 *"$as_nl"*)
17805 expr "X$arg" : "X\\(.*\\)$as_nl";
17806 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17807 esac;
17808 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17809 '
17810 export as_echo_n_body
17811 as_echo_n='sh -c $as_echo_n_body as_echo'
17812 fi
17813 export as_echo_body
17814 as_echo='sh -c $as_echo_body as_echo'
17815fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017816
17817# The user is always right.
17818if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017819 PATH_SEPARATOR=:
17820 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17821 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17822 PATH_SEPARATOR=';'
17823 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826
17827# IFS
17828# We need space, tab and new line, in precisely that order. Quoting is
17829# there to prevent editors from complaining about space-tab.
17830# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17831# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832IFS=" "" $as_nl"
17833
17834# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017835as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017836case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837 *[\\/]* ) as_myself=$0 ;;
17838 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017839for as_dir in $PATH
17840do
17841 IFS=$as_save_IFS
17842 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017843 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17844 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847 ;;
17848esac
17849# We did not find ourselves, most probably we were run as `sh COMMAND'
17850# in which case we are not to be found in the path.
17851if test "x$as_myself" = x; then
17852 as_myself=$0
17853fi
17854if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017855 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17856 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857fi
17858
Matthias Kloseb9621712010-04-24 17:59:49 +000017859# Unset variables that we do not need and which cause bugs (e.g. in
17860# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17861# suppresses any "Segmentation fault" message there. '((' could
17862# trigger a bug in pdksh 5.2.14.
17863for as_var in BASH_ENV ENV MAIL MAILPATH
17864do eval test x\${$as_var+set} = xset \
17865 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866done
17867PS1='$ '
17868PS2='> '
17869PS4='+ '
17870
17871# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017872LC_ALL=C
17873export LC_ALL
17874LANGUAGE=C
17875export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876
Matthias Kloseb9621712010-04-24 17:59:49 +000017877# CDPATH.
17878(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17879
17880
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017881# as_fn_error STATUS ERROR [LINENO LOG_FD]
17882# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017883# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17884# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017885# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017886as_fn_error ()
17887{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017888 as_status=$1; test $as_status -eq 0 && as_status=1
17889 if test "$4"; then
17890 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17891 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017892 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017893 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017894 as_fn_exit $as_status
17895} # as_fn_error
17896
17897
17898# as_fn_set_status STATUS
17899# -----------------------
17900# Set $? to STATUS, without forking.
17901as_fn_set_status ()
17902{
17903 return $1
17904} # as_fn_set_status
17905
17906# as_fn_exit STATUS
17907# -----------------
17908# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17909as_fn_exit ()
17910{
17911 set +e
17912 as_fn_set_status $1
17913 exit $1
17914} # as_fn_exit
17915
17916# as_fn_unset VAR
17917# ---------------
17918# Portably unset VAR.
17919as_fn_unset ()
17920{
17921 { eval $1=; unset $1;}
17922}
17923as_unset=as_fn_unset
17924# as_fn_append VAR VALUE
17925# ----------------------
17926# Append the text in VALUE to the end of the definition contained in VAR. Take
17927# advantage of any shell optimizations that allow amortized linear growth over
17928# repeated appends, instead of the typical quadratic growth present in naive
17929# implementations.
17930if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17931 eval 'as_fn_append ()
17932 {
17933 eval $1+=\$2
17934 }'
17935else
17936 as_fn_append ()
17937 {
17938 eval $1=\$$1\$2
17939 }
17940fi # as_fn_append
17941
17942# as_fn_arith ARG...
17943# ------------------
17944# Perform arithmetic evaluation on the ARGs, and store the result in the
17945# global $as_val. Take advantage of shells that can avoid forks. The arguments
17946# must be portable across $(()) and expr.
17947if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17948 eval 'as_fn_arith ()
17949 {
17950 as_val=$(( $* ))
17951 }'
17952else
17953 as_fn_arith ()
17954 {
17955 as_val=`expr "$@" || test $? -eq 1`
17956 }
17957fi # as_fn_arith
17958
17959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960if expr a : '\(a\)' >/dev/null 2>&1 &&
17961 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17962 as_expr=expr
17963else
17964 as_expr=false
17965fi
17966
17967if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17968 as_basename=basename
17969else
17970 as_basename=false
17971fi
17972
Matthias Kloseb9621712010-04-24 17:59:49 +000017973if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17974 as_dirname=dirname
17975else
17976 as_dirname=false
17977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979as_me=`$as_basename -- "$0" ||
17980$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17981 X"$0" : 'X\(//\)$' \| \
17982 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017983$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 sed '/^.*\/\([^/][^/]*\)\/*$/{
17985 s//\1/
17986 q
17987 }
17988 /^X\/\(\/\/\)$/{
17989 s//\1/
17990 q
17991 }
17992 /^X\/\(\/\).*/{
17993 s//\1/
17994 q
17995 }
17996 s/.*/./; q'`
17997
Matthias Kloseb9621712010-04-24 17:59:49 +000017998# Avoid depending upon Character Ranges.
17999as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18000as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18001as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18002as_cr_digits='0123456789'
18003as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004
18005ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018006case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018008 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 xy) ECHO_C='\c';;
18011 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18012 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013 esac;;
18014*)
18015 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018016esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018017
Martin v. Löwis11437992002-04-12 09:54:03 +000018018rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019if test -d conf$$.dir; then
18020 rm -f conf$$.dir/conf$$.file
18021else
18022 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018023 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018025if (echo >conf$$.file) 2>/dev/null; then
18026 if ln -s conf$$.file conf$$ 2>/dev/null; then
18027 as_ln_s='ln -s'
18028 # ... but there are two gotchas:
18029 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18030 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018031 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018032 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018033 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018034 elif ln conf$$.file conf$$ 2>/dev/null; then
18035 as_ln_s=ln
18036 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018037 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018038 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018039else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018040 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18043rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018044
Matthias Kloseb9621712010-04-24 17:59:49 +000018045
18046# as_fn_mkdir_p
18047# -------------
18048# Create "$as_dir" as a directory, including parents if necessary.
18049as_fn_mkdir_p ()
18050{
18051
18052 case $as_dir in #(
18053 -*) as_dir=./$as_dir;;
18054 esac
18055 test -d "$as_dir" || eval $as_mkdir_p || {
18056 as_dirs=
18057 while :; do
18058 case $as_dir in #(
18059 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18060 *) as_qdir=$as_dir;;
18061 esac
18062 as_dirs="'$as_qdir' $as_dirs"
18063 as_dir=`$as_dirname -- "$as_dir" ||
18064$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18065 X"$as_dir" : 'X\(//\)[^/]' \| \
18066 X"$as_dir" : 'X\(//\)$' \| \
18067 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18068$as_echo X"$as_dir" |
18069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18070 s//\1/
18071 q
18072 }
18073 /^X\(\/\/\)[^/].*/{
18074 s//\1/
18075 q
18076 }
18077 /^X\(\/\/\)$/{
18078 s//\1/
18079 q
18080 }
18081 /^X\(\/\).*/{
18082 s//\1/
18083 q
18084 }
18085 s/.*/./; q'`
18086 test -d "$as_dir" && break
18087 done
18088 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018089 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018090
18091
18092} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018093if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018094 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018095else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018096 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018097 as_mkdir_p=false
18098fi
18099
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018100
18101# as_fn_executable_p FILE
18102# -----------------------
18103# Test if FILE is an executable regular file.
18104as_fn_executable_p ()
18105{
18106 test -f "$1" && test -x "$1"
18107} # as_fn_executable_p
18108as_test_x='test -x'
18109as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018110
18111# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018112as_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 +000018113
18114# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018115as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018116
18117
Martin v. Löwis11437992002-04-12 09:54:03 +000018118exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018119## ----------------------------------- ##
18120## Main body of $CONFIG_STATUS script. ##
18121## ----------------------------------- ##
18122_ASEOF
18123test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018124
Matthias Kloseb9621712010-04-24 17:59:49 +000018125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18126# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018127# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128# values after options handling.
18129ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018130This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018131generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018132
18133 CONFIG_FILES = $CONFIG_FILES
18134 CONFIG_HEADERS = $CONFIG_HEADERS
18135 CONFIG_LINKS = $CONFIG_LINKS
18136 CONFIG_COMMANDS = $CONFIG_COMMANDS
18137 $ $0 $@
18138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139on `(hostname || uname -n) 2>/dev/null | sed 1q`
18140"
18141
Martin v. Löwis11437992002-04-12 09:54:03 +000018142_ACEOF
18143
Matthias Kloseb9621712010-04-24 17:59:49 +000018144case $ac_config_files in *"
18145"*) set x $ac_config_files; shift; ac_config_files=$*;;
18146esac
18147
18148case $ac_config_headers in *"
18149"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18150esac
18151
18152
18153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018154# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018155config_files="$ac_config_files"
18156config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018159
Matthias Kloseb9621712010-04-24 17:59:49 +000018160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018161ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018162\`$as_me' instantiates files and other configuration actions
18163from templates according to the current configuration. Unless the files
18164and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018165
Matthias Kloseb9621712010-04-24 17:59:49 +000018166Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
18168 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018169 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018170 --config print configuration, then exit
18171 -q, --quiet, --silent
18172 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018173 -d, --debug don't remove temporary files
18174 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018175 --file=FILE[:TEMPLATE]
18176 instantiate the configuration file FILE
18177 --header=FILE[:TEMPLATE]
18178 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018179
18180Configuration files:
18181$config_files
18182
18183Configuration headers:
18184$config_headers
18185
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018186Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018189cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18190ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018191ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018192python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018193configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018194 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018195
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018196Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018197This config.status script is free software; the Free Software Foundation
18198gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199
18200ac_pwd='$ac_pwd'
18201srcdir='$srcdir'
18202INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018203MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018204test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018205_ACEOF
18206
Matthias Kloseb9621712010-04-24 17:59:49 +000018207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18208# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018209ac_need_defaults=:
18210while test $# != 0
18211do
18212 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018213 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018214 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18215 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018216 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018217 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018218 --*=)
18219 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18220 ac_optarg=
18221 ac_shift=:
18222 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018224 ac_option=$1
18225 ac_optarg=$2
18226 ac_shift=shift
18227 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018228 esac
18229
Skip Montanaro6dead952003-09-25 14:50:04 +000018230 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018231 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018232 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18233 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018235 $as_echo "$ac_cs_version"; exit ;;
18236 --config | --confi | --conf | --con | --co | --c )
18237 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018238 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018239 debug=: ;;
18240 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018241 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018242 case $ac_optarg in
18243 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018244 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018245 esac
18246 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018247 ac_need_defaults=false;;
18248 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018249 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018250 case $ac_optarg in
18251 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18252 esac
18253 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018254 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018255 --he | --h)
18256 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018257 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018258Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018260 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018261 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18262 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18263 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018264
18265 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018266 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018267Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018268
Matthias Kloseb9621712010-04-24 17:59:49 +000018269 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018271
18272 esac
18273 shift
18274done
18275
Skip Montanaro6dead952003-09-25 14:50:04 +000018276ac_configure_extra_args=
18277
18278if $ac_cs_silent; then
18279 exec 6>/dev/null
18280 ac_configure_extra_args="$ac_configure_extra_args --silent"
18281fi
18282
18283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018284cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018285if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018286 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018287 shift
18288 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18289 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018290 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018291 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018292fi
18293
Martin v. Löwis11437992002-04-12 09:54:03 +000018294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018295cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296exec 5>>config.log
18297{
18298 echo
18299 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18300## Running $as_me. ##
18301_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018302 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018307_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
Matthias Kloseb9621712010-04-24 17:59:49 +000018309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018310
18311# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018312for ac_config_target in $ac_config_targets
18313do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314 case $ac_config_target in
18315 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18316 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18317 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018318 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18319 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018321 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018322 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018323 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018324 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325
Victor Stinnere0be4232011-10-25 13:06:09 +020018326 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 esac
18328done
18329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018330
Martin v. Löwis11437992002-04-12 09:54:03 +000018331# If the user did not use the arguments to specify the items to instantiate,
18332# then the envvar interface is used. Set only those that are not.
18333# We use the long form for the default assignment because of an extremely
18334# bizarre bug on SunOS 4.1.3.
18335if $ac_need_defaults; then
18336 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18337 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18338fi
18339
Skip Montanaro6dead952003-09-25 14:50:04 +000018340# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018342# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343# Hook for its removal unless debugging.
18344# Note that there is a small window in which the directory will not be cleaned:
18345# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018346$debug ||
18347{
Victor Stinnere0be4232011-10-25 13:06:09 +020018348 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018350 : "${ac_tmp:=$tmp}"
18351 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018352' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018353 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018354}
Martin v. Löwis11437992002-04-12 09:54:03 +000018355# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018356
Martin v. Löwis11437992002-04-12 09:54:03 +000018357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018359 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018360} ||
18361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018362 tmp=./conf$$-$RANDOM
18363 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018364} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018365ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018366
Matthias Kloseb9621712010-04-24 17:59:49 +000018367# Set up the scripts for CONFIG_FILES section.
18368# No need to generate them if there are no CONFIG_FILES.
18369# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018371
Matthias Kloseb9621712010-04-24 17:59:49 +000018372
18373ac_cr=`echo X | tr X '\015'`
18374# On cygwin, bash can eat \r inside `` if the user requested igncr.
18375# But we know of no other shell where ac_cr would be empty at this
18376# point, so we can use a bashism as a fallback.
18377if test "x$ac_cr" = x; then
18378 eval ac_cr=\$\'\\r\'
18379fi
18380ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18381if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018382 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018383else
18384 ac_cs_awk_cr=$ac_cr
18385fi
18386
Victor Stinnere0be4232011-10-25 13:06:09 +020018387echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018388_ACEOF
18389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390
Matthias Kloseb9621712010-04-24 17:59:49 +000018391{
18392 echo "cat >conf$$subs.awk <<_ACEOF" &&
18393 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18394 echo "_ACEOF"
18395} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018396 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18397ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398ac_delim='%!_!# '
18399for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018400 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018401 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402
Matthias Kloseb9621712010-04-24 17:59:49 +000018403 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18404 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 break
18406 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018407 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408 else
18409 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411done
Matthias Kloseb9621712010-04-24 17:59:49 +000018412rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413
Matthias Kloseb9621712010-04-24 17:59:49 +000018414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018415cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018417sed -n '
18418h
18419s/^/S["/; s/!.*/"]=/
18420p
18421g
18422s/^[^!]*!//
18423:repl
18424t repl
18425s/'"$ac_delim"'$//
18426t delim
18427:nl
18428h
18429s/\(.\{148\}\)..*/\1/
18430t more1
18431s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18432p
18433n
18434b repl
18435:more1
18436s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18437p
18438g
18439s/.\{148\}//
18440t nl
18441:delim
18442h
18443s/\(.\{148\}\)..*/\1/
18444t more2
18445s/["\\]/\\&/g; s/^/"/; s/$/"/
18446p
18447b
18448:more2
18449s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18450p
18451g
18452s/.\{148\}//
18453t delim
18454' <conf$$subs.awk | sed '
18455/^[^""]/{
18456 N
18457 s/\n//
18458}
18459' >>$CONFIG_STATUS || ac_write_fail=1
18460rm -f conf$$subs.awk
18461cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18462_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018463cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018464 for (key in S) S_is_set[key] = 1
18465 FS = ""
18466
18467}
18468{
18469 line = $ 0
18470 nfields = split(line, field, "@")
18471 substed = 0
18472 len = length(field[1])
18473 for (i = 2; i < nfields; i++) {
18474 key = field[i]
18475 keylen = length(key)
18476 if (S_is_set[key]) {
18477 value = S[key]
18478 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18479 len += length(value) + length(field[++i])
18480 substed = 1
18481 } else
18482 len += 1 + keylen
18483 }
18484
18485 print line
18486}
18487
18488_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18491if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18492 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18493else
18494 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018495fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018496 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018497_ACEOF
18498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018499# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18500# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501# trailing colons and then remove the whole line if VPATH becomes empty
18502# (actually we leave an empty line to preserve line numbers).
18503if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018504 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18505h
18506s///
18507s/^/:/
18508s/[ ]*$/:/
18509s/:\$(srcdir):/:/g
18510s/:\${srcdir}:/:/g
18511s/:@srcdir@:/:/g
18512s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018514x
18515s/\(=[ ]*\).*/\1/
18516G
18517s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518s/^[^=]*=[ ]*$//
18519}'
18520fi
18521
Matthias Kloseb9621712010-04-24 17:59:49 +000018522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018523fi # test -n "$CONFIG_FILES"
18524
Matthias Kloseb9621712010-04-24 17:59:49 +000018525# Set up the scripts for CONFIG_HEADERS section.
18526# No need to generate them if there are no CONFIG_HEADERS.
18527# This happens for instance with `./config.status Makefile'.
18528if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018529cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018530BEGIN {
18531_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532
Matthias Kloseb9621712010-04-24 17:59:49 +000018533# Transform confdefs.h into an awk script `defines.awk', embedded as
18534# here-document in config.status, that substitutes the proper values into
18535# config.h.in to produce config.h.
18536
18537# Create a delimiter string that does not exist in confdefs.h, to ease
18538# handling of long lines.
18539ac_delim='%!_!# '
18540for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018541 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18542 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018543 break
18544 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018545 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018546 else
18547 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18548 fi
18549done
18550
18551# For the awk script, D is an array of macro values keyed by name,
18552# likewise P contains macro parameters if any. Preserve backslash
18553# newline sequences.
18554
18555ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18556sed -n '
18557s/.\{148\}/&'"$ac_delim"'/g
18558t rset
18559:rset
18560s/^[ ]*#[ ]*define[ ][ ]*/ /
18561t def
18562d
18563:def
18564s/\\$//
18565t bsnl
18566s/["\\]/\\&/g
18567s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18568D["\1"]=" \3"/p
18569s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18570d
18571:bsnl
18572s/["\\]/\\&/g
18573s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18574D["\1"]=" \3\\\\\\n"\\/p
18575t cont
18576s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18577t cont
18578d
18579:cont
18580n
18581s/.\{148\}/&'"$ac_delim"'/g
18582t clear
18583:clear
18584s/\\$//
18585t bsnlc
18586s/["\\]/\\&/g; s/^/"/; s/$/"/p
18587d
18588:bsnlc
18589s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18590b cont
18591' <confdefs.h | sed '
18592s/'"$ac_delim"'/"\\\
18593"/g' >>$CONFIG_STATUS || ac_write_fail=1
18594
18595cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18596 for (key in D) D_is_set[key] = 1
18597 FS = ""
18598}
18599/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18600 line = \$ 0
18601 split(line, arg, " ")
18602 if (arg[1] == "#") {
18603 defundef = arg[2]
18604 mac1 = arg[3]
18605 } else {
18606 defundef = substr(arg[1], 2)
18607 mac1 = arg[2]
18608 }
18609 split(mac1, mac2, "(") #)
18610 macro = mac2[1]
18611 prefix = substr(line, 1, index(line, defundef) - 1)
18612 if (D_is_set[macro]) {
18613 # Preserve the white space surrounding the "#".
18614 print prefix "define", macro P[macro] D[macro]
18615 next
18616 } else {
18617 # Replace #undef with comments. This is necessary, for example,
18618 # in the case of _POSIX_SOURCE, which is predefined and required
18619 # on some systems where configure will not decide to define it.
18620 if (defundef == "undef") {
18621 print "/*", prefix defundef, macro, "*/"
18622 next
18623 }
18624 }
18625}
18626{ print }
18627_ACAWK
18628_ACEOF
18629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018630 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018631fi # test -n "$CONFIG_HEADERS"
18632
18633
18634eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18635shift
18636for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018637do
18638 case $ac_tag in
18639 :[FHLC]) ac_mode=$ac_tag; continue;;
18640 esac
18641 case $ac_mode$ac_tag in
18642 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018643 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644 :[FH]-) ac_tag=-:-;;
18645 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18646 esac
18647 ac_save_IFS=$IFS
18648 IFS=:
18649 set x $ac_tag
18650 IFS=$ac_save_IFS
18651 shift
18652 ac_file=$1
18653 shift
18654
18655 case $ac_mode in
18656 :L) ac_source=$1;;
18657 :[FH])
18658 ac_file_inputs=
18659 for ac_f
18660 do
18661 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018662 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663 *) # Look for the file first in the build tree, then in the source tree
18664 # (if the path is not absolute). The absolute path cannot be DOS-style,
18665 # because $ac_f cannot contain `:'.
18666 test -f "$ac_f" ||
18667 case $ac_f in
18668 [\\/$]*) false;;
18669 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18670 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018671 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018672 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018673 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18674 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675 done
18676
18677 # Let's still pretend it is `configure' which instantiates (i.e., don't
18678 # use $as_me), people would be surprised to read:
18679 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018680 configure_input='Generated from '`
18681 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18682 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018683 if test x"$ac_file" != x-; then
18684 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018685 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18686$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018687 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018688 # Neutralize special characters interpreted by sed in replacement strings.
18689 case $configure_input in #(
18690 *\&* | *\|* | *\\* )
18691 ac_sed_conf_input=`$as_echo "$configure_input" |
18692 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18693 *) ac_sed_conf_input=$configure_input;;
18694 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695
18696 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018697 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18698 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018699 esac
18700 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 esac
18702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018703 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018704$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705 X"$ac_file" : 'X\(//\)[^/]' \| \
18706 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018707 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018708$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018709 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18710 s//\1/
18711 q
18712 }
18713 /^X\(\/\/\)[^/].*/{
18714 s//\1/
18715 q
18716 }
18717 /^X\(\/\/\)$/{
18718 s//\1/
18719 q
18720 }
18721 /^X\(\/\).*/{
18722 s//\1/
18723 q
18724 }
18725 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018726 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018727 ac_builddir=.
18728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018729case "$ac_dir" in
18730.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18731*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018732 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018734 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018735 case $ac_top_builddir_sub in
18736 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18737 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18738 esac ;;
18739esac
18740ac_abs_top_builddir=$ac_pwd
18741ac_abs_builddir=$ac_pwd$ac_dir_suffix
18742# for backward compatibility:
18743ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018744
18745case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018746 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018747 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018748 ac_top_srcdir=$ac_top_builddir_sub
18749 ac_abs_top_srcdir=$ac_pwd ;;
18750 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018751 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752 ac_top_srcdir=$srcdir
18753 ac_abs_top_srcdir=$srcdir ;;
18754 *) # Relative name.
18755 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18756 ac_top_srcdir=$ac_top_build_prefix$srcdir
18757 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018758esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018760
Martin v. Löwis11437992002-04-12 09:54:03 +000018761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018762 case $ac_mode in
18763 :F)
18764 #
18765 # CONFIG_FILE
18766 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018767
18768 case $INSTALL in
18769 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018770 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018771 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018772 ac_MKDIR_P=$MKDIR_P
18773 case $MKDIR_P in
18774 [\\/$]* | ?:[\\/]* ) ;;
18775 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18776 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018777_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778
Matthias Kloseb9621712010-04-24 17:59:49 +000018779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018780# If the template does not know about datarootdir, expand it.
18781# FIXME: This hack should be removed a few years after 2.60.
18782ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018783ac_sed_dataroot='
18784/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018785 p
18786 q
18787}
18788/@datadir@/p
18789/@docdir@/p
18790/@infodir@/p
18791/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018792/@mandir@/p'
18793case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018794*datarootdir*) ac_datarootdir_seen=yes;;
18795*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18797$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018800 ac_datarootdir_hack='
18801 s&@datadir@&$datadir&g
18802 s&@docdir@&$docdir&g
18803 s&@infodir@&$infodir&g
18804 s&@localedir@&$localedir&g
18805 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018806 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018807esac
18808_ACEOF
18809
18810# Neutralize VPATH when `$srcdir' = `.'.
18811# Shell code in configure.ac might set extrasub.
18812# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018813cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18814ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018815$extrasub
18816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018817cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018818:t
18819/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018820s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018821s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018822s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823s&@srcdir@&$ac_srcdir&;t t
18824s&@abs_srcdir@&$ac_abs_srcdir&;t t
18825s&@top_srcdir@&$ac_top_srcdir&;t t
18826s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18827s&@builddir@&$ac_builddir&;t t
18828s&@abs_builddir@&$ac_abs_builddir&;t t
18829s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18830s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018831s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018832$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018833"
Victor Stinnere0be4232011-10-25 13:06:09 +020018834eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18835 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018837test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018838 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18839 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18840 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018842which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018843$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018844which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018845
Victor Stinnere0be4232011-10-25 13:06:09 +020018846 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018847 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018848 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18849 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018850 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018851 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018852 ;;
18853 :H)
18854 #
18855 # CONFIG_HEADER
18856 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018858 {
18859 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018860 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18861 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018862 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018863 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018864 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18865$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018866 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018867 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018868 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018869 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018870 fi
18871 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018872 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018873 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018874 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018875 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018876 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018878
18879 esac
18880
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018881
18882 case $ac_file$ac_mode in
18883 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18884
18885 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018886done # for ac_tag
18887
Guido van Rossum627b2d71993-12-24 10:39:16 +000018888
Matthias Kloseb9621712010-04-24 17:59:49 +000018889as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018890_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018891ac_clean_files=$ac_clean_files_save
18892
Matthias Kloseb9621712010-04-24 17:59:49 +000018893test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018894 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018895
Martin v. Löwis11437992002-04-12 09:54:03 +000018896
18897# configure is writing to config.log, and then calls config.status.
18898# config.status does its own redirection, appending to config.log.
18899# Unfortunately, on DOS this fails, as config.log is still kept open
18900# by configure, so config.status won't be able to write to it; its
18901# output is simply discarded. So we exec the FD to /dev/null,
18902# effectively closing config.log, so it can be properly (re)opened and
18903# appended to by config.status. When coming back to configure, we
18904# need to make the FD available again.
18905if test "$no_create" != yes; then
18906 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018907 ac_config_status_args=
18908 test "$silent" = yes &&
18909 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018910 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018911 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 exec 5>>config.log
18913 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18914 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018915 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018916fi
18917if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18919$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018920fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018921
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018922
Christian Heimes75ed8902013-11-20 01:11:18 +010018923echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018924if test ! -f Modules/Setup.local
18925then
18926 echo "# Edit this file for local setup changes" >Modules/Setup.local
18927fi
18928
Christian Heimes75ed8902013-11-20 01:11:18 +010018929echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018930$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018931 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018932 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018933mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018934
18935if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18936 echo "" >&6
18937 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018938 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 +000018939 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018940 echo "" >&6
18941 echo "" >&6
18942fi
18943