blob: 491869ef2cb7b1af2862367eee9383cc644044f1 [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:
Ronald Oussoren41761932020-11-08 10:05:27 +01001514 ("universal2", "32-bit", "64-bit", "3-way", "intel",
1515 "intel-32", "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;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003433 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3434 # defining NI_NUMERICHOST.
3435 QNX/6.3.2)
3436 define_xopen_source=no
3437 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003438 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3439 # in network headers still using system V types.
3440 VxWorks/*)
3441 define_xopen_source=no
3442 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003443
Ian Nortona9edf442020-02-14 03:09:11 +00003444 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3445 # chroot() and other functions
3446 hp*|HP*)
3447 define_xopen_source=no
3448 ;;
3449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450esac
3451
3452if test $define_xopen_source = yes
3453then
Victor Stinner14d098d2011-09-07 22:29:43 +02003454 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003455
Victor Stinner14d098d2011-09-07 22:29:43 +02003456$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003457
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003458
3459 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3460 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3461 # several APIs are not declared. Since this is also needed in some
3462 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Matthias Kloseb9621712010-04-24 17:59:49 +00003464$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
3466
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003467
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003468$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003470fi
3471
Christian Heimes647cd872013-12-07 23:39:33 +01003472# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3473case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003474 hp*|HP*)
3475 define_stdc_a1=yes;;
3476 *)
3477 define_stdc_a1=no;;
3478esac
3479
3480if test $define_stdc_a1 = yes
3481then
Christian Heimes647cd872013-12-07 23:39:33 +01003482
3483$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3484
Christian Heimesb02bcae2013-12-08 15:21:08 +01003485fi
Christian Heimes647cd872013-12-07 23:39:33 +01003486
Jack Jansen6b08a402004-06-03 12:41:45 +00003487# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3488# it may influence the way we can build extensions, so distutils
3489# needs to check it
3490
Thomas Wouters477c8d52006-05-27 19:21:47 +00003491
Jack Jansen6b08a402004-06-03 12:41:45 +00003492CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003493EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003494
Guido van Rossum627b2d71993-12-24 10:39:16 +00003495# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003496
3497# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3498# for debug/optimization stuff. BASECFLAGS is for flags that are required
3499# just to get things to compile and link. Users are free to override OPT
3500# when running configure or make. The build should not break if they do.
3501# BASECFLAGS should generally not be messed with, however.
3502
Guido van Rossum8b131c51995-03-09 14:10:13 +00003503# If the user switches compilers, we can't believe the cache
3504if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3505then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003506 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003507(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003508fi
3509
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003510# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3511# when the compiler supports them, but we don't always want -O2, and
3512# we set -g later.
3513if test -z "$CFLAGS"; then
3514 CFLAGS=
3515fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003516
3517if test "$ac_sys_system" = "Darwin"
3518then
3519 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003520 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003521 # information
3522 if test -z "${CC}"
3523 then
3524 found_gcc=
3525 found_clang=
3526 as_save_IFS=$IFS; IFS=:
3527 for as_dir in $PATH
3528 do
3529 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003530 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003532 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533 fi
3534 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003535 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003536 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003537 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003538 fi
3539 fi
3540 done
3541 IFS=$as_save_IFS
3542
3543 if test -n "$found_gcc" -a -n "$found_clang"
3544 then
3545 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3546 then
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3548$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3549 CC="$found_clang"
3550 CXX="$found_clang++"
3551 fi
3552
3553
3554 elif test -z "$found_gcc" -a -n "$found_clang"
3555 then
3556 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3557$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3558 CC="$found_clang"
3559 CXX="$found_clang++"
3560
3561 elif test -z "$found_gcc" -a -z "$found_clang"
3562 then
3563 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3564 if test -n "${found_clang}"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3567$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3568 CC="${found_clang}"
3569 CXX="`/usr/bin/xcrun -find clang++`"
3570
3571 # else: use default behaviour
3572 fi
3573 fi
3574 fi
3575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003576ac_ext=c
3577ac_cpp='$CPP $CPPFLAGS'
3578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3580ac_compiler_gnu=$ac_cv_c_compiler_gnu
3581if test -n "$ac_tool_prefix"; then
3582 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3583set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3585$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003586if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003587 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003588else
3589 if test -n "$CC"; then
3590 ac_cv_prog_CC="$CC" # Let the user override the test.
3591else
Martin v. Löwis11437992002-04-12 09:54:03 +00003592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3593for as_dir in $PATH
3594do
3595 IFS=$as_save_IFS
3596 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 $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 +00003601 break 2
3602 fi
3603done
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003606
Jack Jansendd19cf82001-12-06 22:36:17 +00003607fi
3608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003609CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003610if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3612$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003613else
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3615$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003616fi
3617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619fi
3620if test -z "$ac_cv_prog_CC"; then
3621 ac_ct_CC=$CC
3622 # Extract the first word of "gcc", so it can be a program name with args.
3623set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3625$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003626if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003628else
3629 if test -n "$ac_ct_CC"; then
3630 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3631else
3632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3633for as_dir in $PATH
3634do
3635 IFS=$as_save_IFS
3636 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 $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 +00003641 break 2
3642 fi
3643done
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003646
3647fi
3648fi
3649ac_ct_CC=$ac_cv_prog_ac_ct_CC
3650if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3652$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653else
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3655$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
3657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658 if test "x$ac_ct_CC" = x; then
3659 CC=""
3660 else
3661 case $cross_compiling:$ac_tool_warned in
3662yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665ac_tool_warned=yes ;;
3666esac
3667 CC=$ac_ct_CC
3668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
3670 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003671fi
3672
Jack Jansendd19cf82001-12-06 22:36:17 +00003673if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674 if test -n "$ac_tool_prefix"; then
3675 # 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 +00003676set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003679if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003681else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684else
Martin v. Löwis11437992002-04-12 09:54:03 +00003685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $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 +00003694 break 2
3695 fi
3696done
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003699
3700fi
3701fi
3702CC=$ac_cv_prog_CC
3703if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711
Martin v. Löwis11437992002-04-12 09:54:03 +00003712 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003713fi
3714if test -z "$CC"; then
3715 # Extract the first word of "cc", so it can be a program name with args.
3716set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003719if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003721else
3722 if test -n "$CC"; then
3723 ac_cv_prog_CC="$CC" # Let the user override the test.
3724else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3734 ac_prog_rejected=yes
3735 continue
3736 fi
3737 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $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 +00003739 break 2
3740 fi
3741done
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745if test $ac_prog_rejected = yes; then
3746 # We found a bogon in the path, so make sure we never use it.
3747 set dummy $ac_cv_prog_CC
3748 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750 # We chose a different compiler from the bogus one.
3751 # However, it has the same basename, so the bogon will be chosen
3752 # first if we set CC to just the basename; use the full file name.
3753 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003754 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755 fi
3756fi
3757fi
3758fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003759CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3762$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763else
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3765$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766fi
3767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
3770if test -z "$CC"; then
3771 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 do
3774 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3775set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003778if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003780else
3781 if test -n "$CC"; then
3782 ac_cv_prog_CC="$CC" # Let the user override the test.
3783else
Martin v. Löwis11437992002-04-12 09:54:03 +00003784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785for as_dir in $PATH
3786do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 $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 +00003793 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003795done
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003798
3799fi
3800fi
3801CC=$ac_cv_prog_CC
3802if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3804$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805else
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003808fi
3809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 test -n "$CC" && break
3812 done
3813fi
3814if test -z "$CC"; then
3815 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003817do
3818 # Extract the first word of "$ac_prog", so it can be a program name with args.
3819set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003822if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
3825 if test -n "$ac_ct_CC"; then
3826 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3827else
3828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829for as_dir in $PATH
3830do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 $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 +00003837 break 2
3838 fi
3839done
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843fi
3844fi
3845ac_ct_CC=$ac_cv_prog_ac_ct_CC
3846if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3848$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849else
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 test -n "$ac_ct_CC" && break
3856done
Michael W. Hudson54241132001-12-07 15:38:26 +00003857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858 if test "x$ac_ct_CC" = x; then
3859 CC=""
3860 else
3861 case $cross_compiling:$ac_tool_warned in
3862yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865ac_tool_warned=yes ;;
3866esac
3867 CC=$ac_ct_CC
3868 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003869fi
3870
3871fi
3872
3873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003876as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003877See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003878
3879# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003880$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3881set X $ac_compile
3882ac_compiler=$2
3883for ac_option in --version -v -V -qversion; do
3884 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885case "(($ac_try" in
3886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887 *) ac_try_echo=$ac_try;;
3888esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890$as_echo "$ac_try_echo"; } >&5
3891 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 if test -s conftest.err; then
3894 sed '10a\
3895... rest of stderr output deleted ...
3896 10q' conftest.err >conftest.er1
3897 cat conftest.er1 >&5
3898 fi
3899 rm -f conftest.er1 conftest.err
3900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901 test $ac_status = 0; }
3902done
Martin v. Löwis11437992002-04-12 09:54:03 +00003903
Matthias Kloseb9621712010-04-24 17:59:49 +00003904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003905/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003906
Martin v. Löwis11437992002-04-12 09:54:03 +00003907int
3908main ()
3909{
3910
3911 ;
3912 return 0;
3913}
3914_ACEOF
3915ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003916ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003917# Try to create an executable without -o first, disregard a.out.
3918# It will help us diagnose broken compilers, and finding out an intuition
3919# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3921$as_echo_n "checking whether the C compiler works... " >&6; }
3922ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3923
3924# The possible output files:
3925ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927ac_rmfiles=
3928for ac_file in $ac_files
3929do
3930 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003931 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3933 esac
3934done
3935rm -f $ac_rmfiles
3936
Matthias Kloseb9621712010-04-24 17:59:49 +00003937if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3943$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003945 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3947 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3949# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3950# in a Makefile. We should not override ac_cv_exeext if it was cached,
3951# so that the user can short-circuit this test for compilers unknown to
3952# Autoconf.
3953for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003954do
3955 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958 ;;
3959 [ab].out )
3960 # We found the default executable, but exeext='' is most
3961 # certainly right.
3962 break;;
3963 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965 then :; else
3966 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3967 fi
3968 # We set ac_cv_exeext here because the later test for it is not
3969 # safe: cross compilers may not add the suffix if given an `-o'
3970 # argument, so we may need to know it at that point already.
3971 # Even if this section looks crufty: it has the advantage of
3972 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003973 break;;
3974 * )
3975 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 esac
3977done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978test "$ac_cv_exeext" = no && ac_cv_exeext=
3979
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003980else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981 ac_file=''
3982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983if test -z "$ac_file"; then :
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3985$as_echo "no" >&6; }
3986$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003987sed 's/^/| /' conftest.$ac_ext >&5
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003991as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003992See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003993else
3994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3995$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3998$as_echo_n "checking for C compiler default output file name... " >&6; }
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4000$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002
Matthias Kloseb9621712010-04-24 17:59:49 +00004003rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4006$as_echo_n "checking for suffix of executables... " >&6; }
4007if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008case "(($ac_try" in
4009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4010 *) ac_try_echo=$ac_try;;
4011esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4013$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004015 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4017 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4019# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4020# work properly (i.e., refer to `conftest.exe'), while it won't with
4021# `rm'.
4022for ac_file in conftest.exe conftest conftest.*; do
4023 test -f "$ac_file" || continue
4024 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4027 break;;
4028 * ) break;;
4029 esac
4030done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031else
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004034as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004035See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004037rm -f conftest conftest$ac_cv_exeext
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4039$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004040
4041rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004042EXEEXT=$ac_cv_exeext
4043ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4045/* end confdefs.h. */
4046#include <stdio.h>
4047int
4048main ()
4049{
4050FILE *f = fopen ("conftest.out", "w");
4051 return ferror (f) || fclose (f) != 0;
4052
4053 ;
4054 return 0;
4055}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004057ac_clean_files="$ac_clean_files conftest.out"
4058# Check that the compiler produces executables we can run. If not, either
4059# the compiler is broken, or we cross compile.
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4061$as_echo_n "checking whether we are cross compiling... " >&6; }
4062if test "$cross_compiling" != yes; then
4063 { { ac_try="$ac_link"
4064case "(($ac_try" in
4065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4066 *) ac_try_echo=$ac_try;;
4067esac
4068eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4069$as_echo "$ac_try_echo"; } >&5
4070 (eval "$ac_link") 2>&5
4071 ac_status=$?
4072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4073 test $ac_status = 0; }
4074 if { ac_try='./conftest$ac_cv_exeext'
4075 { { case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
4079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4080$as_echo "$ac_try_echo"; } >&5
4081 (eval "$ac_try") 2>&5
4082 ac_status=$?
4083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4084 test $ac_status = 0; }; }; then
4085 cross_compiling=no
4086 else
4087 if test "$cross_compiling" = maybe; then
4088 cross_compiling=yes
4089 else
4090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004092as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004093If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004094See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 fi
4096 fi
4097fi
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4099$as_echo "$cross_compiling" >&6; }
4100
4101rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4102ac_clean_files=$ac_clean_files_save
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4104$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004105if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 $as_echo_n "(cached) " >&6
4107else
4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004109/* end confdefs.h. */
4110
4111int
4112main ()
4113{
4114
4115 ;
4116 return 0;
4117}
4118_ACEOF
4119rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004120if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121case "(($ac_try" in
4122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4123 *) ac_try_echo=$ac_try;;
4124esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4126$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4130 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131 for ac_file in conftest.o conftest.obj conftest.*; do
4132 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4136 break;;
4137 esac
4138done
4139else
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004141sed 's/^/| /' conftest.$ac_ext >&5
4142
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004145as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004146See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004148rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4151$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004152OBJEXT=$ac_cv_objext
4153ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4155$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004156if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004161
Martin v. Löwis11437992002-04-12 09:54:03 +00004162int
4163main ()
4164{
4165#ifndef __GNUC__
4166 choke me
4167#endif
4168
4169 ;
4170 return 0;
4171}
4172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 ac_compiler_gnu=yes
4175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004179ac_cv_c_compiler_gnu=$ac_compiler_gnu
4180
4181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4183$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4184if test $ac_compiler_gnu = yes; then
4185 GCC=yes
4186else
4187 GCC=
4188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004189ac_test_CFLAGS=${CFLAGS+set}
4190ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4192$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004193if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004195else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196 ac_save_c_werror_flag=$ac_c_werror_flag
4197 ac_c_werror_flag=yes
4198 ac_cv_prog_cc_g=no
4199 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203int
4204main ()
4205{
4206
4207 ;
4208 return 0;
4209}
4210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004212 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213else
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 CFLAGS=""
4215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216/* end confdefs.h. */
4217
4218int
4219main ()
4220{
4221
4222 ;
4223 return 0;
4224}
4225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004226if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227
Matthias Kloseb9621712010-04-24 17:59:49 +00004228else
4229 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232/* end confdefs.h. */
4233
4234int
4235main ()
4236{
4237
4238 ;
4239 return 0;
4240}
4241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004242if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250 ac_c_werror_flag=$ac_save_c_werror_flag
4251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4253$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256elif test $ac_cv_prog_cc_g = yes; then
4257 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004258 CFLAGS="-g -O2"
4259 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261 fi
4262else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263 if test "$GCC" = yes; then
4264 CFLAGS="-O2"
4265 else
4266 CFLAGS=
4267 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4270$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004271if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004273else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004275ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* end confdefs.h. */
4278#include <stdarg.h>
4279#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004280struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004281/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4282struct buf { int x; };
4283FILE * (*rcsopen) (struct buf *, struct stat *, int);
4284static char *e (p, i)
4285 char **p;
4286 int i;
4287{
4288 return p[i];
4289}
4290static char *f (char * (*g) (char **, int), char **p, ...)
4291{
4292 char *s;
4293 va_list v;
4294 va_start (v,p);
4295 s = g (p, va_arg (v,int));
4296 va_end (v);
4297 return s;
4298}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299
4300/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4301 function prototypes and stuff, but not '\xHH' hex character constants.
4302 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4305 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004307int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4308
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4310 inside strings and character constants. */
4311#define FOO(x) 'x'
4312int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4313
Skip Montanaro6dead952003-09-25 14:50:04 +00004314int test (int i, double x);
4315struct s1 {int (*f) (int a);};
4316struct s2 {int (*f) (double a);};
4317int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4318int argc;
4319char **argv;
4320int
4321main ()
4322{
4323return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4324 ;
4325 return 0;
4326}
4327_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4329 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004330do
4331 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335rm -f core conftest.err conftest.$ac_objext
4336 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004339CC=$ac_save_CC
4340
4341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342# AC_CACHE_VAL
4343case "x$ac_cv_prog_cc_c89" in
4344 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4346$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4349$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004350 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4353$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004354esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004356
Matthias Kloseb9621712010-04-24 17:59:49 +00004357fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Martin v. Löwis11437992002-04-12 09:54:03 +00004359ac_ext=c
4360ac_cpp='$CPP $CPPFLAGS'
4361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4363ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004364
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
4370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4371$as_echo_n "checking how to run the C preprocessor... " >&6; }
4372# On Suns, sometimes $CPP names a directory.
4373if test -n "$CPP" && test -d "$CPP"; then
4374 CPP=
4375fi
4376if test -z "$CPP"; then
4377 if ${ac_cv_prog_CPP+:} false; then :
4378 $as_echo_n "(cached) " >&6
4379else
4380 # Double quotes because CPP needs to be expanded
4381 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4382 do
4383 ac_preproc_ok=false
4384for ac_c_preproc_warn_flag in '' yes
4385do
4386 # Use a header file that comes with gcc, so configuring glibc
4387 # with a fresh cross-compiler works.
4388 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4389 # <limits.h> exists even on freestanding compilers.
4390 # On the NeXT, cc -E runs the code through the compiler's parser,
4391 # not just through cpp. "Syntax error" is here to catch this case.
4392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4393/* end confdefs.h. */
4394#ifdef __STDC__
4395# include <limits.h>
4396#else
4397# include <assert.h>
4398#endif
4399 Syntax error
4400_ACEOF
4401if ac_fn_c_try_cpp "$LINENO"; then :
4402
4403else
4404 # Broken: fails on valid input.
4405continue
4406fi
4407rm -f conftest.err conftest.i conftest.$ac_ext
4408
4409 # OK, works on sane cases. Now check whether nonexistent headers
4410 # can be detected and how.
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h. */
4413#include <ac_nonexistent.h>
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416 # Broken: success on invalid input.
4417continue
4418else
4419 # Passes both tests.
4420ac_preproc_ok=:
4421break
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425done
4426# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4427rm -f conftest.i conftest.err conftest.$ac_ext
4428if $ac_preproc_ok; then :
4429 break
4430fi
4431
4432 done
4433 ac_cv_prog_CPP=$CPP
4434
4435fi
4436 CPP=$ac_cv_prog_CPP
4437else
4438 ac_cv_prog_CPP=$CPP
4439fi
4440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4441$as_echo "$CPP" >&6; }
4442ac_preproc_ok=false
4443for ac_c_preproc_warn_flag in '' yes
4444do
4445 # Use a header file that comes with gcc, so configuring glibc
4446 # with a fresh cross-compiler works.
4447 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4448 # <limits.h> exists even on freestanding compilers.
4449 # On the NeXT, cc -E runs the code through the compiler's parser,
4450 # not just through cpp. "Syntax error" is here to catch this case.
4451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4452/* end confdefs.h. */
4453#ifdef __STDC__
4454# include <limits.h>
4455#else
4456# include <assert.h>
4457#endif
4458 Syntax error
4459_ACEOF
4460if ac_fn_c_try_cpp "$LINENO"; then :
4461
4462else
4463 # Broken: fails on valid input.
4464continue
4465fi
4466rm -f conftest.err conftest.i conftest.$ac_ext
4467
4468 # OK, works on sane cases. Now check whether nonexistent headers
4469 # can be detected and how.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#include <ac_nonexistent.h>
4473_ACEOF
4474if ac_fn_c_try_cpp "$LINENO"; then :
4475 # Broken: success on invalid input.
4476continue
4477else
4478 # Passes both tests.
4479ac_preproc_ok=:
4480break
4481fi
4482rm -f conftest.err conftest.i conftest.$ac_ext
4483
4484done
4485# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4486rm -f conftest.i conftest.err conftest.$ac_ext
4487if $ac_preproc_ok; then :
4488
4489else
4490 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4492as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4493See \`config.log' for more details" "$LINENO" 5; }
4494fi
4495
4496ac_ext=c
4497ac_cpp='$CPP $CPPFLAGS'
4498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4500ac_compiler_gnu=$ac_cv_c_compiler_gnu
4501
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4503$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4504if ${ac_cv_path_GREP+:} false; then :
4505 $as_echo_n "(cached) " >&6
4506else
4507 if test -z "$GREP"; then
4508 ac_path_GREP_found=false
4509 # Loop through the user's path and test for each of PROGNAME-LIST
4510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4512do
4513 IFS=$as_save_IFS
4514 test -z "$as_dir" && as_dir=.
4515 for ac_prog in grep ggrep; do
4516 for ac_exec_ext in '' $ac_executable_extensions; do
4517 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4518 as_fn_executable_p "$ac_path_GREP" || continue
4519# Check for GNU ac_path_GREP and select it if it is found.
4520 # Check for GNU $ac_path_GREP
4521case `"$ac_path_GREP" --version 2>&1` in
4522*GNU*)
4523 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4524*)
4525 ac_count=0
4526 $as_echo_n 0123456789 >"conftest.in"
4527 while :
4528 do
4529 cat "conftest.in" "conftest.in" >"conftest.tmp"
4530 mv "conftest.tmp" "conftest.in"
4531 cp "conftest.in" "conftest.nl"
4532 $as_echo 'GREP' >> "conftest.nl"
4533 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4534 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4535 as_fn_arith $ac_count + 1 && ac_count=$as_val
4536 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4537 # Best one so far, save it but keep looking for a better one
4538 ac_cv_path_GREP="$ac_path_GREP"
4539 ac_path_GREP_max=$ac_count
4540 fi
4541 # 10*(2^10) chars as input seems more than enough
4542 test $ac_count -gt 10 && break
4543 done
4544 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4545esac
4546
4547 $ac_path_GREP_found && break 3
4548 done
4549 done
4550 done
4551IFS=$as_save_IFS
4552 if test -z "$ac_cv_path_GREP"; then
4553 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4554 fi
4555else
4556 ac_cv_path_GREP=$GREP
4557fi
4558
4559fi
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4561$as_echo "$ac_cv_path_GREP" >&6; }
4562 GREP="$ac_cv_path_GREP"
4563
4564
Łukasz Langaa785c872016-09-09 17:37:37 -07004565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4566$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4567if ${ac_cv_path_SED+:} false; then :
4568 $as_echo_n "(cached) " >&6
4569else
4570 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4571 for ac_i in 1 2 3 4 5 6 7; do
4572 ac_script="$ac_script$as_nl$ac_script"
4573 done
4574 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4575 { ac_script=; unset ac_script;}
4576 if test -z "$SED"; then
4577 ac_path_SED_found=false
4578 # Loop through the user's path and test for each of PROGNAME-LIST
4579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in $PATH
4581do
4582 IFS=$as_save_IFS
4583 test -z "$as_dir" && as_dir=.
4584 for ac_prog in sed gsed; do
4585 for ac_exec_ext in '' $ac_executable_extensions; do
4586 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4587 as_fn_executable_p "$ac_path_SED" || continue
4588# Check for GNU ac_path_SED and select it if it is found.
4589 # Check for GNU $ac_path_SED
4590case `"$ac_path_SED" --version 2>&1` in
4591*GNU*)
4592 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4593*)
4594 ac_count=0
4595 $as_echo_n 0123456789 >"conftest.in"
4596 while :
4597 do
4598 cat "conftest.in" "conftest.in" >"conftest.tmp"
4599 mv "conftest.tmp" "conftest.in"
4600 cp "conftest.in" "conftest.nl"
4601 $as_echo '' >> "conftest.nl"
4602 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4603 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4604 as_fn_arith $ac_count + 1 && ac_count=$as_val
4605 if test $ac_count -gt ${ac_path_SED_max-0}; then
4606 # Best one so far, save it but keep looking for a better one
4607 ac_cv_path_SED="$ac_path_SED"
4608 ac_path_SED_max=$ac_count
4609 fi
4610 # 10*(2^10) chars as input seems more than enough
4611 test $ac_count -gt 10 && break
4612 done
4613 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4614esac
4615
4616 $ac_path_SED_found && break 3
4617 done
4618 done
4619 done
4620IFS=$as_save_IFS
4621 if test -z "$ac_cv_path_SED"; then
4622 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4623 fi
4624else
4625 ac_cv_path_SED=$SED
4626fi
4627
4628fi
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4630$as_echo "$ac_cv_path_SED" >&6; }
4631 SED="$ac_cv_path_SED"
4632 rm -f conftest.sed
4633
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004634
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4638$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004640# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004641if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004642 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004643
4644 case $withval in
4645 no) with_cxx_main=no
4646 MAINCC='$(CC)';;
4647 yes) with_cxx_main=yes
4648 MAINCC='$(CXX)';;
4649 *) with_cxx_main=yes
4650 MAINCC=$withval
4651 if test -z "$CXX"
4652 then
4653 CXX=$withval
4654 fi;;
4655 esac
4656else
4657
4658 with_cxx_main=no
4659 MAINCC='$(CC)'
4660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004661fi
4662
Matthias Kloseb9621712010-04-24 17:59:49 +00004663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4664$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665
4666preset_cxx="$CXX"
4667if test -z "$CXX"
4668then
4669 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004670 gcc) if test -n "$ac_tool_prefix"; then
4671 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4672set dummy ${ac_tool_prefix}g++; ac_word=$2
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
4675if ${ac_cv_path_CXX+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677else
4678 case $CXX in
4679 [\\/]* | ?:[\\/]*)
4680 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4681 ;;
4682 *)
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in notfound
4685do
4686 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2
4693 fi
4694done
4695 done
4696IFS=$as_save_IFS
4697
4698 ;;
4699esac
4700fi
4701CXX=$ac_cv_path_CXX
4702if test -n "$CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4704$as_echo "$CXX" >&6; }
4705else
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710
4711fi
4712if test -z "$ac_cv_path_CXX"; then
4713 ac_pt_CXX=$CXX
4714 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004715set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004718if ${ac_cv_path_ac_pt_CXX+:} false; then :
4719 $as_echo_n "(cached) " >&6
4720else
4721 case $ac_pt_CXX in
4722 [\\/]* | ?:[\\/]*)
4723 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4724 ;;
4725 *)
4726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in notfound
4728do
4729 IFS=$as_save_IFS
4730 test -z "$as_dir" && as_dir=.
4731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004733 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735 break 2
4736 fi
4737done
4738 done
4739IFS=$as_save_IFS
4740
4741 ;;
4742esac
4743fi
4744ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4745if test -n "$ac_pt_CXX"; then
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4747$as_echo "$ac_pt_CXX" >&6; }
4748else
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
4751fi
4752
4753 if test "x$ac_pt_CXX" = x; then
4754 CXX="g++"
4755 else
4756 case $cross_compiling:$ac_tool_warned in
4757yes:)
4758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4760ac_tool_warned=yes ;;
4761esac
4762 CXX=$ac_pt_CXX
4763 fi
4764else
4765 CXX="$ac_cv_path_CXX"
4766fi
4767 ;;
4768 cc) if test -n "$ac_tool_prefix"; then
4769 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4770set dummy ${ac_tool_prefix}c++; ac_word=$2
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004773if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775else
4776 case $CXX in
4777 [\\/]* | ?:[\\/]*)
4778 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4779 ;;
4780 *)
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782for as_dir in notfound
4783do
4784 IFS=$as_save_IFS
4785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 break 2
4791 fi
4792done
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004794IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ;;
4797esac
4798fi
4799CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004800if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4802$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803else
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808
4809fi
4810if test -z "$ac_cv_path_CXX"; then
4811 ac_pt_CXX=$CXX
4812 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 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 +00004822 ;;
4823 *)
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in notfound
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004833 break 2
4834 fi
4835done
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004837IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 ;;
4840esac
4841fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4843if test -n "$ac_pt_CXX"; then
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4845$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004846else
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004850
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851 if test "x$ac_pt_CXX" = x; then
4852 CXX="c++"
4853 else
4854 case $cross_compiling:$ac_tool_warned in
4855yes:)
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4858ac_tool_warned=yes ;;
4859esac
4860 CXX=$ac_pt_CXX
4861 fi
4862else
4863 CXX="$ac_cv_path_CXX"
4864fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004866 clang|*/clang) if test -n "$ac_tool_prefix"; then
4867 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4868set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if ${ac_cv_path_CXX+:} false; then :
4872 $as_echo_n "(cached) " >&6
4873else
4874 case $CXX in
4875 [\\/]* | ?:[\\/]*)
4876 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4877 ;;
4878 *)
4879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in notfound
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004886 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890done
4891 done
4892IFS=$as_save_IFS
4893
Ned Deilycbfb9a52012-06-23 16:02:19 -07004894 ;;
4895esac
4896fi
4897CXX=$ac_cv_path_CXX
4898if test -n "$CXX"; then
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4900$as_echo "$CXX" >&6; }
4901else
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906
4907fi
4908if test -z "$ac_cv_path_CXX"; then
4909 ac_pt_CXX=$CXX
4910 # Extract the first word of "clang++", so it can be a program name with args.
4911set dummy clang++; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if ${ac_cv_path_ac_pt_CXX+:} false; then :
4915 $as_echo_n "(cached) " >&6
4916else
4917 case $ac_pt_CXX in
4918 [\\/]* | ?:[\\/]*)
4919 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4920 ;;
4921 *)
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in notfound
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004929 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937 ;;
4938esac
4939fi
4940ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4941if test -n "$ac_pt_CXX"; then
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4943$as_echo "$ac_pt_CXX" >&6; }
4944else
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949 if test "x$ac_pt_CXX" = x; then
4950 CXX="clang++"
4951 else
4952 case $cross_compiling:$ac_tool_warned in
4953yes:)
4954{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4955$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4956ac_tool_warned=yes ;;
4957esac
4958 CXX=$ac_pt_CXX
4959 fi
4960else
4961 CXX="$ac_cv_path_CXX"
4962fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004963 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004964 icc|*/icc) if test -n "$ac_tool_prefix"; then
4965 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4966set dummy ${ac_tool_prefix}icpc; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
4969if ${ac_cv_path_CXX+:} false; then :
4970 $as_echo_n "(cached) " >&6
4971else
4972 case $CXX in
4973 [\\/]* | ?:[\\/]*)
4974 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4975 ;;
4976 *)
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978for as_dir in notfound
4979do
4980 IFS=$as_save_IFS
4981 test -z "$as_dir" && as_dir=.
4982 for ac_exec_ext in '' $ac_executable_extensions; do
4983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986 break 2
4987 fi
4988done
4989 done
4990IFS=$as_save_IFS
4991
4992 ;;
4993esac
4994fi
4995CXX=$ac_cv_path_CXX
4996if test -n "$CXX"; then
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4998$as_echo "$CXX" >&6; }
4999else
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5001$as_echo "no" >&6; }
5002fi
5003
5004
5005fi
5006if test -z "$ac_cv_path_CXX"; then
5007 ac_pt_CXX=$CXX
5008 # Extract the first word of "icpc", so it can be a program name with args.
5009set dummy icpc; ac_word=$2
5010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5011$as_echo_n "checking for $ac_word... " >&6; }
5012if ${ac_cv_path_ac_pt_CXX+:} false; then :
5013 $as_echo_n "(cached) " >&6
5014else
5015 case $ac_pt_CXX in
5016 [\\/]* | ?:[\\/]*)
5017 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5018 ;;
5019 *)
5020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021for as_dir in notfound
5022do
5023 IFS=$as_save_IFS
5024 test -z "$as_dir" && as_dir=.
5025 for ac_exec_ext in '' $ac_executable_extensions; do
5026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5027 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5029 break 2
5030 fi
5031done
5032 done
5033IFS=$as_save_IFS
5034
5035 ;;
5036esac
5037fi
5038ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5039if test -n "$ac_pt_CXX"; then
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5041$as_echo "$ac_pt_CXX" >&6; }
5042else
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
5045fi
5046
5047 if test "x$ac_pt_CXX" = x; then
5048 CXX="icpc"
5049 else
5050 case $cross_compiling:$ac_tool_warned in
5051yes:)
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5054ac_tool_warned=yes ;;
5055esac
5056 CXX=$ac_pt_CXX
5057 fi
5058else
5059 CXX="$ac_cv_path_CXX"
5060fi
5061 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062 esac
5063 if test "$CXX" = "notfound"
5064 then
5065 CXX=""
5066 fi
5067fi
5068if test -z "$CXX"
5069then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005070 if test -n "$ac_tool_prefix"; then
5071 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5072 do
5073 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5074set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005077if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005079else
5080 if test -n "$CXX"; then
5081 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5082else
5083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in $PATH
5085do
5086 IFS=$as_save_IFS
5087 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005090 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005092 break 2
5093 fi
5094done
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097
5098fi
5099fi
5100CXX=$ac_cv_prog_CXX
5101if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5103$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104else
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107fi
5108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005109
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005110 test -n "$CXX" && break
5111 done
5112fi
5113if test -z "$CXX"; then
5114 ac_ct_CXX=$CXX
5115 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5116do
5117 # Extract the first word of "$ac_prog", so it can be a program name with args.
5118set dummy $ac_prog; ac_word=$2
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5120$as_echo_n "checking for $ac_word... " >&6; }
5121if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5122 $as_echo_n "(cached) " >&6
5123else
5124 if test -n "$ac_ct_CXX"; then
5125 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5126else
5127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5128for as_dir in $PATH
5129do
5130 IFS=$as_save_IFS
5131 test -z "$as_dir" && as_dir=.
5132 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 ac_cv_prog_ac_ct_CXX="$ac_prog"
5135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5136 break 2
5137 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005138done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005139 done
5140IFS=$as_save_IFS
5141
5142fi
5143fi
5144ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5145if test -n "$ac_ct_CXX"; then
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5147$as_echo "$ac_ct_CXX" >&6; }
5148else
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150$as_echo "no" >&6; }
5151fi
5152
5153
5154 test -n "$ac_ct_CXX" && break
5155done
5156
5157 if test "x$ac_ct_CXX" = x; then
5158 CXX="notfound"
5159 else
5160 case $cross_compiling:$ac_tool_warned in
5161yes:)
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5163$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5164ac_tool_warned=yes ;;
5165esac
5166 CXX=$ac_ct_CXX
5167 fi
5168fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005169
5170 if test "$CXX" = "notfound"
5171 then
5172 CXX=""
5173 fi
5174fi
5175if test "$preset_cxx" != "$CXX"
5176then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005177 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178
5179 By default, distutils will build C++ extension modules with \"$CXX\".
5180 If this is not intended, then set CXX on the configure command line.
5181 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005182$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005183
5184 By default, distutils will build C++ extension modules with \"$CXX\".
5185 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005186 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005187fi
5188
5189
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005190MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5191
5192
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5194$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5195cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005196#undef bfin
5197#undef cris
5198#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef hppa
5201#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005202#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005204#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005206#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005207#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005208 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005209#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210# if defined(__x86_64__) && defined(__LP64__)
5211 x86_64-linux-gnu
5212# elif defined(__x86_64__) && defined(__ILP32__)
5213 x86_64-linux-gnux32
5214# elif defined(__i386__)
5215 i386-linux-gnu
5216# elif defined(__aarch64__) && defined(__AARCH64EL__)
5217# if defined(__ILP32__)
5218 aarch64_ilp32-linux-gnu
5219# else
5220 aarch64-linux-gnu
5221# endif
5222# elif defined(__aarch64__) && defined(__AARCH64EB__)
5223# if defined(__ILP32__)
5224 aarch64_be_ilp32-linux-gnu
5225# else
5226 aarch64_be-linux-gnu
5227# endif
5228# elif defined(__alpha__)
5229 alpha-linux-gnu
5230# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5231# if defined(__ARMEL__)
5232 arm-linux-gnueabihf
5233# else
5234 armeb-linux-gnueabihf
5235# endif
5236# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5237# if defined(__ARMEL__)
5238 arm-linux-gnueabi
5239# else
5240 armeb-linux-gnueabi
5241# endif
5242# elif defined(__hppa__)
5243 hppa-linux-gnu
5244# elif defined(__ia64__)
5245 ia64-linux-gnu
5246# elif defined(__m68k__) && !defined(__mcoldfire__)
5247 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005248# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5249# if _MIPS_SIM == _ABIO32
5250 mipsisa32r6el-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mipsisa64r6el-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mipsisa64r6el-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5259# if _MIPS_SIM == _ABIO32
5260 mipsisa32r6-linux-gnu
5261# elif _MIPS_SIM == _ABIN32
5262 mipsisa64r6-linux-gnuabin32
5263# elif _MIPS_SIM == _ABI64
5264 mipsisa64r6-linux-gnuabi64
5265# else
5266# error unknown platform triplet
5267# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005268# elif defined(__mips_hard_float) && defined(_MIPSEL)
5269# if _MIPS_SIM == _ABIO32
5270 mipsel-linux-gnu
5271# elif _MIPS_SIM == _ABIN32
5272 mips64el-linux-gnuabin32
5273# elif _MIPS_SIM == _ABI64
5274 mips64el-linux-gnuabi64
5275# else
5276# error unknown platform triplet
5277# endif
5278# elif defined(__mips_hard_float)
5279# if _MIPS_SIM == _ABIO32
5280 mips-linux-gnu
5281# elif _MIPS_SIM == _ABIN32
5282 mips64-linux-gnuabin32
5283# elif _MIPS_SIM == _ABI64
5284 mips64-linux-gnuabi64
5285# else
5286# error unknown platform triplet
5287# endif
5288# elif defined(__or1k__)
5289 or1k-linux-gnu
5290# elif defined(__powerpc__) && defined(__SPE__)
5291 powerpc-linux-gnuspe
5292# elif defined(__powerpc64__)
5293# if defined(__LITTLE_ENDIAN__)
5294 powerpc64le-linux-gnu
5295# else
5296 powerpc64-linux-gnu
5297# endif
5298# elif defined(__powerpc__)
5299 powerpc-linux-gnu
5300# elif defined(__s390x__)
5301 s390x-linux-gnu
5302# elif defined(__s390__)
5303 s390-linux-gnu
5304# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5305 sh4-linux-gnu
5306# elif defined(__sparc__) && defined(__arch64__)
5307 sparc64-linux-gnu
5308# elif defined(__sparc__)
5309 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005310# elif defined(__riscv)
5311# if __riscv_xlen == 32
5312 riscv32-linux-gnu
5313# elif __riscv_xlen == 64
5314 riscv64-linux-gnu
5315# else
5316# error unknown platform triplet
5317# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005318# else
5319# error unknown platform triplet
5320# endif
5321#elif defined(__FreeBSD_kernel__)
5322# if defined(__LP64__)
5323 x86_64-kfreebsd-gnu
5324# elif defined(__i386__)
5325 i386-kfreebsd-gnu
5326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__gnu_hurd__)
5330 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005331#elif defined(__APPLE__)
5332 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005333#elif defined(__VXWORKS__)
5334 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005335#else
5336# error unknown platform triplet
5337#endif
5338
5339EOF
5340
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005341if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5344$as_echo "$PLATFORM_TRIPLET" >&6; }
5345else
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5347$as_echo "none" >&6; }
5348fi
5349rm -f conftest.c conftest.out
5350
5351if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5352 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5353 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5354 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005355elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5356 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005357fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005358
doko@ubuntu.com55532312016-06-14 08:55:19 +02005359if test x$MULTIARCH != x; then
5360 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5361fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362
5363
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5365$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5366save_LDFLAGS="$LDFLAGS"
5367LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005368
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5370/* end confdefs.h. */
5371
5372int
5373main ()
5374{
5375
5376 ;
5377 return 0;
5378}
5379_ACEOF
5380if ac_fn_c_try_link "$LINENO"; then :
5381 NO_AS_NEEDED="-Wl,--no-as-needed"
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5383$as_echo "yes" >&6; }
5384else
5385 NO_AS_NEEDED=""
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }
5388fi
5389rm -f core conftest.err conftest.$ac_objext \
5390 conftest$ac_exeext conftest.$ac_ext
5391LDFLAGS="$save_LDFLAGS"
5392
5393
5394
5395# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396
Matthias Kloseb9621712010-04-24 17:59:49 +00005397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5398$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005399if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401else
5402 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5403 then ac_cv_path_EGREP="$GREP -E"
5404 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 # Loop through the user's path and test for each of PROGNAME-LIST
5408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5410do
5411 IFS=$as_save_IFS
5412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 for ac_prog in egrep; do
5414 for ac_exec_ext in '' $ac_executable_extensions; do
5415 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005416 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005417# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 # Check for GNU $ac_path_EGREP
5419case `"$ac_path_EGREP" --version 2>&1` in
5420*GNU*)
5421 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5422*)
5423 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 while :
5426 do
5427 cat "conftest.in" "conftest.in" >"conftest.tmp"
5428 mv "conftest.tmp" "conftest.in"
5429 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5432 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5435 # Best one so far, save it but keep looking for a better one
5436 ac_cv_path_EGREP="$ac_path_EGREP"
5437 ac_path_EGREP_max=$ac_count
5438 fi
5439 # 10*(2^10) chars as input seems more than enough
5440 test $ac_count -gt 10 && break
5441 done
5442 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5443esac
5444
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 $ac_path_EGREP_found && break 3
5446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005451 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 +00005452 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453else
5454 ac_cv_path_EGREP=$EGREP
5455fi
5456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 fi
5458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5460$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005462
5463
Matthias Kloseb9621712010-04-24 17:59:49 +00005464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5465$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005466if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 $as_echo_n "(cached) " >&6
5468else
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005470/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005471#include <stdlib.h>
5472#include <stdarg.h>
5473#include <string.h>
5474#include <float.h>
5475
5476int
5477main ()
5478{
5479
5480 ;
5481 return 0;
5482}
5483_ACEOF
5484if ac_fn_c_try_compile "$LINENO"; then :
5485 ac_cv_header_stdc=yes
5486else
5487 ac_cv_header_stdc=no
5488fi
5489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5490
5491if test $ac_cv_header_stdc = yes; then
5492 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005496
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005497_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005499 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501else
Matthias Kloseb9621712010-04-24 17:59:49 +00005502 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005503fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005504rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505
Matthias Kloseb9621712010-04-24 17:59:49 +00005506fi
5507
5508if test $ac_cv_header_stdc = yes; then
5509 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h. */
5512#include <stdlib.h>
5513
5514_ACEOF
5515if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5516 $EGREP "free" >/dev/null 2>&1; then :
5517
5518else
5519 ac_cv_header_stdc=no
5520fi
5521rm -f conftest*
5522
5523fi
5524
5525if test $ac_cv_header_stdc = yes; then
5526 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5527 if test "$cross_compiling" = yes; then :
5528 :
5529else
5530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5531/* end confdefs.h. */
5532#include <ctype.h>
5533#include <stdlib.h>
5534#if ((' ' & 0x0FF) == 0x020)
5535# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5536# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5537#else
5538# define ISLOWER(c) \
5539 (('a' <= (c) && (c) <= 'i') \
5540 || ('j' <= (c) && (c) <= 'r') \
5541 || ('s' <= (c) && (c) <= 'z'))
5542# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5543#endif
5544
5545#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5546int
5547main ()
5548{
5549 int i;
5550 for (i = 0; i < 256; i++)
5551 if (XOR (islower (i), ISLOWER (i))
5552 || toupper (i) != TOUPPER (i))
5553 return 2;
5554 return 0;
5555}
5556_ACEOF
5557if ac_fn_c_try_run "$LINENO"; then :
5558
5559else
5560 ac_cv_header_stdc=no
5561fi
5562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5563 conftest.$ac_objext conftest.beam conftest.$ac_ext
5564fi
5565
5566fi
5567fi
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5569$as_echo "$ac_cv_header_stdc" >&6; }
5570if test $ac_cv_header_stdc = yes; then
5571
5572$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5573
5574fi
5575
5576# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5577for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5578 inttypes.h stdint.h unistd.h
5579do :
5580 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5581ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5582"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005583if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005584 cat >>confdefs.h <<_ACEOF
5585#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5586_ACEOF
5587
5588fi
5589
5590done
5591
5592
5593
5594 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 +02005595if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 MINIX=yes
5597else
5598 MINIX=
5599fi
5600
5601
5602 if test "$MINIX" = yes; then
5603
5604$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5605
5606
5607$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5608
5609
5610$as_echo "#define _MINIX 1" >>confdefs.h
5611
5612 fi
5613
5614
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5616$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005617if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005618 $as_echo_n "(cached) " >&6
5619else
5620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5621/* end confdefs.h. */
5622
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005623# define __EXTENSIONS__ 1
5624 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005625int
5626main ()
5627{
5628
5629 ;
5630 return 0;
5631}
5632_ACEOF
5633if ac_fn_c_try_compile "$LINENO"; then :
5634 ac_cv_safe_to_define___extensions__=yes
5635else
5636 ac_cv_safe_to_define___extensions__=no
5637fi
5638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5639fi
5640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5641$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5642 test $ac_cv_safe_to_define___extensions__ = yes &&
5643 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5644
5645 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5646
5647 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5648
5649 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5650
5651 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5652
5653
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654
Xavier de Gaye95750b12016-07-09 11:05:42 +02005655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5656$as_echo_n "checking for the Android API level... " >&6; }
5657cat >> conftest.c <<EOF
5658#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005659android_api = __ANDROID_API__
5660arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005661#else
5662#error not Android
5663#endif
5664EOF
5665
5666if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005667 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5668 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5670$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005671 if test -z "$ANDROID_API_LEVEL"; then
5672 echo 'Fatal: you must define __ANDROID_API__'
5673 exit 1
5674 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005675
5676cat >>confdefs.h <<_ACEOF
5677#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5678_ACEOF
5679
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005680
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5682$as_echo_n "checking for the Android arm ABI... " >&6; }
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5684$as_echo "$_arm_arch" >&6; }
5685 if test "$_arm_arch" = 7; then
5686 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5687 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5688 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005689else
5690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5691$as_echo "not Android" >&6; }
5692fi
5693rm -f conftest.c conftest.out
5694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695# Check for unsupported systems
5696case $ac_sys_system/$ac_sys_release in
5697atheos*|Linux*/1*)
5698 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5699 echo See README for details.
5700 exit 1;;
5701esac
5702
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5705$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005708if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 withval=$with_suffix;
5710 case $withval in
5711 no) EXEEXT=;;
5712 yes) EXEEXT=.exe;;
5713 *) EXEEXT=$withval;;
5714 esac
5715fi
5716
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5718$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
5720# Test whether we're running on a non-case-sensitive system, in which
5721# case we give a warning if no ext is given
5722
Matthias Kloseb9621712010-04-24 17:59:49 +00005723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5724$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725if test ! -d CaseSensitiveTestDir; then
5726mkdir CaseSensitiveTestDir
5727fi
5728
5729if test -d casesensitivetestdir
5730then
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5732$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 BUILDEXEEXT=.exe
5734else
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5736$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737 BUILDEXEEXT=$EXEEXT
5738fi
5739rmdir CaseSensitiveTestDir
5740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741case $ac_sys_system in
5742hp*|HP*)
5743 case $CC in
5744 cc|*/cc) CC="$CC -Ae";;
5745 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746esac
5747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5750$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751if test -z "$LIBRARY"
5752then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005753 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5756$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757
5758# LDLIBRARY is the name of the library to link against (as opposed to the
5759# name of the library into which to insert object files). BLDLIBRARY is also
5760# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5761# is blank as the main program is not linked directly against LDLIBRARY.
5762# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5763# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5764# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5765# DLLLIBRARY is the shared (i.e., DLL) library.
5766#
5767# RUNSHARED is used to run shared python without installed libraries
5768#
5769# INSTSONAME is the name of the shared library that will be use to install
5770# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005771#
5772# LDVERSION is the shared library version number, normally the Python version
5773# with the ABI build flags appended.
5774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
5776
5777
5778
5779
5780
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782LDLIBRARY="$LIBRARY"
5783BLDLIBRARY='$(LDLIBRARY)'
5784INSTSONAME='$(LDLIBRARY)'
5785DLLLIBRARY=''
5786LDLIBRARYDIR=''
5787RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005788LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789
5790# LINKCC is the command that links the python executable -- default is $(CC).
5791# If CXX is set, and if it is needed to link a main function that was
5792# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5793# python might then depend on the C++ runtime
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5796$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797if test -z "$LINKCC"
5798then
5799 LINKCC='$(PURIFY) $(MAINCC)'
5800 case $ac_sys_system in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 QNX*)
5802 # qcc must be used because the other compilers do not
5803 # support -N.
5804 LINKCC=qcc;;
5805 esac
5806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5808$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
Stefan Krahe6dcd372020-08-29 17:00:08 +02005810# EXPORTSYMS holds the list of exported symbols for AIX.
5811# EXPORTSFROM holds the module name exporting symbols on AIX.
5812EXPORTSYMS=
5813EXPORTSFROM=
5814
5815
5816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5
5817$as_echo_n "checking EXPORTSYMS... " >&6; }
5818case $ac_sys_system in
5819AIX*)
5820 EXPORTSYMS="Modules/python.exp"
Kevin Adlerc79667f2020-11-16 09:16:10 -06005821 EXPORTSFROM=. # the main executable
Stefan Krahe6dcd372020-08-29 17:00:08 +02005822 ;;
5823esac
5824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5
5825$as_echo "$EXPORTSYMS" >&6; }
5826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5828# make sure we default having it set to "no": this is used by
5829# distutils.unixccompiler to know if it should add --enable-new-dtags
5830# to linker command lines, and failing to detect GNU ld simply results
5831# in the same bahaviour as before.
5832
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5834$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835ac_prog=ld
5836if test "$GCC" = yes; then
5837 ac_prog=`$CC -print-prog-name=ld`
5838fi
5839case `"$ac_prog" -V 2>&1 < /dev/null` in
5840 *GNU*)
5841 GNULD=yes;;
5842 *)
5843 GNULD=no;;
5844esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5846$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5849$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005851if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852 enableval=$enable_shared;
5853fi
5854
5855
5856if test -z "$enable_shared"
5857then
5858 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005859 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 enable_shared="yes";;
5861 *)
5862 enable_shared="no";;
5863 esac
5864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5866$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5869$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005871if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872 enableval=$enable_profiling;
5873fi
5874
5875if test "x$enable_profiling" = xyes; then
5876 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005877 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879/* end confdefs.h. */
5880int main() { return 0; }
5881_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882if ac_fn_c_try_link "$LINENO"; then :
5883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887rm -f core conftest.err conftest.$ac_objext \
5888 conftest$ac_exeext conftest.$ac_ext
5889 CC="$ac_save_cc"
5890else
5891 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5894$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
doko@ubuntu.comba015832012-06-30 16:52:05 +02005896if test "x$enable_profiling" = xyes; then
5897 BASECFLAGS="-pg $BASECFLAGS"
5898 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
5900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5902$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
5904# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5905# library that we build, but we do not want to link against it (we
5906# will find it with a -framework option). For this reason there is an
5907# extra variable BLDLIBRARY against which Python and the extension
5908# modules are linked, BLDLIBRARY. This is normally the same as
5909# LDLIBRARY, but empty for MacOSX framework builds.
5910if test "$enable_framework"
5911then
5912 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 BLDLIBRARY=''
5915else
5916 BLDLIBRARY='$(LDLIBRARY)'
5917fi
5918
5919# Other platforms follow
5920if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005921 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922
Matthias Kloseb9621712010-04-24 17:59:49 +00005923$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924
5925 case $ac_sys_system in
5926 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dll.a'
5928 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
5932 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005935 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005936 then
5937 PY3LIBRARY=libpython3.so
5938 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005940 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).so'
5942 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005945 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005946 then
5947 PY3LIBRARY=libpython3.so
5948 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
5950 hp*|HP*)
5951 case `uname -m` in
5952 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
5955 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005960 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).dylib'
5964 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005965 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005967 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005969 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005970 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971
5972 esac
5973else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005974 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 case $ac_sys_system in
5976 CYGWIN*)
5977 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005978 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ;;
5980 esac
5981fi
5982
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005983if test "$cross_compiling" = yes; then
5984 RUNSHARED=
5985fi
5986
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5988$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005991if test -n "$ac_tool_prefix"; then
5992 for ac_prog in ar aal
5993 do
5994 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5995set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005998if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000else
6001 if test -n "$AR"; then
6002 ac_cv_prog_AR="$AR" # Let the user override the test.
6003else
6004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007 IFS=$as_save_IFS
6008 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006011 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 break 2
6014 fi
6015done
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017IFS=$as_save_IFS
6018
6019fi
6020fi
6021AR=$ac_cv_prog_AR
6022if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6024$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025else
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028fi
6029
6030
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006031 test -n "$AR" && break
6032 done
6033fi
6034if test -z "$AR"; then
6035 ac_ct_AR=$AR
6036 for ac_prog in ar aal
6037do
6038 # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_prog_ac_ct_AR+:} false; then :
6043 $as_echo_n "(cached) " >&6
6044else
6045 if test -n "$ac_ct_AR"; then
6046 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6047else
6048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051 IFS=$as_save_IFS
6052 test -z "$as_dir" && as_dir=.
6053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006055 ac_cv_prog_ac_ct_AR="$ac_prog"
6056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6057 break 2
6058 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006060 done
6061IFS=$as_save_IFS
6062
6063fi
6064fi
6065ac_ct_AR=$ac_cv_prog_ac_ct_AR
6066if test -n "$ac_ct_AR"; then
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6068$as_echo "$ac_ct_AR" >&6; }
6069else
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075 test -n "$ac_ct_AR" && break
6076done
6077
6078 if test "x$ac_ct_AR" = x; then
6079 AR="ar"
6080 else
6081 case $cross_compiling:$ac_tool_warned in
6082yes:)
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6085ac_tool_warned=yes ;;
6086esac
6087 AR=$ac_ct_AR
6088 fi
6089fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090
6091
6092# tweak ARFLAGS only if the user didn't set it on the command line
6093
6094if test -z "$ARFLAGS"
6095then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006096 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097fi
6098
doko@ubuntu.com58844492012-06-30 18:25:32 +02006099if test -n "$ac_tool_prefix"; then
6100 for ac_prog in readelf
6101 do
6102 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
6106if ${ac_cv_prog_READELF+:} false; then :
6107 $as_echo_n "(cached) " >&6
6108else
6109 if test -n "$READELF"; then
6110 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6111else
6112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115 IFS=$as_save_IFS
6116 test -z "$as_dir" && as_dir=.
6117 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006119 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121 break 2
6122 fi
6123done
6124 done
6125IFS=$as_save_IFS
6126
6127fi
6128fi
6129READELF=$ac_cv_prog_READELF
6130if test -n "$READELF"; then
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6132$as_echo "$READELF" >&6; }
6133else
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139 test -n "$READELF" && break
6140 done
6141fi
6142if test -z "$READELF"; then
6143 ac_ct_READELF=$READELF
6144 for ac_prog in readelf
6145do
6146 # Extract the first word of "$ac_prog", so it can be a program name with args.
6147set dummy $ac_prog; ac_word=$2
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6149$as_echo_n "checking for $ac_word... " >&6; }
6150if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6151 $as_echo_n "(cached) " >&6
6152else
6153 if test -n "$ac_ct_READELF"; then
6154 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6155else
6156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159 IFS=$as_save_IFS
6160 test -z "$as_dir" && as_dir=.
6161 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006163 ac_cv_prog_ac_ct_READELF="$ac_prog"
6164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165 break 2
6166 fi
6167done
6168 done
6169IFS=$as_save_IFS
6170
6171fi
6172fi
6173ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6174if test -n "$ac_ct_READELF"; then
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6176$as_echo "$ac_ct_READELF" >&6; }
6177else
6178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6179$as_echo "no" >&6; }
6180fi
6181
6182
6183 test -n "$ac_ct_READELF" && break
6184done
6185
6186 if test "x$ac_ct_READELF" = x; then
6187 READELF=":"
6188 else
6189 case $cross_compiling:$ac_tool_warned in
6190yes:)
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6193ac_tool_warned=yes ;;
6194esac
6195 READELF=$ac_ct_READELF
6196 fi
6197fi
6198
6199if test "$cross_compiling" = yes; then
6200 case "$READELF" in
6201 readelf|:)
6202 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6203 ;;
6204 esac
6205fi
6206
6207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006210hp*|HP*)
6211 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 if test -z "$INSTALL"
6213 then
6214 INSTALL="${srcdir}/install-sh -c"
6215 fi
6216esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217# Find a good install program. We prefer a C program (faster),
6218# so one script is as good as another. But avoid the broken or
6219# incompatible versions:
6220# SysV /etc/install, /usr/sbin/install
6221# SunOS /usr/etc/install
6222# IRIX /sbin/install
6223# AIX /bin/install
6224# AmigaOS /C/install, which installs bootblocks on floppy discs
6225# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6226# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6227# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6228# OS/2's system install, which has a completely different semantic
6229# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006230# Reject install programs that cannot install multiple files.
6231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6232$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006234if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006235 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236else
6237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238for as_dir in $PATH
6239do
6240 IFS=$as_save_IFS
6241 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006242 # Account for people who put trailing slashes in PATH elements.
6243case $as_dir/ in #((
6244 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006246 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006247 /usr/ucb/* ) ;;
6248 *)
6249 # OSF1 and SCO ODT 3.0 have their own names for install.
6250 # Don't use installbsd from OSF since it installs stuff as root
6251 # by default.
6252 for ac_prog in ginstall scoinst install; do
6253 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006254 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255 if test $ac_prog = install &&
6256 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6257 # AIX install. It has an incompatible calling convention.
6258 :
6259 elif test $ac_prog = install &&
6260 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6261 # program-specific install script used by HP pwplus--don't use.
6262 :
6263 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 rm -rf conftest.one conftest.two conftest.dir
6265 echo one > conftest.one
6266 echo two > conftest.two
6267 mkdir conftest.dir
6268 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6269 test -s conftest.one && test -s conftest.two &&
6270 test -s conftest.dir/conftest.one &&
6271 test -s conftest.dir/conftest.two
6272 then
6273 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6274 break 3
6275 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276 fi
6277 fi
6278 done
6279 done
6280 ;;
6281esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006282
6283 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284IFS=$as_save_IFS
6285
Matthias Kloseb9621712010-04-24 17:59:49 +00006286rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
6288fi
6289 if test "${ac_cv_path_install+set}" = set; then
6290 INSTALL=$ac_cv_path_install
6291 else
6292 # As a last resort, use the slow shell script. Don't cache a
6293 # value for INSTALL within a source directory, because that will
6294 # break other packages using the cache if that directory is
6295 # removed, or if the value is a relative name.
6296 INSTALL=$ac_install_sh
6297 fi
6298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6300$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301
6302# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6303# It thinks the first close brace ends the variable substitution.
6304test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6305
6306test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6307
6308test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6309
Matthias Klose93a0ef12012-03-15 18:08:34 +01006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6311$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6312if test -z "$MKDIR_P"; then
6313 if ${ac_cv_path_mkdir+:} false; then :
6314 $as_echo_n "(cached) " >&6
6315else
6316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6317for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6318do
6319 IFS=$as_save_IFS
6320 test -z "$as_dir" && as_dir=.
6321 for ac_prog in mkdir gmkdir; do
6322 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006323 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006324 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6325 'mkdir (GNU coreutils) '* | \
6326 'mkdir (coreutils) '* | \
6327 'mkdir (fileutils) '4.1*)
6328 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6329 break 3;;
6330 esac
6331 done
6332 done
6333 done
6334IFS=$as_save_IFS
6335
6336fi
6337
6338 test -d ./--version && rmdir ./--version
6339 if test "${ac_cv_path_mkdir+set}" = set; then
6340 MKDIR_P="$ac_cv_path_mkdir -p"
6341 else
6342 # As a last resort, use the slow shell script. Don't cache a
6343 # value for MKDIR_P within a source directory, because that will
6344 # break other packages using the cache if that directory is
6345 # removed, or if the value is a relative name.
6346 MKDIR_P="$ac_install_sh -d"
6347 fi
6348fi
6349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6350$as_echo "$MKDIR_P" >&6; }
6351
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352
6353# Not every filesystem supports hard links
6354
6355if test -z "$LN" ; then
6356 case $ac_sys_system in
6357 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358 *) LN=ln;;
6359 esac
6360fi
6361
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006362# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006363
6364ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006365
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6368$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369
6370# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006371if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372 withval=$with_pydebug;
6373if test "$withval" != no
6374then
6375
Matthias Kloseb9621712010-04-24 17:59:49 +00006376$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377
Matthias Kloseb9621712010-04-24 17:59:49 +00006378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006381 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006382else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384fi
6385else
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388fi
6389
6390
Victor Stinnerf4e47032019-04-25 00:56:28 +02006391# Check for --with-trace-refs
6392# --with-trace-refs
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6394$as_echo_n "checking for --with-trace-refs... " >&6; }
6395
6396# Check whether --with-trace-refs was given.
6397if test "${with_trace_refs+set}" = set; then :
6398 withval=$with_trace_refs;
6399else
6400 with_trace_refs=no
6401fi
6402
6403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6404$as_echo "$with_trace_refs" >&6; }
6405
6406if test "$with_trace_refs" = "yes"
6407then
6408
6409$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6410
6411fi
6412
6413# Check for --with-assertions.
6414# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006415assertions='false'
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6417$as_echo_n "checking for --with-assertions... " >&6; }
6418
6419# Check whether --with-assertions was given.
6420if test "${with_assertions+set}" = set; then :
6421 withval=$with_assertions;
6422if test "$withval" != no
6423then
6424 assertions='true'
6425fi
6426fi
6427
6428if test "$assertions" = 'true'; then
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6430$as_echo "yes" >&6; }
6431elif test "$Py_DEBUG" = 'true'; then
6432 assertions='true'
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6434$as_echo "implied by --with-pydebug" >&6; }
6435else
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6437$as_echo "no" >&6; }
6438fi
6439
Brett Cannon63d98bc2016-09-06 17:12:40 -07006440# Enable optimization flags
6441
6442
6443Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6445$as_echo_n "checking for --enable-optimizations... " >&6; }
6446# Check whether --enable-optimizations was given.
6447if test "${enable_optimizations+set}" = set; then :
6448 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006449if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006450then
6451 Py_OPT='true'
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6453$as_echo "yes" >&6; };
6454else
6455 Py_OPT='false'
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; };
6458fi
6459else
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
6462fi
6463
6464if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006465 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6466 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006467 # 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 +00006468 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006469 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006470 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006471 DEF_MAKE_RULE="build_all"
Pablo Galindob451b0e2020-10-21 22:46:52 +01006472 case $CC in
6473 *gcc*)
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
6475$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
6476if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
6477 $as_echo_n "(cached) " >&6
6478else
6479
6480 ax_check_save_flags=$CFLAGS
6481 CFLAGS="$CFLAGS -fno-semantic-interposition"
6482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6483/* end confdefs.h. */
6484
6485int
6486main ()
6487{
6488
6489 ;
6490 return 0;
6491}
6492_ACEOF
6493if ac_fn_c_try_compile "$LINENO"; then :
6494 ax_cv_check_cflags___fno_semantic_interposition=yes
6495else
6496 ax_cv_check_cflags___fno_semantic_interposition=no
6497fi
6498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6499 CFLAGS=$ax_check_save_flags
6500fi
6501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
6502$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
6503if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
6504
Pablo Galindob451b0e2020-10-21 22:46:52 +01006505 CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6506 LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
Petr Viktorinc6d7e822020-10-22 18:11:53 +02006507
6508else
6509 :
6510fi
6511
Pablo Galindob451b0e2020-10-21 22:46:52 +01006512 ;;
6513 esac
6514
6515
Brett Cannon63d98bc2016-09-06 17:12:40 -07006516else
6517 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006518 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006519 DEF_MAKE_RULE="all"
6520fi
6521
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006522
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6524$as_echo_n "checking PROFILE_TASK... " >&6; }
6525if test -z "$PROFILE_TASK"
6526then
6527 PROFILE_TASK='-m test --pgo'
6528fi
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6530$as_echo "$PROFILE_TASK" >&6; }
6531
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006532# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6533# normal names in the default $PATH (ie: Ubuntu). They exist under the
6534# non-suffixed name in their versioned llvm directory.
6535
6536llvm_bin_dir=''
6537llvm_path="${PATH}"
6538if test "${CC}" = "clang"
6539then
6540 clang_bin=`which clang`
6541 # Some systems install clang elsewhere as a symlink to the real path
6542 # which is where the related llvm tools are located.
6543 if test -L "${clang_bin}"
6544 then
6545 clang_dir=`dirname "${clang_bin}"`
6546 clang_bin=`readlink "${clang_bin}"`
6547 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6548 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6549 fi
6550fi
6551
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006552# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6554$as_echo_n "checking for --with-lto... " >&6; }
6555
6556# Check whether --with-lto was given.
6557if test "${with_lto+set}" = set; then :
6558 withval=$with_lto;
6559if test "$withval" != no
6560then
6561 Py_LTO='true'
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6563$as_echo "yes" >&6; };
6564else
6565 Py_LTO='false'
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6567$as_echo "no" >&6; };
6568fi
6569else
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
6572fi
6573
6574if test "$Py_LTO" = 'true' ; then
6575 case $CC in
6576 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006577
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006578 if test -n "$ac_tool_prefix"; then
6579 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6580set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6582$as_echo_n "checking for $ac_word... " >&6; }
6583if ${ac_cv_path_LLVM_AR+:} false; then :
6584 $as_echo_n "(cached) " >&6
6585else
6586 case $LLVM_AR in
6587 [\\/]* | ?:[\\/]*)
6588 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6589 ;;
6590 *)
6591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6592for as_dir in ${llvm_path}
6593do
6594 IFS=$as_save_IFS
6595 test -z "$as_dir" && as_dir=.
6596 for ac_exec_ext in '' $ac_executable_extensions; do
6597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6598 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6600 break 2
6601 fi
6602done
6603 done
6604IFS=$as_save_IFS
6605
6606 ;;
6607esac
6608fi
6609LLVM_AR=$ac_cv_path_LLVM_AR
6610if test -n "$LLVM_AR"; then
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6612$as_echo "$LLVM_AR" >&6; }
6613else
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6615$as_echo "no" >&6; }
6616fi
6617
6618
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006619fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006620if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006621 ac_pt_LLVM_AR=$LLVM_AR
6622 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006623set dummy llvm-ar; ac_word=$2
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6625$as_echo_n "checking for $ac_word... " >&6; }
6626if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628else
6629 case $ac_pt_LLVM_AR in
6630 [\\/]* | ?:[\\/]*)
6631 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6632 ;;
6633 *)
6634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in ${llvm_path}
6636do
6637 IFS=$as_save_IFS
6638 test -z "$as_dir" && as_dir=.
6639 for ac_exec_ext in '' $ac_executable_extensions; do
6640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6641 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6643 break 2
6644 fi
6645done
6646 done
6647IFS=$as_save_IFS
6648
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006649 ;;
6650esac
6651fi
6652ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6653if test -n "$ac_pt_LLVM_AR"; then
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6655$as_echo "$ac_pt_LLVM_AR" >&6; }
6656else
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658$as_echo "no" >&6; }
6659fi
6660
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006661 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006662 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006663 else
6664 case $cross_compiling:$ac_tool_warned in
6665yes:)
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6668ac_tool_warned=yes ;;
6669esac
6670 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006671 fi
6672else
6673 LLVM_AR="$ac_cv_path_LLVM_AR"
6674fi
6675
6676
6677 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6678 then
6679 LLVM_AR_FOUND="found"
6680 else
6681 LLVM_AR_FOUND="not-found"
6682 fi
6683 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6684 then
6685 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6686 if test -n "${found_llvm_ar}"
6687 then
6688 LLVM_AR='/usr/bin/xcrun llvm-ar'
6689 LLVM_AR_FOUND=found
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6691$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6692 fi
6693 fi
6694 if test $LLVM_AR_FOUND = not-found
6695 then
6696 LLVM_PROFR_ERR=yes
6697 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6698 else
6699 LLVM_AR_ERR=no
6700 fi
6701 AR="${LLVM_AR}"
6702 case $ac_sys_system in
6703 Darwin*)
6704 # Any changes made here should be reflected in the GCC+Darwin case below
6705 LTOFLAGS="-flto -Wl,-export_dynamic"
6706 ;;
6707 *)
6708 LTOFLAGS="-flto"
6709 ;;
6710 esac
6711 ;;
6712 *gcc*)
6713 case $ac_sys_system in
6714 Darwin*)
6715 LTOFLAGS="-flto -Wl,-export_dynamic"
6716 ;;
6717 *)
6718 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6719 ;;
6720 esac
6721 ;;
6722 esac
6723
6724 if test "$ac_cv_prog_cc_g" = "yes"
6725 then
6726 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6727 # to get debug symbols.
6728 LTOFLAGS="$LTOFLAGS -g"
6729 fi
6730
stratakisf92c7aa2018-12-04 15:54:01 +01006731 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006732 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006733fi
6734
6735# Enable PGO flags.
6736
6737
6738
6739
6740
6741
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006742if test -n "$ac_tool_prefix"; then
6743 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6744set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6748 $as_echo_n "(cached) " >&6
6749else
6750 case $LLVM_PROFDATA in
6751 [\\/]* | ?:[\\/]*)
6752 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6753 ;;
6754 *)
6755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006757do
6758 IFS=$as_save_IFS
6759 test -z "$as_dir" && as_dir=.
6760 for ac_exec_ext in '' $ac_executable_extensions; do
6761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006762 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764 break 2
6765 fi
6766done
6767 done
6768IFS=$as_save_IFS
6769
Gregory P. Smith799520c2016-09-07 16:10:00 -07006770 ;;
6771esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006772fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006773LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6774if test -n "$LLVM_PROFDATA"; then
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6776$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777else
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006783fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006785 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6786 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006787set dummy llvm-profdata; ac_word=$2
6788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6789$as_echo_n "checking for $ac_word... " >&6; }
6790if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6791 $as_echo_n "(cached) " >&6
6792else
6793 case $ac_pt_LLVM_PROFDATA in
6794 [\\/]* | ?:[\\/]*)
6795 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6796 ;;
6797 *)
6798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6799for as_dir in ${llvm_path}
6800do
6801 IFS=$as_save_IFS
6802 test -z "$as_dir" && as_dir=.
6803 for ac_exec_ext in '' $ac_executable_extensions; do
6804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6805 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6807 break 2
6808 fi
6809done
6810 done
6811IFS=$as_save_IFS
6812
Gregory P. Smith799520c2016-09-07 16:10:00 -07006813 ;;
6814esac
6815fi
6816ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6817if test -n "$ac_pt_LLVM_PROFDATA"; then
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6819$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6820else
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6822$as_echo "no" >&6; }
6823fi
6824
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006825 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006826 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006827 else
6828 case $cross_compiling:$ac_tool_warned in
6829yes:)
6830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6832ac_tool_warned=yes ;;
6833esac
6834 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006835 fi
6836else
6837 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6838fi
6839
6840
6841if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6842then
6843 LLVM_PROF_FOUND="found"
6844else
6845 LLVM_PROF_FOUND="not-found"
6846fi
6847if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6848then
6849 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6850 if test -n "${found_llvm_profdata}"
6851 then
6852 # llvm-profdata isn't directly in $PATH in some cases.
6853 # https://apple.stackexchange.com/questions/197053/
6854 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6855 LLVM_PROF_FOUND=found
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6857$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6858 fi
6859fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006860LLVM_PROF_ERR=no
6861case $CC in
6862 *clang*)
6863 # Any changes made here should be reflected in the GCC+Darwin case below
6864 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6865 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006866 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006867 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6868 if test $LLVM_PROF_FOUND = not-found
6869 then
6870 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006871 if test "${REQUIRE_PGO}" = "yes"
6872 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006873 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 -07006874 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006875 fi
6876 ;;
6877 *gcc*)
6878 case $ac_sys_system in
6879 Darwin*)
6880 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6881 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006882 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006883 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006884 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006885 then
6886 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006887 if test "${REQUIRE_PGO}" = "yes"
6888 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006889 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 -07006890 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006891 fi
6892 ;;
6893 *)
6894 PGO_PROF_GEN_FLAG="-fprofile-generate"
6895 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6896 LLVM_PROF_MERGER="true"
6897 LLVM_PROF_FILE=""
6898 ;;
6899 esac
6900 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006901 *icc*)
6902 PGO_PROF_GEN_FLAG="-prof-gen"
6903 PGO_PROF_USE_FLAG="-prof-use"
6904 LLVM_PROF_MERGER="true"
6905 LLVM_PROF_FILE=""
6906 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006907esac
6908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6910# merged with this chunk of code?
6911
6912# Optimizer/debugger flags
6913# ------------------------
6914# (The following bit of code is complicated enough - please keep things
6915# indented properly. Just pretend you're editing Python code. ;-)
6916
6917# There are two parallel sets of case statements below, one that checks to
6918# see if OPT was set and one that does BASECFLAGS setting based upon
6919# compiler and platform. BASECFLAGS tweaks need to be made even if the
6920# user set OPT.
6921
Victor Stinner23a683a2019-04-12 21:27:37 +02006922case $CC in
6923 *clang*)
6924 cc_is_clang=1
6925 ;;
6926 *)
6927 if $CC --version 2>&1 | grep -q clang
6928 then
6929 cc_is_clang=1
6930 else
6931 cc_is_clang=
6932 fi
6933esac
6934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935# tweak OPT based on compiler and platform, only if the user didn't set
6936# it on the command line
6937
Victor Stinner9ed34a82017-05-02 22:35:58 +02006938
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006939if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940then
6941 case $GCC in
6942 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6944 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6945 WRAP="-fwrapv"
6946 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006947
Victor Stinner35f3d242017-04-21 12:35:24 +02006948 if test -n "${cc_is_clang}"
6949 then
6950 # Clang also needs -fwrapv
6951 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006952 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6953 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006954 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006955 fi
6956
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006957 case $ac_cv_prog_cc_g in
6958 yes)
6959 if test "$Py_DEBUG" = 'true' ; then
6960 # Optimization messes up debuggers, so turn it off for
6961 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006962 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006963 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006964 else
Victor Stinner28205b22017-04-21 11:24:34 +02006965 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006966 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006967 else
Victor Stinner28205b22017-04-21 11:24:34 +02006968 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969 fi
6970 ;;
6971 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006972 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973 ;;
6974 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006976 case $ac_sys_system in
6977 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6978 ;;
6979 esac
6980 ;;
6981
6982 *)
6983 OPT="-O"
6984 ;;
6985 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986fi
6987
6988
6989
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006990
stratakiscf10a752018-12-19 18:19:01 +01006991
Ronald Oussoren41761932020-11-08 10:05:27 +01006992# The -arch flags for universal builds on macOS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993UNIVERSAL_ARCH_FLAGS=
6994
6995
6996# tweak BASECFLAGS based on compiler and platform
6997case $GCC in
6998yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006999 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07007000
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
7002$as_echo_n "checking for -Wextra... " >&6; }
7003 ac_save_cc="$CC"
7004 CC="$CC -Wextra -Werror"
7005 if ${ac_cv_extra_warnings+:} false; then :
7006 $as_echo_n "(cached) " >&6
7007else
7008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7009/* end confdefs.h. */
7010
7011
7012int
7013main ()
7014{
7015
7016 ;
7017 return 0;
7018}
7019
7020_ACEOF
7021if ac_fn_c_try_compile "$LINENO"; then :
7022
7023 ac_cv_extra_warnings=yes
7024
7025else
7026
7027 ac_cv_extra_warnings=no
7028
7029fi
7030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7031fi
7032
7033 CC="$ac_save_cc"
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
7035$as_echo "$ac_cv_extra_warnings" >&6; }
7036
7037 if test $ac_cv_extra_warnings = yes
7038 then
7039 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
7040 fi
7041
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007042 # Python doesn't violate C99 aliasing rules, but older versions of
7043 # GCC produce warnings for legal Python code. Enable
7044 # -fno-strict-aliasing on versions of GCC that support but produce
7045 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7047$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048 ac_save_cc="$CC"
7049 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007050 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007051 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007053else
Matthias Kloseb9621712010-04-24 17:59:49 +00007054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007056
Matthias Kloseb159a552010-04-25 21:00:44 +00007057
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007058int
7059main ()
7060{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007061
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007062 ;
7063 return 0;
7064}
Matthias Kloseb159a552010-04-25 21:00:44 +00007065
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007067if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007068
7069 CC="$ac_save_cc -fstrict-aliasing"
7070 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007072/* end confdefs.h. */
7073
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007074 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007075int
7076main ()
7077{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007078double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007079 ;
7080 return 0;
7081}
Matthias Kloseb159a552010-04-25 21:00:44 +00007082
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007084if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007085
7086 ac_cv_no_strict_aliasing=no
7087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088else
Matthias Kloseb159a552010-04-25 21:00:44 +00007089
7090 ac_cv_no_strict_aliasing=yes
7091
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007092fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007094
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007095else
Matthias Kloseb159a552010-04-25 21:00:44 +00007096
7097 ac_cv_no_strict_aliasing=no
7098
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007099fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007101fi
7102
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007103 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7106$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007107 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007108 then
7109 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7110 fi
7111
Zachary Ware5af85642015-12-21 12:09:17 -06007112 # ICC doesn't recognize the option, but only emits a warning
7113 ## XXX does it emit an unused result warning and can it be disabled?
7114 case "$CC" in
7115 *icc*)
7116 ac_cv_disable_unused_result_warning=no
7117 ;;
7118 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7120$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7121 ac_save_cc="$CC"
7122 CC="$CC -Wunused-result -Werror"
7123 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007124 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007125 $as_echo_n "(cached) " >&6
7126else
7127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7128/* end confdefs.h. */
7129
7130
7131int
7132main ()
7133{
7134
7135 ;
7136 return 0;
7137}
7138
7139_ACEOF
7140if ac_fn_c_try_compile "$LINENO"; then :
7141
7142 ac_cv_disable_unused_result_warning=yes
7143
7144else
7145
7146 ac_cv_disable_unused_result_warning=no
7147
7148fi
7149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7150fi
7151
7152 CFLAGS="$save_CFLAGS"
7153 CC="$ac_save_cc"
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7155$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007156 ;;
7157 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007158
7159 if test $ac_cv_disable_unused_result_warning = yes
7160 then
7161 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007162 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7163 fi
7164
7165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7166$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7167 ac_save_cc="$CC"
7168 CC="$CC -Wunused-parameter -Werror"
7169 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7170 $as_echo_n "(cached) " >&6
7171else
7172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7173/* end confdefs.h. */
7174
7175
7176int
7177main ()
7178{
7179
7180 ;
7181 return 0;
7182}
7183
7184_ACEOF
7185if ac_fn_c_try_compile "$LINENO"; then :
7186
7187 ac_cv_disable_unused_parameter_warning=yes
7188
7189else
7190
7191 ac_cv_disable_unused_parameter_warning=no
7192
7193fi
7194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7195fi
7196
7197 CC="$ac_save_cc"
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7199$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7200
7201 if test $ac_cv_disable_unused_parameter_warning = yes
7202 then
7203 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7204 fi
7205
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7207$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7208 ac_save_cc="$CC"
7209 CC="$CC -Wmissing-field-initializers -Werror"
7210 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7211 $as_echo_n "(cached) " >&6
7212else
7213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7214/* end confdefs.h. */
7215
7216
7217int
7218main ()
7219{
7220
7221 ;
7222 return 0;
7223}
7224
7225_ACEOF
7226if ac_fn_c_try_compile "$LINENO"; then :
7227
7228 ac_cv_disable_missing_field_initializers=yes
7229
7230else
7231
7232 ac_cv_disable_missing_field_initializers=no
7233
7234fi
7235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7236fi
7237
7238 CC="$ac_save_cc"
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7240$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7241
7242 if test $ac_cv_disable_missing_field_initializers = yes
7243 then
7244 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007245 fi
7246
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7248$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7249 ac_save_cc="$CC"
7250 CC="$CC -Wsign-compare"
7251 save_CFLAGS="$CFLAGS"
7252 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7253 $as_echo_n "(cached) " >&6
7254else
7255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7256/* end confdefs.h. */
7257
7258
7259int
7260main ()
7261{
7262
7263 ;
7264 return 0;
7265}
7266
7267_ACEOF
7268if ac_fn_c_try_compile "$LINENO"; then :
7269
7270 ac_cv_enable_sign_compare_warning=yes
7271
7272else
7273
7274 ac_cv_enable_sign_compare_warning=no
7275
7276fi
7277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7278fi
7279
7280 CFLAGS="$save_CFLAGS"
7281 CC="$ac_save_cc"
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7283$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7284
7285 if test $ac_cv_enable_sign_compare_warning = yes
7286 then
7287 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7288 fi
7289
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7291$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7292 ac_save_cc="$CC"
7293 CC="$CC -Wunreachable-code"
7294 save_CFLAGS="$CFLAGS"
7295 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7296 $as_echo_n "(cached) " >&6
7297else
7298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7299/* end confdefs.h. */
7300
7301
7302int
7303main ()
7304{
7305
7306 ;
7307 return 0;
7308}
7309
7310_ACEOF
7311if ac_fn_c_try_compile "$LINENO"; then :
7312
7313 ac_cv_enable_unreachable_code_warning=yes
7314
7315else
7316
7317 ac_cv_enable_unreachable_code_warning=no
7318
7319fi
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321fi
7322
7323 CFLAGS="$save_CFLAGS"
7324 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007325
7326 # Don't enable unreachable code warning in debug mode, since it usually
7327 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007328 # Issue #24324: Unfortunately, the unreachable code warning does not work
7329 # correctly on gcc and has been silently removed from the compiler.
7330 # It is supported on clang but on OS X systems gcc may be an alias
7331 # for clang. Try to determine if the compiler is not really gcc and,
7332 # if so, only then enable the warning.
7333 if test $ac_cv_enable_unreachable_code_warning = yes && \
7334 test "$Py_DEBUG" != "true" && \
7335 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007336 then
7337 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007338 else
7339 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007340 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7342$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007343
INADA Naokie3364842018-06-05 20:40:53 +09007344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7345$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7346 ac_save_cc="$CC"
7347 CC="$CC -Werror -Wstrict-prototypes"
7348 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7349 $as_echo_n "(cached) " >&6
7350else
7351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7352/* end confdefs.h. */
7353
7354
7355int
7356main ()
7357{
7358
7359 ;
7360 return 0;
7361}
7362
7363_ACEOF
7364if ac_fn_c_try_compile "$LINENO"; then :
7365
7366 ac_cv_enable_strict_prototypes_warning=yes
7367
7368else
7369
7370 ac_cv_enable_strict_prototypes_warning=no
7371
7372fi
7373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7374fi
7375
7376 CC="$ac_save_cc"
7377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7378$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7379
7380 if test $ac_cv_enable_strict_prototypes_warning = yes
7381 then
7382 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7383 fi
7384
Victor Stinner193ee0a2017-02-06 14:24:00 +01007385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7386$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7387 ac_save_cc="$CC"
7388 CC="$CC -Werror=implicit-function-declaration"
7389 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7390 $as_echo_n "(cached) " >&6
7391else
7392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7393/* end confdefs.h. */
7394
7395
7396int
7397main ()
7398{
7399
7400 ;
7401 return 0;
7402}
7403
7404_ACEOF
7405if ac_fn_c_try_compile "$LINENO"; then :
7406
7407 ac_cv_enable_implicit_function_declaration_error=yes
7408
7409else
7410
7411 ac_cv_enable_implicit_function_declaration_error=no
7412
7413fi
7414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7415fi
7416
7417 CC="$ac_save_cc"
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7419$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7420
7421 if test $ac_cv_enable_implicit_function_declaration_error = yes
7422 then
7423 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7424 fi
7425
Vinay Sajip0b60f642019-10-15 08:26:12 +01007426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7427$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7428 ac_save_cc="$CC"
7429 CC="$CC -fvisibility=hidden"
7430 if ${ac_cv_enable_visibility+:} false; then :
7431 $as_echo_n "(cached) " >&6
7432else
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434/* end confdefs.h. */
7435
7436
7437int
7438main ()
7439{
7440
7441 ;
7442 return 0;
7443}
7444
7445_ACEOF
7446if ac_fn_c_try_compile "$LINENO"; then :
7447
7448 ac_cv_enable_visibility=yes
7449
7450else
7451
7452 ac_cv_enable_visibility=no
7453
7454fi
7455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7456fi
7457
7458 CC="$ac_save_cc"
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7460$as_echo "$ac_cv_enable_visibility" >&6; }
7461
7462 if test $ac_cv_enable_visibility = yes
7463 then
7464 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7465 fi
7466
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7468 # support. Without this, treatment of subnormals doesn't follow
7469 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007470 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471 alpha*)
7472 BASECFLAGS="$BASECFLAGS -mieee"
7473 ;;
7474 esac
7475
7476 case $ac_sys_system in
7477 SCO_SV*)
7478 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7479 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007480
Ned Deily87adb6e2013-10-18 21:09:56 -07007481 Darwin*)
7482 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7483 # used to be here, but non-Apple gcc doesn't accept them.
7484 if test "${CC}" = gcc
7485 then
7486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007487$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007488 case "${UNIVERSALSDK}" in
7489 */MacOSX10.4u.sdk)
7490 # Build using 10.4 SDK, force usage of gcc when the
7491 # compiler is gcc, otherwise the user will get very
7492 # confusing error messages when building on OSX 10.6
7493 CC=gcc-4.0
7494 CPP=cpp-4.0
7495 ;;
7496 esac
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007498$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007499 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500
Ned Deily87adb6e2013-10-18 21:09:56 -07007501 if test "${enable_universalsdk}"
7502 then
7503 case "$UNIVERSAL_ARCHS" in
7504 32-bit)
7505 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7506 LIPO_32BIT_FLAGS=""
7507 ARCH_RUN_32BIT=""
7508 ;;
7509 64-bit)
7510 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7511 LIPO_32BIT_FLAGS=""
7512 ARCH_RUN_32BIT="true"
7513 ;;
7514 all)
7515 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7516 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7517 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7518 ;;
Ronald Oussoren41761932020-11-08 10:05:27 +01007519 universal2)
7520 UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
7521 LIPO_32BIT_FLAGS=""
7522 ARCH_RUN_32BIT="true"
7523 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007524 intel)
7525 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7526 LIPO_32BIT_FLAGS="-extract i386"
7527 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7528 ;;
7529 intel-32)
7530 UNIVERSAL_ARCH_FLAGS="-arch i386"
7531 LIPO_32BIT_FLAGS=""
7532 ARCH_RUN_32BIT=""
7533 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007534 intel-64)
7535 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7536 LIPO_32BIT_FLAGS=""
7537 ARCH_RUN_32BIT="true"
7538 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007539 3-way)
7540 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7541 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7542 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7543 ;;
7544 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01007545 as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007546 ;;
7547 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548
Ned Deily87adb6e2013-10-18 21:09:56 -07007549 if test "${UNIVERSALSDK}" != "/"
7550 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007551 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7552 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007553 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007554 else
7555 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7556 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007557 fi
7558 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559
Ned Deily87adb6e2013-10-18 21:09:56 -07007560 # Calculate an appropriate deployment target for this build:
7561 # The deployment target value is used explicitly to enable certain
7562 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007563 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007564 # component of the string returned by distutils.get_platform().
7565 #
7566 # Use the value from:
7567 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7568 # 2. the operating system version of the build machine if >= 10.6
7569 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7570 # below to pick either 10.3, 10.4, or 10.5 as the target.
7571 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572
Ned Deily87adb6e2013-10-18 21:09:56 -07007573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7574$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007575 cur_target_major=`sw_vers -productVersion | \
7576 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7577 cur_target_minor=`sw_vers -productVersion | \
7578 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7579 cur_target="${cur_target_major}.${cur_target_minor}"
7580 if test ${cur_target_major} -eq 10 && \
7581 test ${cur_target_minor} -ge 3 && \
7582 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007583 then
Ned Deily36820b62014-06-25 13:44:22 -07007584 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007585 cur_target=10.3
7586 if test ${enable_universalsdk}
7587 then
7588 case "$UNIVERSAL_ARCHS" in
7589 all|3-way|intel|64-bit)
7590 # These configurations were first supported in 10.5
7591 cur_target='10.5'
7592 ;;
7593 esac
7594 else
7595 if test `/usr/bin/arch` = "i386"
7596 then
7597 # 10.4 was the first release to support Intel archs
7598 cur_target="10.4"
7599 fi
7600 fi
7601 fi
7602 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007603
Ned Deily87adb6e2013-10-18 21:09:56 -07007604 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7605 # environment with a value that is the same as what we'll use
7606 # in the Makefile to ensure that we'll get the same compiler
7607 # environment during configure and build time.
7608 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7609 export MACOSX_DEPLOYMENT_TARGET
7610 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7612$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007613
Ned Deily87adb6e2013-10-18 21:09:56 -07007614 # end of Darwin* tests
7615 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616 esac
7617 ;;
7618
7619*)
7620 case $ac_sys_system in
7621 OpenUNIX*|UnixWare*)
7622 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7623 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624 SCO_SV*)
7625 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7626 ;;
7627 esac
7628 ;;
7629esac
7630
Zachary Ware5af85642015-12-21 12:09:17 -06007631case "$CC" in
7632*icc*)
Stefan Krah84a79172020-09-04 22:33:17 +02007633 # ICC needs -fp-model strict or floats behave badly
Zachary Ware5af85642015-12-21 12:09:17 -06007634 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7635 ;;
Stefan Krah84a79172020-09-04 22:33:17 +02007636*xlc*)
7637 CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
7638 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06007639esac
7640
T. Woutersddbfa2c2017-05-23 01:30:49 +02007641if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642 :
7643else
7644 OPT="-DNDEBUG $OPT"
7645fi
7646
7647if test "$ac_arch_flags"
7648then
7649 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7650fi
7651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652# On some compilers, pthreads are available without further options
7653# (e.g. MacOS X). On some of these systems, the compiler will not
7654# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7655# So we have to see first whether pthreads are available without
7656# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7658$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007659if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663 ac_cv_pthread_is_default=no
7664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666/* end confdefs.h. */
7667
Stefan Krah7dba5942012-11-22 22:49:11 +01007668#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669#include <pthread.h>
7670
7671void* routine(void* p){return NULL;}
7672
7673int main(){
7674 pthread_t p;
7675 if(pthread_create(&p,NULL,routine,NULL)!=0)
7676 return 1;
7677 (void)pthread_detach(p);
7678 return 0;
7679}
7680
7681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683
7684 ac_cv_pthread_is_default=yes
7685 ac_cv_kthread=no
7686 ac_cv_pthread=no
7687
7688else
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694
7695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696fi
7697
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7699$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700
7701
7702if test $ac_cv_pthread_is_default = yes
7703then
7704 ac_cv_kpthread=no
7705else
7706# -Kpthread, if available, provides the right #defines
7707# and linker options to make pthread_create available
7708# Some compilers won't report that they do not support -Kpthread,
7709# so we need to run a program to see whether it really made the
7710# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7712$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007713if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715else
7716 ac_save_cc="$CC"
7717CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007718if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719 ac_cv_kpthread=no
7720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722/* end confdefs.h. */
7723
Stefan Krah7dba5942012-11-22 22:49:11 +01007724#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725#include <pthread.h>
7726
7727void* routine(void* p){return NULL;}
7728
7729int main(){
7730 pthread_t p;
7731 if(pthread_create(&p,NULL,routine,NULL)!=0)
7732 return 1;
7733 (void)pthread_detach(p);
7734 return 0;
7735}
7736
7737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007738if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739 ac_cv_kpthread=yes
7740else
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745fi
7746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747CC="$ac_save_cc"
7748fi
7749
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7751$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752fi
7753
7754if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7755then
7756# -Kthread, if available, provides the right #defines
7757# and linker options to make pthread_create available
7758# Some compilers won't report that they do not support -Kthread,
7759# so we need to run a program to see whether it really made the
7760# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7762$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007763if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765else
7766 ac_save_cc="$CC"
7767CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007768if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769 ac_cv_kthread=no
7770else
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772/* end confdefs.h. */
7773
Stefan Krah7dba5942012-11-22 22:49:11 +01007774#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775#include <pthread.h>
7776
7777void* routine(void* p){return NULL;}
7778
7779int main(){
7780 pthread_t p;
7781 if(pthread_create(&p,NULL,routine,NULL)!=0)
7782 return 1;
7783 (void)pthread_detach(p);
7784 return 0;
7785}
7786
7787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007788if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789 ac_cv_kthread=yes
7790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795fi
7796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797CC="$ac_save_cc"
7798fi
7799
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7801$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802fi
7803
7804if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7805then
7806# -pthread, if available, provides the right #defines
7807# and linker options to make pthread_create available
7808# Some compilers won't report that they do not support -pthread,
7809# so we need to run a program to see whether it really made the
7810# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7812$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007813if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815else
7816 ac_save_cc="$CC"
7817CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007818if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007819 ac_cv_pthread=no
7820else
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007822/* end confdefs.h. */
7823
Stefan Krah7dba5942012-11-22 22:49:11 +01007824#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825#include <pthread.h>
7826
7827void* routine(void* p){return NULL;}
7828
7829int main(){
7830 pthread_t p;
7831 if(pthread_create(&p,NULL,routine,NULL)!=0)
7832 return 1;
7833 (void)pthread_detach(p);
7834 return 0;
7835}
7836
7837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007838if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007839 ac_cv_pthread=yes
7840else
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007845fi
7846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847CC="$ac_save_cc"
7848fi
7849
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7851$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852fi
7853
7854# If we have set a CC compiler flag for thread support then
7855# check if it works for CXX, too.
7856ac_cv_cxx_thread=no
7857if test ! -z "$CXX"
7858then
Matthias Kloseb9621712010-04-24 17:59:49 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7860$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861ac_save_cxx="$CXX"
7862
7863if test "$ac_cv_kpthread" = "yes"
7864then
7865 CXX="$CXX -Kpthread"
7866 ac_cv_cxx_thread=yes
7867elif test "$ac_cv_kthread" = "yes"
7868then
7869 CXX="$CXX -Kthread"
7870 ac_cv_cxx_thread=yes
7871elif test "$ac_cv_pthread" = "yes"
7872then
7873 CXX="$CXX -pthread"
7874 ac_cv_cxx_thread=yes
7875fi
7876
7877if test $ac_cv_cxx_thread = yes
7878then
7879 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7880 $CXX -c conftest.$ac_ext 2>&5
7881 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7882 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7883 then
7884 ac_cv_cxx_thread=yes
7885 else
7886 ac_cv_cxx_thread=no
7887 fi
7888 rm -fr conftest*
7889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7891$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007892fi
7893CXX="$ac_save_cxx"
7894
7895
7896# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7898$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007899if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007901else
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007903/* end confdefs.h. */
7904#include <stdlib.h>
7905#include <stdarg.h>
7906#include <string.h>
7907#include <float.h>
7908
7909int
7910main ()
7911{
7912
7913 ;
7914 return 0;
7915}
7916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007917if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007918 ac_cv_header_stdc=yes
7919else
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007921fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7923
7924if test $ac_cv_header_stdc = yes; then
7925 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007927/* end confdefs.h. */
7928#include <string.h>
7929
7930_ACEOF
7931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $EGREP "memchr" >/dev/null 2>&1; then :
7933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007934else
7935 ac_cv_header_stdc=no
7936fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007937rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007938
7939fi
7940
7941if test $ac_cv_header_stdc = yes; then
7942 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007944/* end confdefs.h. */
7945#include <stdlib.h>
7946
7947_ACEOF
7948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 $EGREP "free" >/dev/null 2>&1; then :
7950
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007951else
7952 ac_cv_header_stdc=no
7953fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007954rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007955
7956fi
7957
7958if test $ac_cv_header_stdc = yes; then
7959 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007960 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007961 :
7962else
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007964/* end confdefs.h. */
7965#include <ctype.h>
7966#include <stdlib.h>
7967#if ((' ' & 0x0FF) == 0x020)
7968# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7969# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7970#else
7971# define ISLOWER(c) \
7972 (('a' <= (c) && (c) <= 'i') \
7973 || ('j' <= (c) && (c) <= 'r') \
7974 || ('s' <= (c) && (c) <= 'z'))
7975# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7976#endif
7977
7978#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7979int
7980main ()
7981{
7982 int i;
7983 for (i = 0; i < 256; i++)
7984 if (XOR (islower (i), ISLOWER (i))
7985 || toupper (i) != TOUPPER (i))
7986 return 2;
7987 return 0;
7988}
7989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if ac_fn_c_try_run "$LINENO"; then :
7991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007992else
Matthias Kloseb9621712010-04-24 17:59:49 +00007993 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007997fi
7998
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007999fi
8000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8002$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008003if test $ac_cv_header_stdc = yes; then
8004
Matthias Kloseb9621712010-04-24 17:59:49 +00008005$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008006
8007fi
8008
stratakise768c862018-01-23 16:11:24 +01008009for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00008010fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02008011ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008012sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07008013utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01008014poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01008015sys/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 +01008016sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08008017sys/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 +01008018sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00008019sys/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 -07008020libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008021linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimescd9fed62020-11-13 19:48:52 +01008022sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \
8023sys/mman.h sys/eventfd.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008024do :
8025 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8026ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008027if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008029#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008030_ACEOF
8031
8032fi
8033
Guido van Rossum627b2d71993-12-24 10:39:16 +00008034done
8035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008036ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008037for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
8040$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008041if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00008043else
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008045/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046#include <sys/types.h>
8047#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00008048
Martin v. Löwis11437992002-04-12 09:54:03 +00008049int
8050main ()
8051{
8052if ((DIR *) 0)
8053return 0;
8054 ;
8055 return 0;
8056}
8057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065eval ac_res=\$$as_ac_Header
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8067$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008068if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008070#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008071_ACEOF
8072
8073ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008076done
8077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8078if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8080$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008081if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008083else
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088/* Override any GCC internal prototype to avoid an error.
8089 Use char because int might match the return type of a GCC
8090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008091#ifdef __cplusplus
8092extern "C"
8093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008094char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ;
8100 return 0;
8101}
8102_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103for ac_lib in '' dir; do
8104 if test -z "$ac_lib"; then
8105 ac_res="none required"
8106 else
8107 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008108 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113rm -f core conftest.err conftest.$ac_objext \
8114 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008115 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118done
Victor Stinnere0be4232011-10-25 13:06:09 +02008119if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008121else
8122 ac_cv_search_opendir=no
8123fi
8124rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125LIBS=$ac_func_search_save_LIBS
8126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8128$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008133fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008134
Michael W. Hudson54241132001-12-07 15:38:26 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8137$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008138if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008140else
8141 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145/* Override any GCC internal prototype to avoid an error.
8146 Use char because int might match the return type of a GCC
8147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008148#ifdef __cplusplus
8149extern "C"
8150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008151char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008152int
8153main ()
8154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ;
8157 return 0;
8158}
8159_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160for ac_lib in '' x; do
8161 if test -z "$ac_lib"; then
8162 ac_res="none required"
8163 else
8164 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008165 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008168 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008170rm -f core conftest.err conftest.$ac_objext \
8171 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008172 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175done
Victor Stinnere0be4232011-10-25 13:06:09 +02008176if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178else
8179 ac_cv_search_opendir=no
8180fi
8181rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008182LIBS=$ac_func_search_save_LIBS
8183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8185$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008190fi
8191
8192fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8195$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008196if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008198else
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008201#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008202int
8203main ()
8204{
8205return makedev(0, 0);
8206 ;
8207 return 0;
8208}
8209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008211 ac_cv_header_sys_types_h_makedev=yes
8212else
Matthias Kloseb9621712010-04-24 17:59:49 +00008213 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215rm -f core conftest.err conftest.$ac_objext \
8216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008217
8218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8220$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008221
8222if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008223ac_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 +02008224if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008225
Matthias Kloseb9621712010-04-24 17:59:49 +00008226$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008227
8228fi
8229
8230
8231
8232 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 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 +02008234if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008237
8238fi
8239
8240
8241 fi
8242fi
8243
Michael W. Hudson54241132001-12-07 15:38:26 +00008244
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008245# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8246# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8247SAVE_CFLAGS=$CFLAGS
8248CFLAGS="-std=c99 $CFLAGS"
8249for ac_header in bluetooth/bluetooth.h
8250do :
8251 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8252if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8253 cat >>confdefs.h <<_ACEOF
8254#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8255_ACEOF
8256
8257fi
8258
8259done
8260
8261CFLAGS=$SAVE_CFLAGS
8262
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008263# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8264for ac_header in net/if.h
8265do :
8266 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8267#ifdef STDC_HEADERS
8268# include <stdlib.h>
8269# include <stddef.h>
8270#else
8271# ifdef HAVE_STDLIB_H
8272# include <stdlib.h>
8273# endif
8274#endif
8275#ifdef HAVE_SYS_SOCKET_H
8276# include <sys/socket.h>
8277#endif
8278
8279"
Victor Stinnere0be4232011-10-25 13:06:09 +02008280if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008281 cat >>confdefs.h <<_ACEOF
8282#define HAVE_NET_IF_H 1
8283_ACEOF
8284
8285fi
8286
8287done
8288
8289
Martin v. Löwis11017b12006-01-14 18:12:57 +00008290# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008291for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008292do :
8293 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 +00008294#ifdef HAVE_ASM_TYPES_H
8295#include <asm/types.h>
8296#endif
8297#ifdef HAVE_SYS_SOCKET_H
8298#include <sys/socket.h>
8299#endif
8300
Matthias Kloseb9621712010-04-24 17:59:49 +00008301"
Victor Stinnere0be4232011-10-25 13:06:09 +02008302if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008303 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008304#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008305_ACEOF
8306
8307fi
8308
8309done
8310
8311
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008312# On Linux, qrtr.h requires asm/types.h
8313for ac_header in linux/qrtr.h
8314do :
8315 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8316#ifdef HAVE_ASM_TYPES_H
8317#include <asm/types.h>
8318#endif
8319#ifdef HAVE_SYS_SOCKET_H
8320#include <sys/socket.h>
8321#endif
8322
8323"
8324if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8325 cat >>confdefs.h <<_ACEOF
8326#define HAVE_LINUX_QRTR_H 1
8327_ACEOF
8328
8329fi
8330
8331done
8332
8333
caaveryeffc12f2017-09-06 18:18:10 -04008334for ac_header in linux/vm_sockets.h
8335do :
8336 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8337#ifdef HAVE_SYS_SOCKET_H
8338#include <sys/socket.h>
8339#endif
8340
8341"
8342if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8343 cat >>confdefs.h <<_ACEOF
8344#define HAVE_LINUX_VM_SOCKETS_H 1
8345_ACEOF
8346
8347fi
8348
8349done
8350
8351
karl ding360371f2020-04-29 15:31:19 -07008352# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8353for 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 +02008354do :
8355 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8356ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8357#ifdef HAVE_SYS_SOCKET_H
8358#include <sys/socket.h>
8359#endif
8360
8361"
8362if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8363 cat >>confdefs.h <<_ACEOF
8364#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8365_ACEOF
8366
8367fi
8368
8369done
8370
8371
Guido van Rossum627b2d71993-12-24 10:39:16 +00008372# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008373was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8375$as_echo_n "checking for clock_t in time.h... " >&6; }
8376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008377/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008378#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
8380_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008383 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
8386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008388
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008389
Guido van Rossum627b2d71993-12-24 10:39:16 +00008390fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008391rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8394$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8397$as_echo_n "checking for makedev... " >&6; }
8398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008400
Jesus Cea740f53a2010-04-28 11:35:30 +00008401#if defined(MAJOR_IN_MKDEV)
8402#include <sys/mkdev.h>
8403#elif defined(MAJOR_IN_SYSMACROS)
8404#include <sys/sysmacros.h>
8405#else
8406#include <sys/types.h>
8407#endif
8408
Neal Norwitz11690112002-07-30 01:08:28 +00008409int
8410main ()
8411{
Jesus Cea740f53a2010-04-28 11:35:30 +00008412
8413 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008414 ;
8415 return 0;
8416}
Matthias Kloseb159a552010-04-25 21:00:44 +00008417
Neal Norwitz11690112002-07-30 01:08:28 +00008418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008419if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008420 ac_cv_has_makedev=yes
8421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424rm -f core conftest.err conftest.$ac_objext \
8425 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8427$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008428if test "$ac_cv_has_makedev" = "yes"; then
8429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008431
8432fi
8433
Christian Heimes985ecdc2013-11-20 11:46:18 +01008434# byte swapping
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8436$as_echo_n "checking for le64toh... " >&6; }
8437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8438/* end confdefs.h. */
8439
8440#ifdef HAVE_ENDIAN_H
8441#include <endian.h>
8442#elif defined(HAVE_SYS_ENDIAN_H)
8443#include <sys/endian.h>
8444#endif
8445
8446int
8447main ()
8448{
8449
8450 le64toh(1)
8451 ;
8452 return 0;
8453}
8454
8455_ACEOF
8456if ac_fn_c_try_link "$LINENO"; then :
8457 ac_cv_has_le64toh=yes
8458else
8459 ac_cv_has_le64toh=no
8460fi
8461rm -f core conftest.err conftest.$ac_objext \
8462 conftest$ac_exeext conftest.$ac_ext
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8464$as_echo "$ac_cv_has_le64toh" >&6; }
8465if test "$ac_cv_has_le64toh" = "yes"; then
8466
8467$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8468
8469fi
8470
Martin v. Löwis399a6892002-10-04 10:22:02 +00008471use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008472# Don't use largefile support for GNU/Hurd
8473case $ac_sys_system in GNU*)
8474 use_lfs=no
8475esac
8476
Martin v. Löwis399a6892002-10-04 10:22:02 +00008477if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008478# Two defines needed to enable largefile support on various platforms
8479# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008480case $ac_sys_system/$ac_sys_release in
8481AIX*)
8482
8483$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8484
8485 ;;
8486esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008487
Matthias Kloseb9621712010-04-24 17:59:49 +00008488$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008489
8490
Matthias Kloseb9621712010-04-24 17:59:49 +00008491$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008492
Martin v. Löwis399a6892002-10-04 10:22:02 +00008493fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008494
Guido van Rossum84e7b241996-08-19 21:59:00 +00008495# Add some code to confdefs.h so that the test for off_t works on SCO
8496cat >> confdefs.h <<\EOF
8497#if defined(SCO_DS)
8498#undef _OFF_T
8499#endif
8500EOF
8501
Guido van Rossumef2255b2000-03-10 22:30:29 +00008502# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008503ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008504if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
8508cat >>confdefs.h <<_ACEOF
8509#define mode_t int
8510_ACEOF
8511
8512fi
8513
Matthias Kloseb9621712010-04-24 17:59:49 +00008514ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008516
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
8519cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008521_ACEOF
8522
8523fi
8524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008526if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008527
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008528else
Martin v. Löwis11437992002-04-12 09:54:03 +00008529
8530cat >>confdefs.h <<_ACEOF
8531#define pid_t int
8532_ACEOF
8533
8534fi
8535
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008538#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008539_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008540
Matthias Kloseb9621712010-04-24 17:59:49 +00008541ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008542if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008544else
Martin v. Löwis11437992002-04-12 09:54:03 +00008545
8546cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008548_ACEOF
8549
8550fi
8551
Matthias Kloseb9621712010-04-24 17:59:49 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8553$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008554if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008556else
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008558/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008559#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
8561_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008564 ac_cv_type_uid_t=yes
8565else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008566 ac_cv_type_uid_t=no
8567fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008568rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8572$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008573if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008574
Matthias Kloseb9621712010-04-24 17:59:49 +00008575$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
8577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008579
8580fi
8581
Mark Dickinson983bc162012-12-02 12:11:38 +00008582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008584if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585
Matthias Kloseb9621712010-04-24 17:59:49 +00008586$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008587
8588fi
8589
Stefan Krah1919b7e2012-03-21 18:25:23 +01008590ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8591if test "x$ac_cv_type___uint128_t" = xyes; then :
8592
8593$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8594
8595fi
8596
Jack Jansendd19cf82001-12-06 22:36:17 +00008597
Michael W. Hudson54241132001-12-07 15:38:26 +00008598# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008599# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8605$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008606if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 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 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611else
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 if test "$ac_cv_type_int" = yes; then
8613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008615as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008616See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 else
8618 ac_cv_sizeof_int=0
8619 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8624$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625
8626
8627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008629#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008630_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008631
8632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633# The cast to long int works around a bug in the HP C Compiler
8634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8636# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8638$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008639if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 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 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 if test "$ac_cv_type_long" = yes; then
8646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008648as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008649See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_long=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8657$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008662#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008664
8665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666# The cast to long int works around a bug in the HP C Compiler
8667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8669# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8671$as_echo_n "checking size of long long... " >&6; }
8672if ${ac_cv_sizeof_long_long+:} false; then :
8673 $as_echo_n "(cached) " >&6
8674else
8675 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8676
8677else
8678 if test "$ac_cv_type_long_long" = yes; then
8679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8681as_fn_error 77 "cannot compute sizeof (long long)
8682See \`config.log' for more details" "$LINENO" 5; }
8683 else
8684 ac_cv_sizeof_long_long=0
8685 fi
8686fi
8687
8688fi
8689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8690$as_echo "$ac_cv_sizeof_long_long" >&6; }
8691
8692
8693
8694cat >>confdefs.h <<_ACEOF
8695#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8696_ACEOF
8697
8698
8699# The cast to long int works around a bug in the HP C Compiler
8700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8702# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8704$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 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 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if test "$ac_cv_type_void_p" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008714as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008715See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716 else
8717 ac_cv_sizeof_void_p=0
8718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8723$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724
8725
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008728#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008729_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008730
8731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8737$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_short" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof_short=0
8751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8756$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Martin v. Löwis11437992002-04-12 09:54:03 +00008760cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008761#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008762_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008763
8764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765# The cast to long int works around a bug in the HP C Compiler
8766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8770$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008771if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 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 +00008775
Martin v. Löwis11437992002-04-12 09:54:03 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if test "$ac_cv_type_float" = yes; then
8778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008780as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008781See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782 else
8783 ac_cv_sizeof_float=0
8784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786
Martin v. Löwis11437992002-04-12 09:54:03 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8789$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008790
8791
8792
Martin v. Löwis11437992002-04-12 09:54:03 +00008793cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008794#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008795_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008796
8797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# The cast to long int works around a bug in the HP C Compiler
8799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8803$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008804if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 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 +00008808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 if test "$ac_cv_type_double" = yes; then
8811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008813as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008814See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815 else
8816 ac_cv_sizeof_double=0
8817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819
Martin v. Löwis11437992002-04-12 09:54:03 +00008820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8822$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823
8824
8825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008827#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008828_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008829
8830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831# The cast to long int works around a bug in the HP C Compiler
8832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8834# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8836$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008837if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008839else
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 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 +00008841
Martin v. Löwis11437992002-04-12 09:54:03 +00008842else
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 if test "$ac_cv_type_fpos_t" = yes; then
8844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008846as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008847See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 else
8849 ac_cv_sizeof_fpos_t=0
8850 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8855$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856
8857
8858
Martin v. Löwis11437992002-04-12 09:54:03 +00008859cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008860#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008861_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008862
Michael W. Hudson54241132001-12-07 15:38:26 +00008863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864# The cast to long int works around a bug in the HP C Compiler
8865# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8866# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8867# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8869$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008870if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 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 +00008874
Martin v. Löwis18e16552006-02-15 17:27:45 +00008875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 if test "$ac_cv_type_size_t" = yes; then
8877 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008879as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008880See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 else
8882 ac_cv_sizeof_size_t=0
8883 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008885
Martin v. Löwis18e16552006-02-15 17:27:45 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8888$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889
8890
8891
Martin v. Löwis18e16552006-02-15 17:27:45 +00008892cat >>confdefs.h <<_ACEOF
8893#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8894_ACEOF
8895
8896
Christian Heimes400adb02008-02-01 08:12:03 +00008897# The cast to long int works around a bug in the HP C Compiler
8898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8900# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8902$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008903if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008905else
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 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 +00008907
Christian Heimes400adb02008-02-01 08:12:03 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 if test "$ac_cv_type_pid_t" = yes; then
8910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008912as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008913See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008914 else
8915 ac_cv_sizeof_pid_t=0
8916 fi
8917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918
Christian Heimes400adb02008-02-01 08:12:03 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8921$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008922
8923
8924
8925cat >>confdefs.h <<_ACEOF
8926#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8927_ACEOF
8928
8929
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008930# The cast to long int works around a bug in the HP C Compiler
8931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8933# This bug is HP SR number 8606223364.
8934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8935$as_echo_n "checking size of uintptr_t... " >&6; }
8936if ${ac_cv_sizeof_uintptr_t+:} false; then :
8937 $as_echo_n "(cached) " >&6
8938else
8939 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8940
8941else
8942 if test "$ac_cv_type_uintptr_t" = yes; then
8943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8945as_fn_error 77 "cannot compute sizeof (uintptr_t)
8946See \`config.log' for more details" "$LINENO" 5; }
8947 else
8948 ac_cv_sizeof_uintptr_t=0
8949 fi
8950fi
8951
8952fi
8953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8954$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8955
8956
8957
8958cat >>confdefs.h <<_ACEOF
8959#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8960_ACEOF
8961
8962
Michael W. Hudson54241132001-12-07 15:38:26 +00008963
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964
Eitan Adler3055c942018-05-15 22:58:09 -07008965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8966$as_echo_n "checking for long double... " >&6; }
8967if ${ac_cv_type_long_double+:} false; then :
8968 $as_echo_n "(cached) " >&6
8969else
8970 if test "$GCC" = yes; then
8971 ac_cv_type_long_double=yes
8972 else
8973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974/* end confdefs.h. */
8975/* The Stardent Vistra knows sizeof (long double), but does
8976 not support it. */
8977 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008978int
8979main ()
8980{
Eitan Adler3055c942018-05-15 22:58:09 -07008981static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8982 sizeof (double) <= sizeof (long double))];
8983test_array [0] = 0;
8984return test_array [0];
8985
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008986 ;
8987 return 0;
8988}
8989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008990if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008991 ac_cv_type_long_double=yes
8992else
8993 ac_cv_type_long_double=no
8994fi
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8996 fi
8997fi
8998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8999$as_echo "$ac_cv_type_long_double" >&6; }
9000 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009001
Matthias Kloseb9621712010-04-24 17:59:49 +00009002$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009003
Eitan Adler3055c942018-05-15 22:58:09 -07009004 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009005
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009006# The cast to long int works around a bug in the HP C Compiler
9007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9009# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
9011$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009012if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 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 +00009016
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009017else
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 if test "$ac_cv_type_long_double" = yes; then
9019 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009021as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02009022See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009023 else
9024 ac_cv_sizeof_long_double=0
9025 fi
9026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009027
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
9030$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009031
9032
9033
9034cat >>confdefs.h <<_ACEOF
9035#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
9036_ACEOF
9037
9038
Travis E. Oliphant9b307842007-10-12 22:06:37 +00009039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040# The cast to long int works around a bug in the HP C Compiler
9041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9043# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
9045$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009046if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00009048else
Matthias Kloseb9621712010-04-24 17:59:49 +00009049 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 +00009050
Thomas Woutersb2137042007-02-01 18:02:27 +00009051else
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 if test "$ac_cv_type__Bool" = yes; then
9053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009055as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009056See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057 else
9058 ac_cv_sizeof__Bool=0
9059 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009061
Thomas Woutersb2137042007-02-01 18:02:27 +00009062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9064$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065
9066
9067
Thomas Woutersb2137042007-02-01 18:02:27 +00009068cat >>confdefs.h <<_ACEOF
9069#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9070_ACEOF
9071
9072
Thomas Woutersb2137042007-02-01 18:02:27 +00009073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009074# The cast to long int works around a bug in the HP C Compiler
9075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9079$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009080if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082else
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009084#ifdef HAVE_SYS_TYPES_H
9085#include <sys/types.h>
9086#endif
9087
Matthias Kloseb9621712010-04-24 17:59:49 +00009088"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009090else
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 if test "$ac_cv_type_off_t" = yes; then
9092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009094as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009095See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096 else
9097 ac_cv_sizeof_off_t=0
9098 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009100
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9103$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009105
9106
Martin v. Löwis11437992002-04-12 09:54:03 +00009107cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009108#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009109_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009110
Michael W. Hudson54241132001-12-07 15:38:26 +00009111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009112
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9114$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009115if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009116 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9121$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009122else
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009125fi
9126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009127# The cast to long int works around a bug in the HP C Compiler
9128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9130# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9132$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009133if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009134 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009135else
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009137#ifdef HAVE_SYS_TYPES_H
9138#include <sys/types.h>
9139#endif
9140#ifdef HAVE_TIME_H
9141#include <time.h>
9142#endif
9143
Matthias Kloseb9621712010-04-24 17:59:49 +00009144"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009145
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 if test "$ac_cv_type_time_t" = yes; then
9148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009150as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009151See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009152 else
9153 ac_cv_sizeof_time_t=0
9154 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009156
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9159$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009161
9162
Martin v. Löwis11437992002-04-12 09:54:03 +00009163cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009164#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009165_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009166
Michael W. Hudson54241132001-12-07 15:38:26 +00009167
9168
Trent Mick635f6fb2000-08-23 21:33:05 +00009169# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009170ac_save_cc="$CC"
9171if test "$ac_cv_kpthread" = "yes"
9172then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009173elif test "$ac_cv_kthread" = "yes"
9174then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009175elif test "$ac_cv_pthread" = "yes"
9176then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009177fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9180$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009181have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009183/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009184
9185 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009186int
9187main ()
9188{
Guido van Rossum12580492000-09-24 16:47:19 +00009189pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ;
9191 return 0;
9192}
Matthias Kloseb159a552010-04-25 21:00:44 +00009193
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009195if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009196 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9200$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009201if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009202 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9205# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9207$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009208if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009209 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009210else
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009212#ifdef HAVE_PTHREAD_H
9213#include <pthread.h>
9214#endif
9215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009218else
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 if test "$ac_cv_type_pthread_t" = yes; then
9220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009222as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009223See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009224 else
9225 ac_cv_sizeof_pthread_t=0
9226 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228
Trent Mick635f6fb2000-08-23 21:33:05 +00009229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9231$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009233
9234
Martin v. Löwis11437992002-04-12 09:54:03 +00009235cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009236#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009237_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009239
Trent Mick635f6fb2000-08-23 21:33:05 +00009240fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009241
9242# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9243# This checking will be unnecessary after removing deprecated TLS API.
9244# The cast to long int works around a bug in the HP C Compiler
9245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9247# This bug is HP SR number 8606223364.
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9249$as_echo_n "checking size of pthread_key_t... " >&6; }
9250if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9251 $as_echo_n "(cached) " >&6
9252else
9253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9254"; then :
9255
9256else
9257 if test "$ac_cv_type_pthread_key_t" = yes; then
9258 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9260as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9261See \`config.log' for more details" "$LINENO" 5; }
9262 else
9263 ac_cv_sizeof_pthread_key_t=0
9264 fi
9265fi
9266
9267fi
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9269$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9270
9271
9272
9273cat >>confdefs.h <<_ACEOF
9274#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9275_ACEOF
9276
9277
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9279$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9280if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9282/* end confdefs.h. */
9283#include <pthread.h>
9284int
9285main ()
9286{
9287pthread_key_t k; k * 1;
9288 ;
9289 return 0;
9290}
9291_ACEOF
9292if ac_fn_c_try_compile "$LINENO"; then :
9293 ac_pthread_key_t_is_arithmetic_type=yes
9294else
9295 ac_pthread_key_t_is_arithmetic_type=no
9296
9297fi
9298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9300$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9301 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9302
9303$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9304
9305 fi
9306else
9307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
9309fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009310CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009311
Michael W. Hudson54241132001-12-07 15:38:26 +00009312
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009314 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009315 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9316 ;;
9317 Darwin/*)
9318 OTHER_LIBTOOL_OPT=""
9319 ;;
9320esac
9321
9322
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009323
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009324case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009325 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009326 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9327 if test "${enable_universalsdk}"; then
9328 :
9329 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009330 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009331 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009332 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009333 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009334 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009335 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009336 if test ${gcc_version} '<' 4.0
9337 then
9338 LIBTOOL_CRUFT="-lcc_dynamic"
9339 else
9340 LIBTOOL_CRUFT=""
9341 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009343 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009344else
Matthias Kloseb9621712010-04-24 17:59:49 +00009345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009346/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009347
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009348 #include <unistd.h>
9349 int main(int argc, char*argv[])
9350 {
9351 if (sizeof(long) == 4) {
9352 return 0;
9353 } else {
9354 return 1;
9355 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009356 }
9357
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009359if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009360 ac_osx_32bit=yes
9361else
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009366fi
9367
9368
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009369 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009370 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009371 i386)
9372 MACOSX_DEFAULT_ARCH="i386"
9373 ;;
9374 ppc)
9375 MACOSX_DEFAULT_ARCH="ppc"
9376 ;;
9377 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009378 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009379 ;;
9380 esac
9381 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009382 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009383 i386)
9384 MACOSX_DEFAULT_ARCH="x86_64"
9385 ;;
9386 ppc)
9387 MACOSX_DEFAULT_ARCH="ppc64"
Ronald Oussoren41761932020-11-08 10:05:27 +01009388 ;;
9389 arm64)
9390 MACOSX_DEFAULT_ARCH="arm64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009391 ;;
9392 *)
Ronald Oussoren41761932020-11-08 10:05:27 +01009393 as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009394 ;;
9395 esac
9396
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009397 fi
9398
9399 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009400 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009401 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009402esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9404$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009405if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009406then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009407 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009409 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009410
Matthias Kloseb9621712010-04-24 17:59:49 +00009411$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009412
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9414$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009415 if test $enable_shared = "yes"
9416 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009417 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 +00009418 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009419else
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009422fi
9423
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9425$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009426case $ac_sys_system/$ac_sys_release in
9427 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009430
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9432$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009433 ;;
9434 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009437 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009438esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009439
Guido van Rossum0a516c91994-09-12 10:58:40 +00009440# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009441
Michael W. Hudson54241132001-12-07 15:38:26 +00009442
9443
9444
9445
Benjamin Peterson99f03762010-04-11 22:15:28 +00009446
Thomas Wouters477c8d52006-05-27 19:21:47 +00009447
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009448# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9449# -- usually .so, .sl on HP-UX, .dll on Cygwin
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9451$as_echo_n "checking the extension of shared libraries... " >&6; }
9452if test -z "$SHLIB_SUFFIX"; then
9453 case $ac_sys_system in
9454 hp*|HP*)
9455 case `uname -m` in
9456 ia64) SHLIB_SUFFIX=.so;;
9457 *) SHLIB_SUFFIX=.sl;;
9458 esac
9459 ;;
9460 CYGWIN*) SHLIB_SUFFIX=.dll;;
9461 *) SHLIB_SUFFIX=.so;;
9462 esac
9463fi
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9465$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009466
Guido van Rossum0a516c91994-09-12 10:58:40 +00009467# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009468# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009469# (Shared libraries in this instance are shared modules to be loaded into
9470# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9472$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473if test -z "$LDSHARED"
9474then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009476 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009477 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009478 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009479 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009481 if test "$GCC" = "yes" ; then
9482 LDSHARED='$(CC) -shared'
9483 LDCXXSHARED='$(CXX) -shared'
9484 else
9485 LDSHARED='$(CC) -G'
9486 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009487 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009488 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009489 if test "$GCC" = "yes" ; then
9490 LDSHARED='$(CC) -shared'
9491 LDCXXSHARED='$(CXX) -shared'
9492 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009493 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009494 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009495 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009496 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009497 LDSHARED='$(CC) -bundle'
9498 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009499 if test "$enable_framework" ; then
9500 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009501 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9502 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009503 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009504 else
9505 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009506 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009507 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009508 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009509 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009510 LDSHARED='$(CC) -bundle'
9511 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009512 if test "$enable_framework" ; then
9513 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009514 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9515 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009516 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009517 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009518 # No framework, use the Python app as bundle-loader
9519 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009520 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009521 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009522 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009523 Darwin/*)
9524 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9525 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009526
Ned Deily36820b62014-06-25 13:44:22 -07009527 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9528 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9529 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9530 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9531 if test ${dep_target_major} -eq 10 && \
9532 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009533 then
Ned Deily36820b62014-06-25 13:44:22 -07009534 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009535 LDSHARED='$(CC) -bundle'
9536 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009537 if test "$enable_framework" ; then
9538 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009539 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9540 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009541 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009542 else
9543 # No framework, use the Python app as bundle-loader
9544 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9545 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009546 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009547 fi
Ned Deily36820b62014-06-25 13:44:22 -07009548 else
9549 # building for OS X 10.3 and later
9550 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9551 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9552 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009553 fi
9554 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009555 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009556 LDSHARED='$(CC) -shared'
9557 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009558 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009559 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009560 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009561 LDSHARED='$(CC) -shared'
9562 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009563 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009564 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009565 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009566 OpenBSD*)
9567 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9568 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009569 LDSHARED='$(CC) -shared $(CCSHARED)'
9570 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009571 else
9572 case `uname -r` in
9573 [01].* | 2.[0-7] | 2.[0-7].*)
9574 LDSHARED="ld -Bshareable ${LDFLAGS}"
9575 ;;
9576 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009577 LDSHARED='$(CC) -shared $(CCSHARED)'
9578 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009579 ;;
9580 esac
9581 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009582 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009583 LDSHARED='$(CC) -shared'
9584 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009585 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009586 if test "$GCC" = "yes" ; then
9587 LDSHARED='$(CC) -shared'
9588 LDCXXSHARED='$(CXX) -shared'
9589 else
9590 LDSHARED='$(CC) -G'
9591 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009592 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009593 SCO_SV*)
9594 LDSHARED='$(CC) -Wl,-G,-Bexport'
9595 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9596 CYGWIN*)
9597 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9598 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009599 *) LDSHARED="ld";;
9600 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9603$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009604LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009605BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009606# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009607# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9609$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009610if test -z "$CCSHARED"
9611then
Guido van Rossum07397971997-04-29 21:49:50 +00009612 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009613 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009614 then CCSHARED="-fPIC";
9615 elif test `uname -p` = sparc;
9616 then CCSHARED="-xcode=pic32";
9617 else CCSHARED="-Kpic";
9618 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009619 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009620 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009621 else CCSHARED="+z";
9622 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009623 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009625 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009626 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009627 if test "$GCC" = "yes"
9628 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009629 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009630 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009631 SCO_SV*)
9632 if test "$GCC" = "yes"
9633 then CCSHARED="-fPIC"
9634 else CCSHARED="-Kpic -belf"
9635 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009636 VxWorks*)
9637 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009638 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9641$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009642# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009643# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9645$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009646if test -z "$LINKFORSHARED"
9647then
Guido van Rossum07397971997-04-29 21:49:50 +00009648 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009649 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009650 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009651 LINKFORSHARED="-Wl,-E -Wl,+s";;
9652# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009653 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009654 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009655 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009657 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009658
9659 # Issue #18075: the default maximum stack size (8MBytes) is too
9660 # small for the default recursion limit. Increase the stack size
9661 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009662 # Note: This matches the value of THREAD_STACK_SIZE in
9663 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009664 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9665
Jack Jansene578a632001-08-15 01:27:14 +00009666 if test "$enable_framework"
9667 then
Jack Jansenda49e192005-01-07 13:08:22 +00009668 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009669 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009670 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009671 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009672 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009673 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009674 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009675 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9676 then
9677 LINKFORSHARED="-Wl,--export-dynamic"
9678 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009679 SunOS/5*) case $CC in
9680 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009681 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009682 then
9683 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009684 fi;;
9685 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009686 CYGWIN*)
9687 if test $enable_shared = "no"
9688 then
9689 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9690 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009691 QNX*)
9692 # -Wl,-E causes the symbols to be added to the dynamic
9693 # symbol table so that they can be found when a module
9694 # is loaded. -N 2048K causes the stack size to be set
9695 # to 2048 kilobytes so that the stack doesn't overflow
9696 # when running test_compile.py.
9697 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009698 VxWorks*)
9699 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009700 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9703$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009704
Michael W. Hudson54241132001-12-07 15:38:26 +00009705
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009706
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9708$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009709if test ! "$LIBRARY" = "$LDLIBRARY"
9710then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009711 case $ac_sys_system in
9712 CYGWIN*)
9713 # Cygwin needs CCSHARED when building extension DLLs
9714 # but not when building the interpreter DLL.
9715 CFLAGSFORSHARED='';;
9716 *)
9717 CFLAGSFORSHARED='$(CCSHARED)'
9718 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9721$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009722
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009723# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9724# library (with --enable-shared).
9725# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009726# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9727# if it is not required, since it creates a dependency of the shared library
9728# to LIBS. This, in turn, means that applications linking the shared libpython
9729# don't need to link LIBS explicitly. The default should be only changed
9730# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009731
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9733$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009734case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009735 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009736 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009737esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9739$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009740
9741
Guido van Rossum627b2d71993-12-24 10:39:16 +00009742# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9744$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009745if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009746 $as_echo_n "(cached) " >&6
9747else
9748 ac_check_lib_save_LIBS=$LIBS
9749LIBS="-lsendfile $LIBS"
9750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9751/* end confdefs.h. */
9752
9753/* Override any GCC internal prototype to avoid an error.
9754 Use char because int might match the return type of a GCC
9755 builtin and then its argument prototype would still apply. */
9756#ifdef __cplusplus
9757extern "C"
9758#endif
9759char sendfile ();
9760int
9761main ()
9762{
9763return sendfile ();
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768if ac_fn_c_try_link "$LINENO"; then :
9769 ac_cv_lib_sendfile_sendfile=yes
9770else
9771 ac_cv_lib_sendfile_sendfile=no
9772fi
9773rm -f core conftest.err conftest.$ac_objext \
9774 conftest$ac_exeext conftest.$ac_ext
9775LIBS=$ac_check_lib_save_LIBS
9776fi
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9778$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009779if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009780 cat >>confdefs.h <<_ACEOF
9781#define HAVE_LIBSENDFILE 1
9782_ACEOF
9783
9784 LIBS="-lsendfile $LIBS"
9785
9786fi
9787
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9789$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009790if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009794LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801#ifdef __cplusplus
9802extern "C"
9803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009804char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
9807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009815else
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9823$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 cat >>confdefs.h <<_ACEOF
9826#define HAVE_LIBDL 1
9827_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009828
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009829 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009830
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009831fi
9832 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9834$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009837else
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009839LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843/* Override any GCC internal prototype to avoid an error.
9844 Use char because int might match the return type of a GCC
9845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#ifdef __cplusplus
9847extern "C"
9848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009849char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009850int
9851main ()
9852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ;
9855 return 0;
9856}
9857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009860else
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863rm -f core conftest.err conftest.$ac_objext \
9864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009865LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9868$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 cat >>confdefs.h <<_ACEOF
9871#define HAVE_LIBDLD 1
9872_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009873
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009874 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009875
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009876fi
9877 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009878
Michael Felt0d3ccb42017-12-30 22:39:20 +01009879# checks for uuid.h location
9880for ac_header in uuid/uuid.h uuid.h
9881do :
9882 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9883ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9884if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9885 cat >>confdefs.h <<_ACEOF
9886#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9887_ACEOF
9888
9889fi
9890
9891done
9892
9893
Berker Peksag9a10ff42017-11-08 23:09:16 +03009894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9895$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897/* end confdefs.h. */
9898#include <uuid/uuid.h>
9899int
9900main ()
9901{
9902
9903#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009904void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009905#endif
9906
9907 ;
9908 return 0;
9909}
9910_ACEOF
9911if ac_fn_c_try_compile "$LINENO"; then :
9912
9913$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9914
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9916$as_echo "yes" >&6; }
9917else
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9919$as_echo "no" >&6; }
9920
9921fi
9922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9923
Michael Felt0d3ccb42017-12-30 22:39:20 +01009924# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009925# FreeBSD and OpenBSD provides support as well
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9927$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9929/* end confdefs.h. */
9930#include <uuid.h>
9931int
9932main ()
9933{
9934
9935#ifndef uuid_create
9936void *x = uuid_create
9937#endif
9938
9939 ;
9940 return 0;
9941}
9942_ACEOF
9943if ac_fn_c_try_compile "$LINENO"; then :
9944
9945$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9946
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9948$as_echo "yes" >&6; }
9949else
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952
9953fi
9954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9955
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009956# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9957# stream in big-endian byte-order
9958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9959$as_echo_n "checking for uuid_enc_be... " >&6; }
9960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9961/* end confdefs.h. */
9962#include <uuid.h>
9963int
9964main ()
9965{
9966
9967#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009968void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009969#endif
9970
9971 ;
9972 return 0;
9973}
9974_ACEOF
9975if ac_fn_c_try_compile "$LINENO"; then :
9976
9977$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9978
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9980$as_echo "yes" >&6; }
9981else
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984
9985fi
9986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9987
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009988# 'Real Time' functions on Solaris
9989# posix4 on Solaris 2.6
9990# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009992$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009993if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009995else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009996 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000/* Override any GCC internal prototype to avoid an error.
10001 Use char because int might match the return type of a GCC
10002 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010003#ifdef __cplusplus
10004extern "C"
10005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010006char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010007int
10008main ()
10009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ;
10012 return 0;
10013}
10014_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015for ac_lib in '' pthread rt posix4; do
10016 if test -z "$ac_lib"; then
10017 ac_res="none required"
10018 else
10019 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010020 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000010024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010025rm -f core conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +020010027 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010028 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030done
Victor Stinnere0be4232011-10-25 13:06:09 +020010031if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033else
10034 ac_cv_search_sem_init=no
10035fi
10036rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010037LIBS=$ac_func_search_save_LIBS
10038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
10040$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010043 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010044
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010045fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +020010046
Martin v. Löwis519adae2003-09-20 10:47:47 +000010047
Martin v. Löwis19d17342003-06-14 21:03:05 +000010048# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
10050$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010051if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000010053else
10054 ac_check_lib_save_LIBS=$LIBS
10055LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010057/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059/* Override any GCC internal prototype to avoid an error.
10060 Use char because int might match the return type of a GCC
10061 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010062#ifdef __cplusplus
10063extern "C"
10064#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010065char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010066int
10067main ()
10068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010070 ;
10071 return 0;
10072}
10073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010075 ac_cv_lib_intl_textdomain=yes
10076else
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010079rm -f core conftest.err conftest.$ac_objext \
10080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010081LIBS=$ac_check_lib_save_LIBS
10082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10084$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010085if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010088
Brett Cannonc6d936e2009-06-07 20:09:53 +000010089 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010090fi
10091
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010092
10093# checks for system dependent C++ extensions support
10094case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10096$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010099
Georg Brandl59e87bd2011-02-15 19:48:59 +000010100 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010101int
10102main ()
10103{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010104loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 ;
10106 return 0;
10107}
Matthias Kloseb159a552010-04-25 21:00:44 +000010108
Martin v. Löwis11437992002-04-12 09:54:03 +000010109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010110if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010111
Matthias Kloseb159a552010-04-25 21:00:44 +000010112
Matthias Kloseb9621712010-04-24 17:59:49 +000010113$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010114
Matthias Kloseb159a552010-04-25 21:00:44 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010116$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010117
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010118else
Matthias Kloseb159a552010-04-25 21:00:44 +000010119
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010122
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010124rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010125 conftest$ac_exeext conftest.$ac_ext
10126# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10127# of the AIX system used to build/package Python executable. This tag serves
10128# as a baseline for bdist module packages
10129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10130$as_echo_n "checking for the system builddate... " >&6; }
10131 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10132
10133cat >>confdefs.h <<_ACEOF
10134#define AIX_BUILDDATE $AIX_BUILDDATE
10135_ACEOF
10136
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10138$as_echo "$AIX_BUILDDATE" >&6; }
10139 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010140 *) ;;
10141esac
10142
Christian Heimes985ecdc2013-11-20 11:46:18 +010010143# check for systems that require aligned memory access
10144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10145$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010146if ${ac_cv_aligned_required+:} false; then :
10147 $as_echo_n "(cached) " >&6
10148else
10149 if test "$cross_compiling" = yes; then :
10150 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010151else
10152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10153/* end confdefs.h. */
10154
10155int main()
10156{
10157 char s[16];
10158 int i, *p1, *p2;
10159 for (i=0; i < 16; i++)
10160 s[i] = i;
10161 p1 = (int*)(s+1);
10162 p2 = (int*)(s+2);
10163 if (*p1 == *p2)
10164 return 1;
10165 return 0;
10166}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010167_ACEOF
10168if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010169 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010170else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010171 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010172fi
10173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10174 conftest.$ac_objext conftest.beam conftest.$ac_ext
10175fi
10176
10177
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010178fi
10179
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10181$as_echo "$ac_cv_aligned_required" >&6; }
10182if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010183
10184$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10185
10186fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010187
10188# str, bytes and memoryview hash algorithm
10189
10190
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10192$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10193
10194# Check whether --with-hash_algorithm was given.
10195if test "${with_hash_algorithm+set}" = set; then :
10196 withval=$with_hash_algorithm;
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10198$as_echo "$withval" >&6; }
10199case "$withval" in
10200 siphash24)
10201 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10202
10203 ;;
10204 fnv)
10205 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10206
10207 ;;
10208 *)
10209 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10210 ;;
10211esac
10212
10213else
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10215$as_echo "default" >&6; }
10216fi
10217
10218
Paul Ganssle62972d92020-05-16 04:20:06 -040010219validate_tzpath() {
10220 # Checks that each element of hte path is an absolute path
10221 if test -z "$1"; then
10222 # Empty string is allowed: it indicates no system TZPATH
10223 return 0
10224 fi
10225
10226 # Bad paths are those that don't start with /
10227 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10228 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10229 return 1;
10230 fi
10231}
10232
10233TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10235$as_echo_n "checking for --with-tzpath... " >&6; }
10236
10237# Check whether --with-tzpath was given.
10238if test "${with_tzpath+set}" = set; then :
10239 withval=$with_tzpath;
10240case "$withval" in
10241 yes)
10242 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10243 ;;
10244 *)
10245 validate_tzpath "$withval"
10246 TZPATH="$withval"
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10248$as_echo "\"$withval\"" >&6; }
10249 ;;
10250esac
10251
10252else
10253 validate_tzpath "$TZPATH"
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10255$as_echo "\"$TZPATH\"" >&6; }
10256fi
10257
10258
10259
Charles-François Natalid30b0222014-05-08 23:08:51 +010010260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10261$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10262
10263# Check whether --with-address_sanitizer was given.
10264if test "${with_address_sanitizer+set}" = set; then :
10265 withval=$with_address_sanitizer;
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10267$as_echo "$withval" >&6; }
10268BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10269LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010270# ASan works by controlling memory allocation, our own malloc interferes.
10271with_pymalloc="no"
10272
10273else
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275$as_echo "no" >&6; }
10276fi
10277
10278
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10280$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10281
10282# Check whether --with-memory_sanitizer was given.
10283if test "${with_memory_sanitizer+set}" = set; then :
10284 withval=$with_memory_sanitizer;
10285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10286$as_echo "$withval" >&6; }
10287BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10288LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10289# MSan works by controlling memory allocation, our own malloc interferes.
10290with_pymalloc="no"
10291
10292else
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
10295fi
10296
10297
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10299$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10300
10301# Check whether --with-undefined_behavior_sanitizer was given.
10302if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10303 withval=$with_undefined_behavior_sanitizer;
10304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10305$as_echo "$withval" >&6; }
10306BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10307LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010308
10309else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
Guido van Rossum70c7f481998-03-26 18:44:10 +000010315# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10317$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010318if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +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="-lnsl $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 t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010333int
10334main ()
10335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336return t_open ();
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_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +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 Rossum79dddcb1995-01-12 12:25:42 +000010349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10351$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010352if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010353 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010354fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010355 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10357$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010360else
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010362LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366/* Override any GCC internal prototype to avoid an error.
10367 Use char because int might match the return type of a GCC
10368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010369#ifdef __cplusplus
10370extern "C"
10371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010372char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010373int
10374main ()
10375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ;
10378 return 0;
10379}
10380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010383else
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386rm -f core conftest.err conftest.$ac_objext \
10387 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010388LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10391$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010392if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010393 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010394fi
10395 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010396
Matthias Kloseb9621712010-04-24 17:59:49 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10398$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010402 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10404$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010405LIBS="$withval $LIBS"
10406
10407else
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410fi
10411
Guido van Rossum7f43da71994-08-01 12:15:30 +000010412
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010413
10414
10415
10416
10417
10418
Victor Stinnerb477d192020-01-22 22:48:16 +010010419
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010420if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10421 if test -n "$ac_tool_prefix"; then
10422 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10423set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10425$as_echo_n "checking for $ac_word... " >&6; }
10426if ${ac_cv_path_PKG_CONFIG+:} false; then :
10427 $as_echo_n "(cached) " >&6
10428else
10429 case $PKG_CONFIG in
10430 [\\/]* | ?:[\\/]*)
10431 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10432 ;;
10433 *)
10434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10435for as_dir in $PATH
10436do
10437 IFS=$as_save_IFS
10438 test -z "$as_dir" && as_dir=.
10439 for ac_exec_ext in '' $ac_executable_extensions; do
10440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10441 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10443 break 2
10444 fi
10445done
10446 done
10447IFS=$as_save_IFS
10448
10449 ;;
10450esac
10451fi
10452PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10453if test -n "$PKG_CONFIG"; then
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10455$as_echo "$PKG_CONFIG" >&6; }
10456else
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10458$as_echo "no" >&6; }
10459fi
10460
10461
10462fi
10463if test -z "$ac_cv_path_PKG_CONFIG"; then
10464 ac_pt_PKG_CONFIG=$PKG_CONFIG
10465 # Extract the first word of "pkg-config", so it can be a program name with args.
10466set dummy pkg-config; ac_word=$2
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10468$as_echo_n "checking for $ac_word... " >&6; }
10469if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10470 $as_echo_n "(cached) " >&6
10471else
10472 case $ac_pt_PKG_CONFIG in
10473 [\\/]* | ?:[\\/]*)
10474 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10475 ;;
10476 *)
10477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10478for as_dir in $PATH
10479do
10480 IFS=$as_save_IFS
10481 test -z "$as_dir" && as_dir=.
10482 for ac_exec_ext in '' $ac_executable_extensions; do
10483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10484 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10486 break 2
10487 fi
10488done
10489 done
10490IFS=$as_save_IFS
10491
10492 ;;
10493esac
10494fi
10495ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10496if test -n "$ac_pt_PKG_CONFIG"; then
10497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10498$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10499else
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10501$as_echo "no" >&6; }
10502fi
10503
10504 if test "x$ac_pt_PKG_CONFIG" = x; then
10505 PKG_CONFIG=""
10506 else
10507 case $cross_compiling:$ac_tool_warned in
10508yes:)
10509{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10510$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10511ac_tool_warned=yes ;;
10512esac
10513 PKG_CONFIG=$ac_pt_PKG_CONFIG
10514 fi
10515else
10516 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10517fi
10518
10519fi
10520if test -n "$PKG_CONFIG"; then
10521 _pkg_min_version=0.9.0
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10523$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10524 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10526$as_echo "yes" >&6; }
10527 else
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530 PKG_CONFIG=""
10531 fi
10532fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010533
10534# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10536$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010537
10538# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010540 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010541else
10542 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010543fi
10544
10545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10547$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010548
10549# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10551$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010552
10553# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010554if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010555 withval=$with_system_ffi;
10556fi
10557
10558
Zachary Waref40d4dd2016-09-17 01:25:24 -050010559if test "$ac_sys_system" = "Darwin"
10560then
10561 case "$with_system_ffi" in
10562 "")
10563 with_system_ffi="no"
10564 ;;
10565 yes|no)
10566 ;;
10567 *)
10568 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10569 ;;
10570 esac
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10572$as_echo "$with_system_ffi" >&6; }
10573else
10574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10575$as_echo "yes" >&6; }
10576 if test "$with_system_ffi" != ""
10577 then
10578 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10579$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10580 fi
10581 with_system_ffi="yes"
10582fi
Zachary Ware935043d2016-09-09 17:01:21 -070010583
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010584if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010585 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10586else
10587 LIBFFI_INCLUDEDIR=""
10588fi
10589
10590
Stefan Krah60187b52012-03-23 19:06:27 +010010591# Check for use of the system libmpdec library
10592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10593$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10594
10595# Check whether --with-system_libmpdec was given.
10596if test "${with_system_libmpdec+set}" = set; then :
10597 withval=$with_system_libmpdec;
10598else
10599 with_system_libmpdec="no"
10600fi
10601
10602
10603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10604$as_echo "$with_system_libmpdec" >&6; }
10605
Stefan Krah815280e2020-02-29 19:43:42 +010010606# Check whether _decimal should use a coroutine-local or thread-local context
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10608$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10609
10610# Check whether --with-decimal_contextvar was given.
10611if test "${with_decimal_contextvar+set}" = set; then :
10612 withval=$with_decimal_contextvar;
10613else
10614 with_decimal_contextvar="yes"
10615fi
10616
10617
10618if test "$with_decimal_contextvar" != "no"
10619then
10620
10621$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10622
10623fi
10624
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10626$as_echo "$with_decimal_contextvar" >&6; }
10627
Benjamin Peterson076ed002010-10-31 17:11:02 +000010628# Check for support for loadable sqlite extensions
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10630$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10631# Check whether --enable-loadable-sqlite-extensions was given.
10632if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10633 enableval=$enable_loadable_sqlite_extensions;
10634else
10635 enable_loadable_sqlite_extensions="no"
10636fi
10637
10638
10639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10640$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10641
Ned Deilyd819b932013-09-06 01:07:05 -070010642# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10643
10644
10645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10646$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10647
10648# Check whether --with-tcltk-includes was given.
10649if test "${with_tcltk_includes+set}" = set; then :
10650 withval=$with_tcltk_includes;
10651else
10652 with_tcltk_includes="default"
10653fi
10654
10655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10656$as_echo "$with_tcltk_includes" >&6; }
10657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10658$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10659
10660# Check whether --with-tcltk-libs was given.
10661if test "${with_tcltk_libs+set}" = set; then :
10662 withval=$with_tcltk_libs;
10663else
10664 with_tcltk_libs="default"
10665fi
10666
10667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10668$as_echo "$with_tcltk_libs" >&6; }
10669if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10670then
10671 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10672 then
10673 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10674 fi
10675 TCLTK_INCLUDES=""
10676 TCLTK_LIBS=""
10677else
10678 TCLTK_INCLUDES="$with_tcltk_includes"
10679 TCLTK_LIBS="$with_tcltk_libs"
10680fi
10681
Matthias Klose55708cc2009-04-30 08:06:49 +000010682# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10684$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010685
10686# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010688 withval=$with_dbmliborder;
10689if test x$with_dbmliborder = xyes
10690then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010691as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010692else
10693 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10694 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10695 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010696 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010697 fi
10698 done
10699fi
10700fi
10701
Matthias Kloseb9621712010-04-24 17:59:49 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10703$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010704
Martin v. Löwis11437992002-04-12 09:54:03 +000010705# Templates for things AC_DEFINEd more than once.
10706# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010707
10708
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010709if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010710then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010711 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010713
10714 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010715 if test "$ac_sys_system" = "SunOS"; then
10716 CFLAGS="$CFLAGS -D_REENTRANT"
10717 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010718elif test "$ac_cv_kpthread" = "yes"
10719then
10720 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010721 if test "$ac_cv_cxx_thread" = "yes"; then
10722 CXX="$CXX -Kpthread"
10723 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010724 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010725elif test "$ac_cv_kthread" = "yes"
10726then
10727 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010728 if test "$ac_cv_cxx_thread" = "yes"; then
10729 CXX="$CXX -Kthread"
10730 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010731 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010732elif test "$ac_cv_pthread" = "yes"
10733then
10734 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010735 if test "$ac_cv_cxx_thread" = "yes"; then
10736 CXX="$CXX -pthread"
10737 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010738 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010739else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010740 if test ! -z "$withval" -a -d "$withval"
10741 then LDFLAGS="$LDFLAGS -L$withval"
10742 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010743
10744 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010745 # define _POSIX_THREADS in unistd.h. Some apparently don't
10746 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10748$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010751
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010752#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010753#ifdef _POSIX_THREADS
10754yes
10755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
10757_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010760 unistd_defines_pthreads=yes
10761else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010762 unistd_defines_pthreads=no
10763fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010764rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010765
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10767$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010770
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010771 # Just looking for pthread_create in libpthread is not enough:
10772 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10773 # So we really have to include pthread.h, and then link.
10774 _libs=$LIBS
10775 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10777$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010780
10781#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010782#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010783
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010784void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010785int
10786main ()
10787{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010788
10789pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 ;
10791 return 0;
10792}
10793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10797$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010798 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010799
Guido van Rossum02a1c402000-02-25 19:26:31 +000010800else
Martin v. Löwis11437992002-04-12 09:54:03 +000010801
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010802 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010804if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010805
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010806 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010807
Guido van Rossumad678af1998-10-02 14:42:15 +000010808else
Guido van Rossumad678af1998-10-02 14:42:15 +000010809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10811$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010812if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814else
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010816LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820/* Override any GCC internal prototype to avoid an error.
10821 Use char because int might match the return type of a GCC
10822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010823#ifdef __cplusplus
10824extern "C"
10825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010826char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 ;
10832 return 0;
10833}
10834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010840rm -f core conftest.err conftest.$ac_objext \
10841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010842LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10845$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010846if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010847
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010848 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010849 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010850
Greg Steinadf63d62000-07-05 10:38:09 +000010851else
Greg Steinadf63d62000-07-05 10:38:09 +000010852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10854$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010855if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010857else
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010859LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863/* Override any GCC internal prototype to avoid an error.
10864 Use char because int might match the return type of a GCC
10865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010866#ifdef __cplusplus
10867extern "C"
10868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010869char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010870int
10871main ()
10872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 ;
10875 return 0;
10876}
10877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010883rm -f core conftest.err conftest.$ac_objext \
10884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10888$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010889if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010890
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010891 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010892 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010893
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010894else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10897$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010898if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010900else
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010902LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906/* Override any GCC internal prototype to avoid an error.
10907 Use char because int might match the return type of a GCC
10908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010909#ifdef __cplusplus
10910extern "C"
10911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010912char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010913int
10914main ()
10915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010926rm -f core conftest.err conftest.$ac_objext \
10927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010928LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10931$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010932if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010934 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010935 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010936
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010937else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10940$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010941if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010943else
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010945LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949/* Override any GCC internal prototype to avoid an error.
10950 Use char because int might match the return type of a GCC
10951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010952#ifdef __cplusplus
10953extern "C"
10954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010955char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010956int
10957main ()
10958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010959return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ;
10961 return 0;
10962}
10963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010969rm -f core conftest.err conftest.$ac_objext \
10970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010971LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10974$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010975if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010977 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010978 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010979
Guido van Rossumb93a8621998-05-07 13:27:32 +000010980else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010981
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010982 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10983
Guido van Rossum2d38f911996-06-26 19:47:01 +000010984fi
10985
Guido van Rossum627b2d71993-12-24 10:39:16 +000010986
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010987fi
10988
Guido van Rossum0be3e491997-05-22 20:33:33 +000010989fi
10990
Guido van Rossum49545951997-12-02 19:28:29 +000010991fi
10992
Guido van Rossumb93a8621998-05-07 13:27:32 +000010993fi
10994
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010996rm -f core conftest.err conftest.$ac_objext \
10997 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
11000$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011001if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011003else
Martin v. Löwis11437992002-04-12 09:54:03 +000011004 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011005LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009/* Override any GCC internal prototype to avoid an error.
11010 Use char because int might match the return type of a GCC
11011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011012#ifdef __cplusplus
11013extern "C"
11014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011015char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011016int
11017main ()
11018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 ;
11021 return 0;
11022}
11023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029rm -f core conftest.err conftest.$ac_objext \
11030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011031LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
11034$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011035if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000011036
Martin v. Löwis130fb172001-07-19 11:00:41 +000011037 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020011038
Guido van Rossum627b2d71993-12-24 10:39:16 +000011039fi
11040
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011041
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011042fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011043
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011044if test "$posix_threads" = "yes"; then
11045 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011048
11049 fi
11050
11051 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11052 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020011053 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000011054$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011055
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011056 ;;
11057 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011058$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059
11060 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011061 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011063
11064 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011065 esac
11066
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11068$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011069 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011071else
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011073 ac_cv_pthread_system_supported=no
11074else
Matthias Kloseb9621712010-04-24 17:59:49 +000011075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011076/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011077
11078 #include <stdio.h>
11079 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011080 void *foo(void *parm) {
11081 return NULL;
11082 }
11083 main() {
11084 pthread_attr_t attr;
11085 pthread_t id;
11086 if (pthread_attr_init(&attr)) exit(-1);
11087 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11088 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11089 exit(0);
11090 }
11091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011092if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011093 ac_cv_pthread_system_supported=yes
11094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011099fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101
Guido van Rossum627b2d71993-12-24 10:39:16 +000011102fi
11103
Matthias Kloseb9621712010-04-24 17:59:49 +000011104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11105$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011106 if test "$ac_cv_pthread_system_supported" = "yes"; then
11107
Matthias Kloseb9621712010-04-24 17:59:49 +000011108$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011109
11110 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 for ac_func in pthread_sigmask
11112do :
11113 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011114if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011116#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011117_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011118 case $ac_sys_system in
11119 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011122
11123 ;;
11124 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011125fi
11126done
11127
pdoxe14679c2017-10-05 00:01:56 -070011128 for ac_func in pthread_getcpuclockid
11129do :
11130 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11131if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11132 cat >>confdefs.h <<_ACEOF
11133#define HAVE_PTHREAD_GETCPUCLOCKID 1
11134_ACEOF
11135
11136fi
11137done
11138
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011139fi
11140
11141
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11145$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011147if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152 ipv6=no
11153 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11155$as_echo "yes" >&6; }
11156 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157
11158 ipv6=yes
11159 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161else
Martin v. Löwis11437992002-04-12 09:54:03 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011164/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165 /* AF_INET6 available check */
11166#include <sys/types.h>
11167#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011168int
11169main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011170{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011171int domain = AF_INET6;
11172 ;
11173 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011174}
Martin v. Löwis11437992002-04-12 09:54:03 +000011175_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011176if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11179$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011180 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011182else
Matthias Kloseb159a552010-04-25 21:00:44 +000011183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011187
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011188fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011191if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11193$as_echo_n "checking if RFC2553 API is available... " >&6; }
11194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011196
11197 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011198#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011199int
11200main ()
11201{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011202struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011203 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 ;
11205 return 0;
11206}
Matthias Kloseb159a552010-04-25 21:00:44 +000011207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011210
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011212$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011213 ipv6=yes
11214
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011215else
Matthias Kloseb159a552010-04-25 21:00:44 +000011216
11217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011219 ipv6=no
11220
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011223fi
11224
11225if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011227
11228fi
11229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230fi
11231
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011232
11233ipv6type=unknown
11234ipv6lib=none
11235ipv6trylibc=no
11236
11237if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11239$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011240 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11241 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011242 case $i in
11243 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011246
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011247#include <netinet/in.h>
11248#ifdef IPV6_INRIA_VERSION
11249yes
11250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011251_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011253 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011254 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011255fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011256rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011257
11258 ;;
11259 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011261/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011262
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011263#include <netinet/in.h>
11264#ifdef __KAME__
11265yes
11266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011267_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011269 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011270 ipv6type=$i;
11271 ipv6lib=inet6
11272 ipv6libdir=/usr/local/v6/lib
11273 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011274fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011275rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011276
11277 ;;
11278 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011280/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011281
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011282#include <features.h>
11283#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11284yes
11285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011286_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011289 ipv6type=$i;
11290 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011291fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011292rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011293
11294 ;;
11295 linux-inet6)
11296 if test -d /usr/inet6; then
11297 ipv6type=$i
11298 ipv6lib=inet6
11299 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011300 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011301 fi
11302 ;;
11303 solaris)
11304 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011305 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306 ipv6type=$i
11307 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011308 fi
11309 fi
11310 ;;
11311 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011314
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315#include <sys/param.h>
11316#ifdef _TOSHIBA_INET6
11317yes
11318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011319_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011322 ipv6type=$i;
11323 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011324 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011325fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011326rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011327
11328 ;;
11329 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011331/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011332
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011333#include </usr/local/v6/include/sys/v6config.h>
11334#ifdef __V6D__
11335yes
11336#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011337_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011340 ipv6type=$i;
11341 ipv6lib=v6;
11342 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011343 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011344fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011345rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011346
11347 ;;
11348 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011351
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011352#include <sys/param.h>
11353#ifdef _ZETA_MINAMI_INET6
11354yes
11355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011356_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011359 ipv6type=$i;
11360 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011361 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011363rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011364
11365 ;;
11366 esac
11367 if test "$ipv6type" != "unknown"; then
11368 break
11369 fi
11370 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11372$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011373fi
11374
11375if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11376 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11377 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11378 echo "using lib$ipv6lib"
11379 else
11380 if test $ipv6trylibc = "yes"; then
11381 echo "using libc"
11382 else
11383 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11384 echo "You need to fetch lib$ipv6lib.a from appropriate"
11385 echo 'ipv6 kit and compile beforehand.'
11386 exit 1
11387 fi
11388 fi
11389fi
11390
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11392$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11394/* end confdefs.h. */
11395 /* CAN_RAW_FD_FRAMES available check */
11396#include <linux/can/raw.h>
11397int
11398main ()
11399{
11400int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405if ac_fn_c_try_compile "$LINENO"; then :
11406
11407
11408$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11409
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11411$as_echo "yes" >&6; }
11412
11413else
11414
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11416$as_echo "no" >&6; }
11417
11418fi
11419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11420
Zackery Spytz97e0de02020-04-09 06:03:49 -060011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11422$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11424/* end confdefs.h. */
11425
11426#include <linux/can/raw.h>
11427int
11428main ()
11429{
11430int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11431 ;
11432 return 0;
11433}
11434_ACEOF
11435if ac_fn_c_try_compile "$LINENO"; then :
11436
11437
11438$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11439
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11441$as_echo "yes" >&6; }
11442
11443else
11444
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447
11448fi
11449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11450
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011451# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11453$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457 withval=$with_doc_strings;
11458fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011459
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011460
11461if test -z "$with_doc_strings"
11462then with_doc_strings="yes"
11463fi
11464if test "$with_doc_strings" != "no"
11465then
11466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011468
11469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11471$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011472
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011473# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11475$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479 withval=$with_pymalloc;
11480fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011481
Neil Schemenauera35c6882001-02-27 04:45:05 +000011482
Neil Schemenauer16c22972002-03-22 15:34:49 +000011483if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011484then
11485 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011486fi
11487if test "$with_pymalloc" != "no"
11488then
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011491
11492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11494$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011495
Nick Coghlan6ea41862017-06-11 13:16:15 +100011496# Check for --with-c-locale-coercion
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11498$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11499
11500# Check whether --with-c-locale-coercion was given.
11501if test "${with_c_locale_coercion+set}" = set; then :
11502 withval=$with_c_locale_coercion;
11503fi
11504
11505
11506if test -z "$with_c_locale_coercion"
11507then
11508 with_c_locale_coercion="yes"
11509fi
11510if test "$with_c_locale_coercion" != "no"
11511then
11512
11513$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11514
11515fi
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11517$as_echo "$with_c_locale_coercion" >&6; }
11518
Benjamin Peterson05159c42009-12-03 03:01:27 +000011519# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11521$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011522
11523# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011524if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011525 withval=$with_valgrind;
11526else
11527 with_valgrind=no
11528fi
11529
Matthias Kloseb9621712010-04-24 17:59:49 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11531$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011532if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011533 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 +020011534if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011537
11538else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011539 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011540
11541fi
11542
11543
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011544 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011545fi
11546
Łukasz Langaa785c872016-09-09 17:37:37 -070011547# Check for DTrace support
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11549$as_echo_n "checking for --with-dtrace... " >&6; }
11550
11551# Check whether --with-dtrace was given.
11552if test "${with_dtrace+set}" = set; then :
11553 withval=$with_dtrace;
11554else
11555 with_dtrace=no
11556fi
11557
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11559$as_echo "$with_dtrace" >&6; }
11560
11561
11562
11563
11564
11565DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011566DTRACE_HEADERS=
11567DTRACE_OBJS=
11568
11569if test "$with_dtrace" = "yes"
11570then
11571 # Extract the first word of "dtrace", so it can be a program name with args.
11572set dummy dtrace; ac_word=$2
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11574$as_echo_n "checking for $ac_word... " >&6; }
11575if ${ac_cv_path_DTRACE+:} false; then :
11576 $as_echo_n "(cached) " >&6
11577else
11578 case $DTRACE in
11579 [\\/]* | ?:[\\/]*)
11580 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11581 ;;
11582 *)
11583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11584for as_dir in $PATH
11585do
11586 IFS=$as_save_IFS
11587 test -z "$as_dir" && as_dir=.
11588 for ac_exec_ext in '' $ac_executable_extensions; do
11589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11590 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11592 break 2
11593 fi
11594done
11595 done
11596IFS=$as_save_IFS
11597
11598 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11599 ;;
11600esac
11601fi
11602DTRACE=$ac_cv_path_DTRACE
11603if test -n "$DTRACE"; then
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11605$as_echo "$DTRACE" >&6; }
11606else
11607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608$as_echo "no" >&6; }
11609fi
11610
11611
11612 if test "$DTRACE" = "not found"; then
11613 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11614 fi
11615
11616$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11617
11618 DTRACE_HEADERS="Include/pydtrace_probes.h"
11619
11620 # On OS X, DTrace providers do not need to be explicitly compiled and
11621 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11622 # generation flag '-G'. We check for presence of this flag, rather than
11623 # hardcoding support by OS, in the interest of robustness.
11624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11625$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11626if ${ac_cv_dtrace_link+:} false; then :
11627 $as_echo_n "(cached) " >&6
11628else
11629 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011630 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011631 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011632 ac_cv_dtrace_link=yes
11633
11634fi
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11636$as_echo "$ac_cv_dtrace_link" >&6; }
11637 if test "$ac_cv_dtrace_link" = "yes"; then
11638 DTRACE_OBJS="Python/pydtrace.o"
11639 fi
11640fi
11641
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011642# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011643
Guido van Rossum98935bf2001-09-05 19:13:16 +000011644DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011645
Guido van Rossume97ee181999-12-20 21:27:22 +000011646# the dlopen() function means we might want to use dynload_shlib.o. some
Kevin Adlerc79667f2020-11-16 09:16:10 -060011647# platforms have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011648for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011649do :
11650 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011651if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011654_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011655
Guido van Rossume97ee181999-12-20 21:27:22 +000011656fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011657done
Guido van Rossume97ee181999-12-20 21:27:22 +000011658
Michael W. Hudson54241132001-12-07 15:38:26 +000011659
Guido van Rossume97ee181999-12-20 21:27:22 +000011660# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11661# loading of modules.
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11664$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011665if test -z "$DYNLOADFILE"
11666then
11667 case $ac_sys_system/$ac_sys_release in
Guido van Rossume97ee181999-12-20 21:27:22 +000011668 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011669 *)
11670 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11671 # out any dynamic loading
11672 if test "$ac_cv_func_dlopen" = yes
11673 then DYNLOADFILE="dynload_shlib.o"
11674 else DYNLOADFILE="dynload_stub.o"
11675 fi
11676 ;;
11677 esac
11678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11680$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011681if test "$DYNLOADFILE" != "dynload_stub.o"
11682then
Martin v. Löwis11437992002-04-12 09:54:03 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011685
11686fi
11687
Neil Schemenauer4e425612001-06-19 15:44:15 +000011688# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11689
Michael W. Hudson54241132001-12-07 15:38:26 +000011690
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11692$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011693if test -z "$MACHDEP_OBJS"
11694then
Jack Jansene578a632001-08-15 01:27:14 +000011695 MACHDEP_OBJS=$extra_machdep_objs
11696else
11697 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011698fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011699if test -z "$MACHDEP_OBJS"; then
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11701$as_echo "none" >&6; }
11702else
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11704$as_echo "$MACHDEP_OBJS" >&6; }
11705fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011706
Guido van Rossum627b2d71993-12-24 10:39:16 +000011707# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011708for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Kyle Evans1800c602020-10-11 15:18:53 -050011709 clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \
11710 explicit_memset faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011711 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011712 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011713 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011714 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011715 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011716 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011717 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011718 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011719 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011720 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011721 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011722 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011723 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011724 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011725 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011726 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11727 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011728 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011729 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011730 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Alexey Izbyshev976da902020-10-24 03:47:01 +030011731 truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011732 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011733do :
11734 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11735ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011736if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011738#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011741fi
11742done
11743
Michael W. Hudson54241132001-12-07 15:38:26 +000011744
Benjamin Peterson40caa052018-09-12 15:52:40 -070011745# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11746# links. Some libc implementations have a stub lchmod implementation that always
11747# returns an error.
11748if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011749 for ac_func in lchmod
11750do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011751 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11752if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011753 cat >>confdefs.h <<_ACEOF
11754#define HAVE_LCHMOD 1
11755_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011756
11757fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011758done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011759
11760fi
11761
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011762ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11763 #include <dirent.h>
11764"
11765if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11766
11767$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11768
11769fi
11770
11771
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011772# For some functions, having a definition is not sufficient, since
11773# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11775$as_echo_n "checking for chroot... " >&6; }
11776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011777/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011778#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011779int
11780main ()
11781{
11782void *x=chroot
11783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011790
Matthias Kloseb159a552010-04-25 21:00:44 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11795$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011796
11797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11800$as_echo_n "checking for link... " >&6; }
11801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011803#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011804int
11805main ()
11806{
11807void *x=link
11808 ;
11809 return 0;
11810}
11811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011815
Matthias Kloseb159a552010-04-25 21:00:44 +000011816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011817$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011818else
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11820$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011821
11822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11825$as_echo_n "checking for symlink... " >&6; }
11826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011827/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011828#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011829int
11830main ()
11831{
11832void *x=symlink
11833 ;
11834 return 0;
11835}
11836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011840
Matthias Kloseb159a552010-04-25 21:00:44 +000011841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011842$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011843else
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11845$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011846
11847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11850$as_echo_n "checking for fchdir... " >&6; }
11851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011852/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011853#include <unistd.h>
11854int
11855main ()
11856{
11857void *x=fchdir
11858 ;
11859 return 0;
11860}
11861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011865
Matthias Kloseb159a552010-04-25 21:00:44 +000011866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011867$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011868else
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11870$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011871
11872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11875$as_echo_n "checking for fsync... " >&6; }
11876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011877/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011878#include <unistd.h>
11879int
11880main ()
11881{
11882void *x=fsync
11883 ;
11884 return 0;
11885}
11886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011890
Matthias Kloseb159a552010-04-25 21:00:44 +000011891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011892$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011896
11897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11900$as_echo_n "checking for fdatasync... " >&6; }
11901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011902/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011903#include <unistd.h>
11904int
11905main ()
11906{
11907void *x=fdatasync
11908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011915
Matthias Kloseb159a552010-04-25 21:00:44 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011921
11922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11925$as_echo_n "checking for epoll... " >&6; }
11926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011927/* end confdefs.h. */
11928#include <sys/epoll.h>
11929int
11930main ()
11931{
11932void *x=epoll_create
11933 ;
11934 return 0;
11935}
11936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011937if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011940
Matthias Kloseb159a552010-04-25 21:00:44 +000011941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11945$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011946
11947fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11950$as_echo_n "checking for epoll_create1... " >&6; }
11951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952/* end confdefs.h. */
11953#include <sys/epoll.h>
11954int
11955main ()
11956{
11957void *x=epoll_create1
11958 ;
11959 return 0;
11960}
11961_ACEOF
11962if ac_fn_c_try_compile "$LINENO"; then :
11963
11964$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11965
11966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11967$as_echo "yes" >&6; }
11968else
11969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11970$as_echo "no" >&6; }
11971
11972fi
11973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11975$as_echo_n "checking for kqueue... " >&6; }
11976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011977/* end confdefs.h. */
11978
11979#include <sys/types.h>
11980#include <sys/event.h>
11981
11982int
11983main ()
11984{
11985int x=kqueue()
11986 ;
11987 return 0;
11988}
11989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011990if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011991
Matthias Kloseb9621712010-04-24 17:59:49 +000011992$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011993
Matthias Kloseb159a552010-04-25 21:00:44 +000011994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011996else
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11998$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011999
12000fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000012001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
12003$as_echo_n "checking for prlimit... " >&6; }
12004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12005/* end confdefs.h. */
12006
12007#include <sys/time.h>
12008#include <sys/resource.h>
12009
12010int
12011main ()
12012{
12013void *x=prlimit
12014 ;
12015 return 0;
12016}
12017_ACEOF
12018if ac_fn_c_try_compile "$LINENO"; then :
12019
12020$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
12021
12022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12023$as_echo "yes" >&6; }
12024else
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
12027
12028fi
12029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren41761932020-11-08 10:05:27 +010012030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
12031$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
12032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12033/* end confdefs.h. */
12034#include <mach-o/dyld.h>
12035int
12036main ()
12037{
12038void *x=_dyld_shared_cache_contains_path
12039 ;
12040 return 0;
12041}
12042_ACEOF
12043if ac_fn_c_try_compile "$LINENO"; then :
12044
12045$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
12046
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12048$as_echo "yes" >&6; }
12049else
12050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12051$as_echo "no" >&6; }
12052
12053fi
12054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020012055
Zackery Spytz43fdbd22019-05-29 13:57:07 -060012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
12057$as_echo_n "checking for memfd_create... " >&6; }
12058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12059/* end confdefs.h. */
12060
12061#ifdef HAVE_SYS_MMAN_H
12062#include <sys/mman.h>
12063#endif
12064#ifdef HAVE_SYS_MEMFD_H
12065#include <sys/memfd.h>
12066#endif
12067
12068int
12069main ()
12070{
12071void *x=memfd_create
12072 ;
12073 return 0;
12074}
12075_ACEOF
12076if ac_fn_c_try_compile "$LINENO"; then :
12077
12078$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12079
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12081$as_echo "yes" >&6; }
12082else
12083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12084$as_echo "no" >&6; }
12085
12086fi
12087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12088
Christian Heimescd9fed62020-11-13 19:48:52 +010012089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5
12090$as_echo_n "checking for eventfd... " >&6; }
12091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12092/* end confdefs.h. */
12093
12094#ifdef HAVE_SYS_EVENTFD_H
12095#include <sys/eventfd.h>
12096#endif
12097
12098int
12099main ()
12100{
12101int x = eventfd(0, EFD_CLOEXEC)
12102 ;
12103 return 0;
12104}
12105_ACEOF
12106if ac_fn_c_try_compile "$LINENO"; then :
12107
12108$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h
12109
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12111$as_echo "yes" >&6; }
12112else
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12114$as_echo "no" >&6; }
12115
12116fi
12117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12118
Martin v. Löwisd5843682002-11-21 20:41:28 +000012119# On some systems (eg. FreeBSD 5), we would find a definition of the
12120# functions ctermid_r, setgroups in the library, but no prototype
12121# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12122# address to avoid compiler warnings and potential miscompilations
12123# because of the missing prototypes.
12124
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12126$as_echo_n "checking for ctermid_r... " >&6; }
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012128/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012129
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130#include <stdio.h>
12131
Martin v. Löwisd5843682002-11-21 20:41:28 +000012132int
12133main ()
12134{
12135void* p = ctermid_r
12136 ;
12137 return 0;
12138}
12139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012140if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012143
Matthias Kloseb159a552010-04-25 21:00:44 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012145$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12148$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012149
12150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12152
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12154$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012156 $as_echo_n "(cached) " >&6
12157else
12158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012159/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012160#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012161int
12162main ()
12163{
12164void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012165
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012171 ac_cv_flock_decl=yes
12172else
12173 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012174
12175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012177
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012178fi
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12180$as_echo "$ac_cv_flock_decl" >&6; }
12181if test "x${ac_cv_flock_decl}" = xyes; then
12182 for ac_func in flock
12183do :
12184 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012186 cat >>confdefs.h <<_ACEOF
12187#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012188_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012189
Antoine Pitroua3000072010-09-07 14:52:42 +000012190else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012192$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012194 $as_echo_n "(cached) " >&6
12195else
12196 ac_check_lib_save_LIBS=$LIBS
12197LIBS="-lbsd $LIBS"
12198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12199/* end confdefs.h. */
12200
12201/* Override any GCC internal prototype to avoid an error.
12202 Use char because int might match the return type of a GCC
12203 builtin and then its argument prototype would still apply. */
12204#ifdef __cplusplus
12205extern "C"
12206#endif
12207char flock ();
12208int
12209main ()
12210{
12211return flock ();
12212 ;
12213 return 0;
12214}
12215_ACEOF
12216if ac_fn_c_try_link "$LINENO"; then :
12217 ac_cv_lib_bsd_flock=yes
12218else
12219 ac_cv_lib_bsd_flock=no
12220fi
12221rm -f core conftest.err conftest.$ac_objext \
12222 conftest$ac_exeext conftest.$ac_ext
12223LIBS=$ac_check_lib_save_LIBS
12224fi
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12226$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012228 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012229
12230
12231$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12232
12233
12234fi
12235
12236
12237fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012238done
12239
Antoine Pitroua3000072010-09-07 14:52:42 +000012240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12243$as_echo_n "checking for getpagesize... " >&6; }
12244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012245/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012246
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012247#include <unistd.h>
12248
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012249int
12250main ()
12251{
12252void* p = getpagesize
12253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012258
Matthias Kloseb9621712010-04-24 17:59:49 +000012259$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012260
Matthias Kloseb159a552010-04-25 21:00:44 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012262$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12265$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012266
12267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012269
Victor Stinner984890f2011-11-24 13:53:38 +010012270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12271$as_echo_n "checking for broken unsetenv... " >&6; }
12272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12273/* end confdefs.h. */
12274
12275#include <stdlib.h>
12276
12277int
12278main ()
12279{
12280int res = unsetenv("DUMMY")
12281 ;
12282 return 0;
12283}
12284_ACEOF
12285if ac_fn_c_try_compile "$LINENO"; then :
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12287$as_echo "no" >&6; }
12288else
12289
12290$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12291
12292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12293$as_echo "yes" >&6; }
12294
12295fi
12296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12297
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012298for ac_prog in true
12299do
12300 # Extract the first word of "$ac_prog", so it can be a program name with args.
12301set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12303$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012304if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012306else
12307 if test -n "$TRUE"; then
12308 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12309else
12310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12311for as_dir in $PATH
12312do
12313 IFS=$as_save_IFS
12314 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012317 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 $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 +000012319 break 2
12320 fi
12321done
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012324
12325fi
12326fi
12327TRUE=$ac_cv_prog_TRUE
12328if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12330$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12333$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012334fi
12335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012337 test -n "$TRUE" && break
12338done
12339test -n "$TRUE" || TRUE="/bin/true"
12340
12341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12343$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012344if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012346else
12347 ac_check_lib_save_LIBS=$LIBS
12348LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012350/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352/* Override any GCC internal prototype to avoid an error.
12353 Use char because int might match the return type of a GCC
12354 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012355#ifdef __cplusplus
12356extern "C"
12357#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012358char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012359int
12360main ()
12361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012363 ;
12364 return 0;
12365}
12366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012368 ac_cv_lib_c_inet_aton=yes
12369else
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012372rm -f core conftest.err conftest.$ac_objext \
12373 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012374LIBS=$ac_check_lib_save_LIBS
12375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12377$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012378if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012379 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12382$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012383if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012385else
12386 ac_check_lib_save_LIBS=$LIBS
12387LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012389/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391/* Override any GCC internal prototype to avoid an error.
12392 Use char because int might match the return type of a GCC
12393 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012394#ifdef __cplusplus
12395extern "C"
12396#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012397char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012398int
12399main ()
12400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012407 ac_cv_lib_resolv_inet_aton=yes
12408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012411rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012413LIBS=$ac_check_lib_save_LIBS
12414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12416$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012418 cat >>confdefs.h <<_ACEOF
12419#define HAVE_LIBRESOLV 1
12420_ACEOF
12421
12422 LIBS="-lresolv $LIBS"
12423
12424fi
12425
12426
12427fi
12428
12429
Christian Heimesd0764e22007-12-04 15:00:33 +000012430# On Tru64, chflags seems to be present, but calling it will
12431# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12433$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012434if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012436else
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012438 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012439else
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012441/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012442
Christian Heimesd0764e22007-12-04 15:00:33 +000012443#include <sys/stat.h>
12444#include <unistd.h>
12445int main(int argc, char*argv[])
12446{
12447 if(chflags(argv[0], 0) != 0)
12448 return 1;
12449 return 0;
12450}
Ned Deily3eb67d52011-06-28 00:00:28 -070012451
Christian Heimesd0764e22007-12-04 15:00:33 +000012452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012454 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012455else
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012460fi
12461
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012462
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12465$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012466if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012468if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012469 ac_cv_have_chflags="yes"
12470else
12471 ac_cv_have_chflags="no"
12472fi
12473
12474fi
12475if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012478
12479fi
12480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12482$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012483if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012485else
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012487 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012490/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012491
Christian Heimesd0764e22007-12-04 15:00:33 +000012492#include <sys/stat.h>
12493#include <unistd.h>
12494int main(int argc, char*argv[])
12495{
12496 if(lchflags(argv[0], 0) != 0)
12497 return 1;
12498 return 0;
12499}
Ned Deily3eb67d52011-06-28 00:00:28 -070012500
Christian Heimesd0764e22007-12-04 15:00:33 +000012501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012503 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012504else
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012509fi
12510
12511
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12514$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012515if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012517if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012518 ac_cv_have_lchflags="yes"
12519else
12520 ac_cv_have_lchflags="no"
12521fi
12522
12523fi
12524if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012527
12528fi
12529
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012530case $ac_sys_system/$ac_sys_release in
12531Darwin/*)
12532 _CUR_CFLAGS="${CFLAGS}"
12533 _CUR_LDFLAGS="${LDFLAGS}"
12534 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12535 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12536 ;;
12537esac
12538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12540$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012541if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012543else
12544 ac_check_lib_save_LIBS=$LIBS
12545LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012547/* end confdefs.h. */
12548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549/* Override any GCC internal prototype to avoid an error.
12550 Use char because int might match the return type of a GCC
12551 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012552#ifdef __cplusplus
12553extern "C"
12554#endif
12555char inflateCopy ();
12556int
12557main ()
12558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012560 ;
12561 return 0;
12562}
12563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012565 ac_cv_lib_z_inflateCopy=yes
12566else
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012569rm -f core conftest.err conftest.$ac_objext \
12570 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012571LIBS=$ac_check_lib_save_LIBS
12572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12574$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012575if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012578
12579fi
12580
12581
12582case $ac_sys_system/$ac_sys_release in
12583Darwin/*)
12584 CFLAGS="${_CUR_CFLAGS}"
12585 LDFLAGS="${_CUR_LDFLAGS}"
12586 ;;
12587esac
12588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12590$as_echo_n "checking for hstrerror... " >&6; }
12591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012592/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012593
Martin v. Löwise9416172003-05-03 10:12:45 +000012594#include <netdb.h>
12595
Martin v. Löwise9416172003-05-03 10:12:45 +000012596int
12597main ()
12598{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012599void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012600 ;
12601 return 0;
12602}
12603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012604if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012607
Matthias Kloseb159a552010-04-25 21:00:44 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012609$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012610else
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012613
12614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012615rm -f core conftest.err conftest.$ac_objext \
12616 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12619$as_echo_n "checking for inet_aton... " >&6; }
12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012622
Martin v. Löwis86d66262006-02-17 08:40:11 +000012623#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012624#include <sys/socket.h>
12625#include <netinet/in.h>
12626#include <arpa/inet.h>
12627
Martin v. Löwise9416172003-05-03 10:12:45 +000012628int
12629main ()
12630{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012631void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012632 ;
12633 return 0;
12634}
12635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012639
Matthias Kloseb159a552010-04-25 21:00:44 +000012640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012642else
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12644$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012645
12646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012647rm -f core conftest.err conftest.$ac_objext \
12648 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12651$as_echo_n "checking for inet_pton... " >&6; }
12652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012654
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012655#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012656#include <sys/socket.h>
12657#include <netinet/in.h>
12658#include <arpa/inet.h>
12659
Martin v. Löwise9416172003-05-03 10:12:45 +000012660int
12661main ()
12662{
12663void* p = inet_pton
12664 ;
12665 return 0;
12666}
12667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012671
Matthias Kloseb159a552010-04-25 21:00:44 +000012672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012673$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12676$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012677
12678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012680
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012681# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12683$as_echo_n "checking for setgroups... " >&6; }
12684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012686
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012687#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012688#ifdef HAVE_GRP_H
12689#include <grp.h>
12690#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012691
Martin v. Löwisd5843682002-11-21 20:41:28 +000012692int
12693main ()
12694{
12695void* p = setgroups
12696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012703
Matthias Kloseb159a552010-04-25 21:00:44 +000012704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012705$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12708$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012709
12710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012712
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012713# check for openpty and forkpty
12714
12715for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012716do :
12717 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012718if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012721_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012722
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012723else
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12725$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012726if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012728else
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012730LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734/* Override any GCC internal prototype to avoid an error.
12735 Use char because int might match the return type of a GCC
12736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012737#ifdef __cplusplus
12738extern "C"
12739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012740char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012741int
12742main ()
12743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ;
12746 return 0;
12747}
12748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012750 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012754rm -f core conftest.err conftest.$ac_objext \
12755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012756LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12759$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012760if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012762 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012763else
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12765$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012766if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012768else
12769 ac_check_lib_save_LIBS=$LIBS
12770LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012772/* end confdefs.h. */
12773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774/* Override any GCC internal prototype to avoid an error.
12775 Use char because int might match the return type of a GCC
12776 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012777#ifdef __cplusplus
12778extern "C"
12779#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012780char openpty ();
12781int
12782main ()
12783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012785 ;
12786 return 0;
12787}
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012790 ac_cv_lib_bsd_openpty=yes
12791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794rm -f core conftest.err conftest.$ac_objext \
12795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012796LIBS=$ac_check_lib_save_LIBS
12797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12799$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012800if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012802 LIBS="$LIBS -lbsd"
12803fi
12804
12805
12806fi
12807
Fred Drake8cef4cf2000-06-28 16:40:38 +000012808
12809fi
12810done
12811
12812for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012813do :
12814 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012815if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012817#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012818_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012819
Fred Drake8cef4cf2000-06-28 16:40:38 +000012820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12822$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012823if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012825else
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012827LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831/* Override any GCC internal prototype to avoid an error.
12832 Use char because int might match the return type of a GCC
12833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012834#ifdef __cplusplus
12835extern "C"
12836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012837char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012838int
12839main ()
12840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 ;
12843 return 0;
12844}
12845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012851rm -f core conftest.err conftest.$ac_objext \
12852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012853LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12856$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012857if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012859 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12862$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012863if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012865else
12866 ac_check_lib_save_LIBS=$LIBS
12867LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012869/* end confdefs.h. */
12870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871/* Override any GCC internal prototype to avoid an error.
12872 Use char because int might match the return type of a GCC
12873 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012874#ifdef __cplusplus
12875extern "C"
12876#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012877char forkpty ();
12878int
12879main ()
12880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012882 ;
12883 return 0;
12884}
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012887 ac_cv_lib_bsd_forkpty=yes
12888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891rm -f core conftest.err conftest.$ac_objext \
12892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012893LIBS=$ac_check_lib_save_LIBS
12894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12896$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012897if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012899 LIBS="$LIBS -lbsd"
12900fi
12901
12902
12903fi
12904
Fred Drake8cef4cf2000-06-28 16:40:38 +000012905
12906fi
12907done
12908
Jack Jansendd19cf82001-12-06 22:36:17 +000012909
Michael W. Hudson54241132001-12-07 15:38:26 +000012910# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012911for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012912do :
12913 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12914ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012915if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012917#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012919
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012920fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012921done
12922
Michael W. Hudson54241132001-12-07 15:38:26 +000012923
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012924ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012925if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012926 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012927
Martin v. Löwis1142de32002-03-29 16:28:31 +000012928else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012930 *" dup2.$ac_objext "* ) ;;
12931 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012933esac
12934
Martin v. Löwis1142de32002-03-29 16:28:31 +000012935fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012936
Martin v. Löwis1142de32002-03-29 16:28:31 +000012937
12938for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012939do :
12940 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012941if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012943#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012946/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012948int
12949main ()
12950{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 ;
12953 return 0;
12954}
12955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012959
Guido van Rossum627b2d71993-12-24 10:39:16 +000012960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012962
Guido van Rossum627b2d71993-12-24 10:39:16 +000012963fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012964done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012965
Jack Jansen150753c2003-03-29 22:07:47 +000012966for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012967do :
12968 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012969if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012970 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012974/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012975#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012976int
12977main ()
12978{
12979setpgrp(0,0);
12980 ;
12981 return 0;
12982}
12983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012987
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012990
12991fi
12992done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012993
Michael W. Hudson54241132001-12-07 15:38:26 +000012994
Gregory P. Smith387512c2018-12-30 15:42:32 -080012995# We search for both crypt and crypt_r as one or the other may be defined
12996# This gets us our -lcrypt in LIBS when required on the target platform.
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12998$as_echo_n "checking for library containing crypt... " >&6; }
12999if ${ac_cv_search_crypt+:} false; then :
13000 $as_echo_n "(cached) " >&6
13001else
13002 ac_func_search_save_LIBS=$LIBS
13003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13004/* end confdefs.h. */
13005
13006/* Override any GCC internal prototype to avoid an error.
13007 Use char because int might match the return type of a GCC
13008 builtin and then its argument prototype would still apply. */
13009#ifdef __cplusplus
13010extern "C"
13011#endif
13012char crypt ();
13013int
13014main ()
13015{
13016return crypt ();
13017 ;
13018 return 0;
13019}
13020_ACEOF
13021for ac_lib in '' crypt; do
13022 if test -z "$ac_lib"; then
13023 ac_res="none required"
13024 else
13025 ac_res=-l$ac_lib
13026 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13027 fi
13028 if ac_fn_c_try_link "$LINENO"; then :
13029 ac_cv_search_crypt=$ac_res
13030fi
13031rm -f core conftest.err conftest.$ac_objext \
13032 conftest$ac_exeext
13033 if ${ac_cv_search_crypt+:} false; then :
13034 break
13035fi
13036done
13037if ${ac_cv_search_crypt+:} false; then :
13038
13039else
13040 ac_cv_search_crypt=no
13041fi
13042rm conftest.$ac_ext
13043LIBS=$ac_func_search_save_LIBS
13044fi
13045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
13046$as_echo "$ac_cv_search_crypt" >&6; }
13047ac_res=$ac_cv_search_crypt
13048if test "$ac_res" != no; then :
13049 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13050
13051fi
13052
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
13054$as_echo_n "checking for library containing crypt_r... " >&6; }
13055if ${ac_cv_search_crypt_r+:} false; then :
13056 $as_echo_n "(cached) " >&6
13057else
13058 ac_func_search_save_LIBS=$LIBS
13059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13060/* end confdefs.h. */
13061
13062/* Override any GCC internal prototype to avoid an error.
13063 Use char because int might match the return type of a GCC
13064 builtin and then its argument prototype would still apply. */
13065#ifdef __cplusplus
13066extern "C"
13067#endif
13068char crypt_r ();
13069int
13070main ()
13071{
13072return crypt_r ();
13073 ;
13074 return 0;
13075}
13076_ACEOF
13077for ac_lib in '' crypt; do
13078 if test -z "$ac_lib"; then
13079 ac_res="none required"
13080 else
13081 ac_res=-l$ac_lib
13082 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13083 fi
13084 if ac_fn_c_try_link "$LINENO"; then :
13085 ac_cv_search_crypt_r=$ac_res
13086fi
13087rm -f core conftest.err conftest.$ac_objext \
13088 conftest$ac_exeext
13089 if ${ac_cv_search_crypt_r+:} false; then :
13090 break
13091fi
13092done
13093if ${ac_cv_search_crypt_r+:} false; then :
13094
13095else
13096 ac_cv_search_crypt_r=no
13097fi
13098rm conftest.$ac_ext
13099LIBS=$ac_func_search_save_LIBS
13100fi
13101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13102$as_echo "$ac_cv_search_crypt_r" >&6; }
13103ac_res=$ac_cv_search_crypt_r
13104if test "$ac_res" != no; then :
13105 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13106
13107fi
13108
13109
13110ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13111if test "x$ac_cv_func_crypt_r" = xyes; then :
13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113/* end confdefs.h. */
13114
13115#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13116#include <crypt.h>
13117
13118int
13119main ()
13120{
13121
13122struct crypt_data d;
13123char *r = crypt_r("", "", &d);
13124
13125 ;
13126 return 0;
13127}
13128_ACEOF
13129if ac_fn_c_try_compile "$LINENO"; then :
13130
13131$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13132
13133fi
13134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13135
13136fi
13137
13138
Victor Stinnere0be4232011-10-25 13:06:09 +020013139for ac_func in clock_gettime
13140do :
13141 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13142if test "x$ac_cv_func_clock_gettime" = xyes; then :
13143 cat >>confdefs.h <<_ACEOF
13144#define HAVE_CLOCK_GETTIME 1
13145_ACEOF
13146
13147else
13148
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13150$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13151if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13152 $as_echo_n "(cached) " >&6
13153else
13154 ac_check_lib_save_LIBS=$LIBS
13155LIBS="-lrt $LIBS"
13156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157/* end confdefs.h. */
13158
13159/* Override any GCC internal prototype to avoid an error.
13160 Use char because int might match the return type of a GCC
13161 builtin and then its argument prototype would still apply. */
13162#ifdef __cplusplus
13163extern "C"
13164#endif
13165char clock_gettime ();
13166int
13167main ()
13168{
13169return clock_gettime ();
13170 ;
13171 return 0;
13172}
13173_ACEOF
13174if ac_fn_c_try_link "$LINENO"; then :
13175 ac_cv_lib_rt_clock_gettime=yes
13176else
13177 ac_cv_lib_rt_clock_gettime=no
13178fi
13179rm -f core conftest.err conftest.$ac_objext \
13180 conftest$ac_exeext conftest.$ac_ext
13181LIBS=$ac_check_lib_save_LIBS
13182fi
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13184$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13185if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13186
Victor Stinner7efb8332014-08-29 15:41:08 +020013187 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013188 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13189
13190
13191$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13192
13193
13194fi
13195
13196
13197fi
13198done
13199
13200
13201for ac_func in clock_getres
13202do :
13203 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13204if test "x$ac_cv_func_clock_getres" = xyes; then :
13205 cat >>confdefs.h <<_ACEOF
13206#define HAVE_CLOCK_GETRES 1
13207_ACEOF
13208
13209else
13210
13211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13212$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13213if ${ac_cv_lib_rt_clock_getres+:} false; then :
13214 $as_echo_n "(cached) " >&6
13215else
13216 ac_check_lib_save_LIBS=$LIBS
13217LIBS="-lrt $LIBS"
13218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13219/* end confdefs.h. */
13220
13221/* Override any GCC internal prototype to avoid an error.
13222 Use char because int might match the return type of a GCC
13223 builtin and then its argument prototype would still apply. */
13224#ifdef __cplusplus
13225extern "C"
13226#endif
13227char clock_getres ();
13228int
13229main ()
13230{
13231return clock_getres ();
13232 ;
13233 return 0;
13234}
13235_ACEOF
13236if ac_fn_c_try_link "$LINENO"; then :
13237 ac_cv_lib_rt_clock_getres=yes
13238else
13239 ac_cv_lib_rt_clock_getres=no
13240fi
13241rm -f core conftest.err conftest.$ac_objext \
13242 conftest$ac_exeext conftest.$ac_ext
13243LIBS=$ac_check_lib_save_LIBS
13244fi
13245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13246$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13247if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13248
13249 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13250
13251
13252fi
13253
13254
13255fi
13256done
13257
13258
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013259for ac_func in clock_settime
13260do :
13261 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13262if test "x$ac_cv_func_clock_settime" = xyes; then :
13263 cat >>confdefs.h <<_ACEOF
13264#define HAVE_CLOCK_SETTIME 1
13265_ACEOF
13266
13267else
13268
13269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13270$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13271if ${ac_cv_lib_rt_clock_settime+:} false; then :
13272 $as_echo_n "(cached) " >&6
13273else
13274 ac_check_lib_save_LIBS=$LIBS
13275LIBS="-lrt $LIBS"
13276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277/* end confdefs.h. */
13278
13279/* Override any GCC internal prototype to avoid an error.
13280 Use char because int might match the return type of a GCC
13281 builtin and then its argument prototype would still apply. */
13282#ifdef __cplusplus
13283extern "C"
13284#endif
13285char clock_settime ();
13286int
13287main ()
13288{
13289return clock_settime ();
13290 ;
13291 return 0;
13292}
13293_ACEOF
13294if ac_fn_c_try_link "$LINENO"; then :
13295 ac_cv_lib_rt_clock_settime=yes
13296else
13297 ac_cv_lib_rt_clock_settime=no
13298fi
13299rm -f core conftest.err conftest.$ac_objext \
13300 conftest$ac_exeext conftest.$ac_ext
13301LIBS=$ac_check_lib_save_LIBS
13302fi
13303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13304$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13305if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13306
13307 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13308
13309
13310fi
13311
13312
13313fi
13314done
13315
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13318$as_echo_n "checking for major... " >&6; }
13319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013321
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013322#if defined(MAJOR_IN_MKDEV)
13323#include <sys/mkdev.h>
13324#elif defined(MAJOR_IN_SYSMACROS)
13325#include <sys/sysmacros.h>
13326#else
13327#include <sys/types.h>
13328#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013329
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013330int
13331main ()
13332{
13333
13334 makedev(major(0),minor(0));
13335
13336 ;
13337 return 0;
13338}
13339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013341
13342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13346$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013347
13348else
Skip Montanaro6dead952003-09-25 14:50:04 +000013349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13351$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013352
13353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013354rm -f core conftest.err conftest.$ac_objext \
13355 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013356
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013357# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013358# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13360$as_echo_n "checking for getaddrinfo... " >&6; }
13361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013362/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013363
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013364#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013365#include <sys/socket.h>
13366#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013367#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369int
13370main ()
13371{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013372getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 ;
13374 return 0;
13375}
13376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013377if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378 have_getaddrinfo=yes
13379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013382rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
13384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13385$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386if test $have_getaddrinfo = yes
13387then
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13389$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013390 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392else
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013394
13395if test "${enable_ipv6+set}" = set; then
13396 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13397else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013398 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013399fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013402/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013403
Stefan Krah19c21392012-11-22 23:47:32 +010013404#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013405#include <sys/types.h>
13406#include <netdb.h>
13407#include <string.h>
13408#include <sys/socket.h>
13409#include <netinet/in.h>
13410
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013411int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013412{
13413 int passive, gaierr, inet4 = 0, inet6 = 0;
13414 struct addrinfo hints, *ai, *aitop;
13415 char straddr[INET6_ADDRSTRLEN], strport[16];
13416
13417 for (passive = 0; passive <= 1; passive++) {
13418 memset(&hints, 0, sizeof(hints));
13419 hints.ai_family = AF_UNSPEC;
13420 hints.ai_flags = passive ? AI_PASSIVE : 0;
13421 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013422 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013423 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13424 (void)gai_strerror(gaierr);
13425 goto bad;
13426 }
13427 for (ai = aitop; ai; ai = ai->ai_next) {
13428 if (ai->ai_addr == NULL ||
13429 ai->ai_addrlen == 0 ||
13430 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13431 straddr, sizeof(straddr), strport, sizeof(strport),
13432 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13433 goto bad;
13434 }
13435 switch (ai->ai_family) {
13436 case AF_INET:
13437 if (strcmp(strport, "54321") != 0) {
13438 goto bad;
13439 }
13440 if (passive) {
13441 if (strcmp(straddr, "0.0.0.0") != 0) {
13442 goto bad;
13443 }
13444 } else {
13445 if (strcmp(straddr, "127.0.0.1") != 0) {
13446 goto bad;
13447 }
13448 }
13449 inet4++;
13450 break;
13451 case AF_INET6:
13452 if (strcmp(strport, "54321") != 0) {
13453 goto bad;
13454 }
13455 if (passive) {
13456 if (strcmp(straddr, "::") != 0) {
13457 goto bad;
13458 }
13459 } else {
13460 if (strcmp(straddr, "::1") != 0) {
13461 goto bad;
13462 }
13463 }
13464 inet6++;
13465 break;
13466 case AF_UNSPEC:
13467 goto bad;
13468 break;
13469 default:
13470 /* another family support? */
13471 break;
13472 }
13473 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013474 freeaddrinfo(aitop);
13475 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013476 }
13477
13478 if (!(inet4 == 0 || inet4 == 2))
13479 goto bad;
13480 if (!(inet6 == 0 || inet6 == 2))
13481 goto bad;
13482
13483 if (aitop)
13484 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013485 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013486
13487 bad:
13488 if (aitop)
13489 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013490 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013491}
13492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013504
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013506
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13508$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13509
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013510if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013511then
13512 if test $ipv6 = yes
13513 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013514 echo 'Fatal: You must get working getaddrinfo() function.'
13515 echo ' or you can specify "--disable-ipv6"'.
13516 exit 1
13517 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013518else
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013521
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013523
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013524for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013525do :
13526 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013527if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013530_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013531
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013532fi
13533done
13534
Michael W. Hudson54241132001-12-07 15:38:26 +000013535
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13538$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013539if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013543/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544#include <sys/types.h>
13545#include <sys/time.h>
13546#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548int
13549main ()
13550{
13551if ((struct tm *) 0)
13552return 0;
13553 ;
13554 return 0;
13555}
13556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013557if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013558 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13565$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013566if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Matthias Kloseb9621712010-04-24 17:59:49 +000013568$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569
13570fi
13571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13573$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013574if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013578/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579#include <sys/types.h>
13580#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013585struct tm tm;
13586 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 ;
13589 return 0;
13590}
13591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013592if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593 ac_cv_struct_tm=time.h
13594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13600$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013601if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604
13605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607ac_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 +000013608#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610"
Victor Stinnere0be4232011-10-25 13:06:09 +020013611if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
13613cat >>confdefs.h <<_ACEOF
13614#define HAVE_STRUCT_TM_TM_ZONE 1
13615_ACEOF
13616
13617
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013619
Martin v. Löwis11437992002-04-12 09:54:03 +000013620if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013623
13624else
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13626"
Victor Stinnere0be4232011-10-25 13:06:09 +020013627if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631fi
13632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013634#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635_ACEOF
13636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13638$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013644#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645#if !HAVE_DECL_TZNAME
13646extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649int
13650main ()
13651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013652return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013658 ac_cv_var_tzname=yes
13659else
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013662rm -f core conftest.err conftest.$ac_objext \
13663 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13666$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013667 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013671 fi
13672fi
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674ac_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 +020013675if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013676
13677cat >>confdefs.h <<_ACEOF
13678#define HAVE_STRUCT_STAT_ST_RDEV 1
13679_ACEOF
13680
13681
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013682fi
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684ac_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 +020013685if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013686
Martin v. Löwis11437992002-04-12 09:54:03 +000013687cat >>confdefs.h <<_ACEOF
13688#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13689_ACEOF
13690
13691
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013692fi
13693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694ac_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 +020013695if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013696
13697cat >>confdefs.h <<_ACEOF
13698#define HAVE_STRUCT_STAT_ST_FLAGS 1
13699_ACEOF
13700
13701
13702fi
13703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704ac_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 +020013705if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013706
13707cat >>confdefs.h <<_ACEOF
13708#define HAVE_STRUCT_STAT_ST_GEN 1
13709_ACEOF
13710
13711
13712fi
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714ac_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 +020013715if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013716
13717cat >>confdefs.h <<_ACEOF
13718#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13719_ACEOF
13720
13721
13722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724ac_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 +020013725if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727cat >>confdefs.h <<_ACEOF
13728#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13729_ACEOF
13730
13731
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013732fi
13733
Stefan Krah267b6392016-04-26 01:09:18 +020013734ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13735 #include <sys/types.h>
13736 #include <pwd.h>
13737
13738"
13739if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13740
13741cat >>confdefs.h <<_ACEOF
13742#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13743_ACEOF
13744
13745
13746fi
13747ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13748 #include <sys/types.h>
13749 #include <pwd.h>
13750
13751"
13752if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13753
13754cat >>confdefs.h <<_ACEOF
13755#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13756_ACEOF
13757
13758
13759fi
13760
Zachary Ware6a6967e2016-10-01 00:47:27 -050013761# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13762ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13763"
13764if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13765
13766cat >>confdefs.h <<_ACEOF
13767#define HAVE_SIGINFO_T_SI_BAND 1
13768_ACEOF
13769
13770
13771fi
13772
Michael W. Hudson54241132001-12-07 15:38:26 +000013773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13775$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778else
Matthias Kloseb159a552010-04-25 21:00:44 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013782#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013783int
13784main ()
13785{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ;
13788 return 0;
13789}
13790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013791if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792 ac_cv_header_time_altzone=yes
13793else
Matthias Kloseb9621712010-04-24 17:59:49 +000013794 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798fi
13799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13801$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805
13806fi
13807
Guido van Rossumda88dad1995-01-26 00:46:29 +000013808was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13810$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013812/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813
13814#include <sys/types.h>
13815#include <sys/select.h>
13816#include <sys/time.h>
13817
Martin v. Löwis11437992002-04-12 09:54:03 +000013818int
13819main ()
13820{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821;
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 ;
13823 return 0;
13824}
13825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013826if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
13828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013830
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013831 was_it_defined=yes
13832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13836$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13839$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013840if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013842else
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013844/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013845#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013846int
13847main ()
13848{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013849struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 ;
13851 return 0;
13852}
13853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013855 ac_cv_struct_addrinfo=yes
13856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13860fi
13861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13863$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013864if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013867
13868fi
13869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13871$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013872if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013876/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013877
13878# include <sys/types.h>
13879# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013880int
13881main ()
13882{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013883struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 ;
13885 return 0;
13886}
13887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013888if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013889 ac_cv_struct_sockaddr_storage=yes
13890else
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13894fi
13895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13897$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013898if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013901
13902fi
13903
Christian Heimesdffa3942016-09-05 23:54:41 +020013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13905$as_echo_n "checking for sockaddr_alg... " >&6; }
13906if ${ac_cv_struct_sockaddr_alg+:} false; then :
13907 $as_echo_n "(cached) " >&6
13908else
13909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13910/* end confdefs.h. */
13911
13912# include <sys/types.h>
13913# include <sys/socket.h>
13914# include <linux/if_alg.h>
13915int
13916main ()
13917{
13918struct sockaddr_alg s
13919 ;
13920 return 0;
13921}
13922_ACEOF
13923if ac_fn_c_try_compile "$LINENO"; then :
13924 ac_cv_struct_sockaddr_alg=yes
13925else
13926 ac_cv_struct_sockaddr_alg=no
13927fi
13928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13929fi
13930
13931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13932$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13933if test $ac_cv_struct_sockaddr_alg = yes; then
13934
13935$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13936
13937fi
13938
Guido van Rossum627b2d71993-12-24 10:39:16 +000013939# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13942$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013943if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013945else
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013948$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013949int
13950main ()
13951{
13952static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013953test_array [0] = 0;
13954return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
13956 ;
13957 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013958}
Martin v. Löwis11437992002-04-12 09:54:03 +000013959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013960if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013961 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013962else
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13968$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013969if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013971
13972fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13975$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013976if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013980/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013981
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013987 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013989 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 char const *const *pcpcc;
13992 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 /* NEC SVR4.0.2 mips cc rejects this. */
13994 struct point {int x, y;};
13995 static struct point const zero = {0,0};
13996 /* AIX XL C 1.02.0.0 rejects this.
13997 It does not let you subtract one const X* pointer from another in
13998 an arm of an if-expression whose if-part is not a constant
13999 expression */
14000 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014001 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003 ++pcpcc;
14004 ppc = (char**) pcpcc;
14005 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014006 { /* SCO 3.2v4 cc rejects this sort of thing. */
14007 char tx;
14008 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014010
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 }
14014 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14015 int x[] = {25, 17};
14016 const int *foo = &x[0];
14017 ++foo;
14018 }
14019 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14020 typedef const int *iptr;
14021 iptr p = 0;
14022 ++p;
14023 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014024 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000014026 struct s { int j; const int *ap[3]; } bx;
14027 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 }
14029 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14030 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000014034#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014035
Martin v. Löwis11437992002-04-12 09:54:03 +000014036 ;
14037 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014038}
Martin v. Löwis11437992002-04-12 09:54:03 +000014039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014041 ac_cv_c_const=yes
14042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
14048$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014049if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052
14053fi
14054
Michael W. Hudson54241132001-12-07 15:38:26 +000014055
Guido van Rossumda88dad1995-01-26 00:46:29 +000014056works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
14058$as_echo_n "checking for working signed char... " >&6; }
14059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014060/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014061
Martin v. Löwis11437992002-04-12 09:54:03 +000014062int
14063main ()
14064{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014065signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 ;
14067 return 0;
14068}
14069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014070if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000014071 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014072else
Skip Montanaro6dead952003-09-25 14:50:04 +000014073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000014075
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014076
Guido van Rossum7f43da71994-08-01 12:15:30 +000014077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14080$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014081
Guido van Rossumda88dad1995-01-26 00:46:29 +000014082have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
14084$as_echo_n "checking for prototypes... " >&6; }
14085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014086/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014087int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014088int
14089main ()
14090{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014091return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 ;
14093 return 0;
14094}
14095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014097
Matthias Kloseb9621712010-04-24 17:59:49 +000014098$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Matthias Kloseb159a552010-04-25 21:00:44 +000014100 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14104$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105
Guido van Rossumda88dad1995-01-26 00:46:29 +000014106works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14108$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014110/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014111
14112#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014113int foo(int x, ...) {
14114 va_list va;
14115 va_start(va, x);
14116 va_arg(va, int);
14117 va_arg(va, char *);
14118 va_arg(va, double);
14119 return 0;
14120}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122int
14123main ()
14124{
Guido van Rossum90eea071996-08-30 20:58:57 +000014125return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 ;
14127 return 0;
14128}
14129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014131
14132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014135 works=yes
14136
Guido van Rossum627b2d71993-12-24 10:39:16 +000014137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14140$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014141
Martin v. Löwisd6320502004-08-12 13:45:08 +000014142# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14144$as_echo_n "checking for socketpair... " >&6; }
14145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014146/* end confdefs.h. */
14147
14148#include <sys/types.h>
14149#include <sys/socket.h>
14150
14151int
14152main ()
14153{
14154void *x=socketpair
14155 ;
14156 return 0;
14157}
14158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014162
Matthias Kloseb159a552010-04-25 21:00:44 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014164$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014165else
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14167$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014168
14169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014171
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014172# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14174$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014176/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014177#include <sys/types.h>
14178#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014179int
14180main ()
14181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014182struct sockaddr x;
14183x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ;
14185 return 0;
14186}
14187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if ac_fn_c_try_compile "$LINENO"; then :
14189 { $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
Matthias Kloseb9621712010-04-24 17:59:49 +000014192$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014193
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14196$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014197
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014200
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014201# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
14203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014205if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14210$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014211 OLD_CFLAGS=$CFLAGS
14212 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014214/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014215
14216# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014217
Martin v. Löwis11437992002-04-12 09:54:03 +000014218int
14219main ()
14220{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014221
14222 char *name;
14223 struct hostent *he, *res;
14224 char buffer[2048];
14225 int buflen = 2048;
14226 int h_errnop;
14227
14228 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
14230 ;
14231 return 0;
14232}
14233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014237
Martin v. Löwis11437992002-04-12 09:54:03 +000014238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14242$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014244else
Skip Montanaro6dead952003-09-25 14:50:04 +000014245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14247$as_echo "no" >&6; }
14248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14249$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014251/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014252
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014253# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014254
Martin v. Löwis11437992002-04-12 09:54:03 +000014255int
14256main ()
14257{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014258
14259 char *name;
14260 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014261 char buffer[2048];
14262 int buflen = 2048;
14263 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014264
Matthias Kloseb159a552010-04-25 21:00:44 +000014265 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
14267 ;
14268 return 0;
14269}
14270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014274
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Matthias Kloseb159a552010-04-25 21:00:44 +000014276$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14279$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014280
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014281else
Skip Montanaro6dead952003-09-25 14:50:04 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14284$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14286$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14288/* end confdefs.h. */
14289
14290# include <netdb.h>
14291
14292int
14293main ()
14294{
14295
14296 char *name;
14297 struct hostent *he;
14298 struct hostent_data data;
14299
14300 (void) gethostbyname_r(name, he, &data);
14301
14302 ;
14303 return 0;
14304}
14305_ACEOF
14306if ac_fn_c_try_compile "$LINENO"; then :
14307
14308 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14309
14310
14311$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14312
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14314$as_echo "yes" >&6; }
14315
14316else
14317
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14319$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014329 CFLAGS=$OLD_CFLAGS
14330
14331else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 for ac_func in gethostbyname
14334do :
14335 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014336if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014338#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014339_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014341fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014342done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014343
Michael W. Hudson54241132001-12-07 15:38:26 +000014344
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014345fi
14346
Michael W. Hudson54241132001-12-07 15:38:26 +000014347
14348
14349
14350
14351
14352
Guido van Rossum627b2d71993-12-24 10:39:16 +000014353# checks for system services
14354# (none yet)
14355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014356# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014357ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014358if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014359
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14362$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014363if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014365else
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014367LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371/* Override any GCC internal prototype to avoid an error.
14372 Use char because int might match the return type of a GCC
14373 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014374#ifdef __cplusplus
14375extern "C"
14376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014377char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014378int
14379main ()
14380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 ;
14383 return 0;
14384}
14385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014391rm -f core conftest.err conftest.$ac_objext \
14392 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014393LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14396$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014397if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 cat >>confdefs.h <<_ACEOF
14399#define HAVE_LIBIEEE 1
14400_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014401
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014402 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014403
Guido van Rossum627b2d71993-12-24 10:39:16 +000014404fi
14405
Michael W. Hudson54241132001-12-07 15:38:26 +000014406
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014407fi
14408
Michael W. Hudson54241132001-12-07 15:38:26 +000014409
Guido van Rossum7f43da71994-08-01 12:15:30 +000014410# check for --with-libm=...
14411
Guido van Rossum563e7081996-09-10 18:20:48 +000014412case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014413Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014414*) LIBM=-lm
14415esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14417$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014420if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014422if test "$withval" = no
14423then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14425$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014426elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014427then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14429$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014430else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014431fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014432else
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14434$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435fi
14436
Guido van Rossum7f43da71994-08-01 12:15:30 +000014437
14438# check for --with-libc=...
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14441$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014444if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014446if test "$withval" = no
14447then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14449$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014450elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014451then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14453$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014454else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014455fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014456else
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14458$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459fi
14460
Guido van Rossum7f43da71994-08-01 12:15:30 +000014461
Stefan Krah1919b7e2012-03-21 18:25:23 +010014462# **************************************
14463# * Check for gcc x64 inline assembler *
14464# **************************************
14465
14466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14467$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14469/* end confdefs.h. */
14470
14471int
14472main ()
14473{
14474
14475 __asm__ __volatile__ ("movq %rcx, %rax");
14476
14477 ;
14478 return 0;
14479}
14480_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014481if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014482 have_gcc_asm_for_x64=yes
14483else
14484 have_gcc_asm_for_x64=no
14485fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014486rm -f core conftest.err conftest.$ac_objext \
14487 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14489$as_echo "$have_gcc_asm_for_x64" >&6; }
14490if test "$have_gcc_asm_for_x64" = yes
14491then
14492
14493$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14494
14495fi
14496
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014497# **************************************************
14498# * Check for various properties of floating point *
14499# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014500
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14502$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14503if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014505else
14506
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014507
14508ax_cv_c_float_words_bigendian=unknown
14509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014510/* end confdefs.h. */
14511
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014512
14513double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14514
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014515
14516_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014517if ac_fn_c_try_compile "$LINENO"; then :
14518
14519
Arnon Yaari5dd83602020-04-01 18:19:09 +030014520if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014521 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014522fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014523if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014524 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14525 ax_cv_c_float_words_bigendian=no
14526 else
14527 ax_cv_c_float_words_bigendian=unknown
14528 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014529fi
14530
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014531
14532fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014534fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14536$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014537
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014538case $ax_cv_c_float_words_bigendian in
14539 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014540
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014541$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14542 ;;
14543 no)
14544 ;;
14545 *)
14546 as_fn_error $? "
14547
14548Unknown float word ordering. You need to manually preset
14549ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14550
14551 " "$LINENO" 5 ;;
14552esac
14553
14554
14555if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014556then
14557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014559
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014560elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014561then
14562
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014563$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14564
14565else
14566 # Some ARM platforms use a mixed-endian representation for doubles.
14567 # While Python doesn't currently have full support for these platforms
14568 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14569 # conversions work.
14570 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14571 # or little, then it must be this?
14572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014574
14575fi
14576
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014577# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014578# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014579# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014580# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014581# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014582# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014583
14584# This inline assembler syntax may also work for suncc and icc,
14585# so we try it on all platforms.
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14588$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014590/* end confdefs.h. */
14591
14592int
14593main ()
14594{
14595
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014596 unsigned short cw;
14597 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14598 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014599
14600 ;
14601 return 0;
14602}
14603_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014604if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014605 have_gcc_asm_for_x87=yes
14606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014608fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014609rm -f core conftest.err conftest.$ac_objext \
14610 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14612$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014613if test "$have_gcc_asm_for_x87" = yes
14614then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014617
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014619
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14621$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14623/* end confdefs.h. */
14624
14625int
14626main ()
14627{
14628
14629 unsigned int fpcr;
14630 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14631 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14632
14633 ;
14634 return 0;
14635}
14636_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014637if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014638 have_gcc_asm_for_mc68881=yes
14639else
14640 have_gcc_asm_for_mc68881=no
14641fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014642rm -f core conftest.err conftest.$ac_objext \
14643 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14645$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14646if test "$have_gcc_asm_for_mc68881" = yes
14647then
14648
14649$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14650
14651fi
14652
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014653# Detect whether system arithmetic is subject to x87-style double
14654# rounding issues. The result of this test has little meaning on non
14655# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14656# mode is round-to-nearest and double rounding issues are present, and
14657# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14659$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014660# $BASECFLAGS may affect the result
14661ac_save_cc="$CC"
14662CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014663if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014664 ac_cv_x87_double_rounding=no
14665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014667/* end confdefs.h. */
14668
14669#include <stdlib.h>
14670#include <math.h>
14671int main() {
14672 volatile double x, y, z;
14673 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14674 x = 0.99999999999999989; /* 1-2**-53 */
14675 y = 1./x;
14676 if (y != 1.)
14677 exit(0);
14678 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14679 x = 1e16;
14680 y = 2.99999;
14681 z = x + y;
14682 if (z != 1e16+4.)
14683 exit(0);
14684 /* both tests show evidence of double rounding */
14685 exit(1);
14686}
14687
14688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014689if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014690 ac_cv_x87_double_rounding=no
14691else
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14695 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014696fi
14697
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014698CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14700$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014701if test "$ac_cv_x87_double_rounding" = yes
14702then
14703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014705
14706fi
14707
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014708# ************************************
14709# * Check for mathematical functions *
14710# ************************************
14711
14712LIBS_SAVE=$LIBS
14713LIBS="$LIBS $LIBM"
14714
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014715for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14716do :
14717 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14718ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014719if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014720 cat >>confdefs.h <<_ACEOF
14721#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14722_ACEOF
14723
14724fi
14725done
14726
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014727for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014728do :
14729 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14730ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014731if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014732 cat >>confdefs.h <<_ACEOF
14733#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14734_ACEOF
14735
14736fi
14737done
14738
14739ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14740"
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014742 ac_have_decl=1
14743else
14744 ac_have_decl=0
14745fi
14746
14747cat >>confdefs.h <<_ACEOF
14748#define HAVE_DECL_ISINF $ac_have_decl
14749_ACEOF
14750ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14751"
Victor Stinnere0be4232011-10-25 13:06:09 +020014752if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014753 ac_have_decl=1
14754else
14755 ac_have_decl=0
14756fi
14757
14758cat >>confdefs.h <<_ACEOF
14759#define HAVE_DECL_ISNAN $ac_have_decl
14760_ACEOF
14761ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14762"
Victor Stinnere0be4232011-10-25 13:06:09 +020014763if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014764 ac_have_decl=1
14765else
14766 ac_have_decl=0
14767fi
14768
14769cat >>confdefs.h <<_ACEOF
14770#define HAVE_DECL_ISFINITE $ac_have_decl
14771_ACEOF
14772
14773
Mark Dickinsona614f042009-11-28 12:48:43 +000014774# For multiprocessing module, check that sem_open
14775# actually works. For FreeBSD versions <= 7.2,
14776# the kernel module that provides POSIX semaphores
14777# isn't loaded by default, so an attempt to call
14778# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14780$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014781if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014785 ac_cv_posix_semaphores_enabled=yes
14786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014788/* end confdefs.h. */
14789
14790#include <unistd.h>
14791#include <fcntl.h>
14792#include <stdio.h>
14793#include <semaphore.h>
14794#include <sys/stat.h>
14795
14796int main(void) {
14797 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14798 if (a == SEM_FAILED) {
14799 perror("sem_open");
14800 return 1;
14801 }
14802 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014803 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014804 return 0;
14805}
14806
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014809 ac_cv_posix_semaphores_enabled=yes
14810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014815fi
14816
14817
Mark Dickinsona614f042009-11-28 12:48:43 +000014818fi
14819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14821$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014822if test $ac_cv_posix_semaphores_enabled = no
14823then
14824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014826
14827fi
14828
Mark Dickinson10683072009-04-18 21:18:19 +000014829# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14831$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014832if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014836 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014839/* end confdefs.h. */
14840
14841#include <unistd.h>
14842#include <fcntl.h>
14843#include <stdio.h>
14844#include <semaphore.h>
14845#include <sys/stat.h>
14846
14847int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014848 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014849 int count;
14850 int res;
14851 if(a==SEM_FAILED){
14852 perror("sem_open");
14853 return 1;
14854
14855 }
14856 res = sem_getvalue(a, &count);
14857 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014858 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014859 return res==-1 ? 1 : 0;
14860}
14861
Mark Dickinson10683072009-04-18 21:18:19 +000014862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014864 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014870fi
14871
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014873fi
14874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14876$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014877if test $ac_cv_broken_sem_getvalue = yes
14878then
14879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014881
14882fi
14883
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014884ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14885"
14886if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14887 ac_have_decl=1
14888else
14889 ac_have_decl=0
14890fi
14891
14892cat >>confdefs.h <<_ACEOF
14893#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14894_ACEOF
14895ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14896"
14897if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14898 ac_have_decl=1
14899else
14900 ac_have_decl=0
14901fi
14902
14903cat >>confdefs.h <<_ACEOF
14904#define HAVE_DECL_RTLD_NOW $ac_have_decl
14905_ACEOF
14906ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14907"
14908if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14909 ac_have_decl=1
14910else
14911 ac_have_decl=0
14912fi
14913
14914cat >>confdefs.h <<_ACEOF
14915#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14916_ACEOF
14917ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14918"
14919if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14920 ac_have_decl=1
14921else
14922 ac_have_decl=0
14923fi
14924
14925cat >>confdefs.h <<_ACEOF
14926#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14927_ACEOF
14928ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14929"
14930if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14931 ac_have_decl=1
14932else
14933 ac_have_decl=0
14934fi
14935
14936cat >>confdefs.h <<_ACEOF
14937#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14938_ACEOF
14939ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14940"
14941if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14942 ac_have_decl=1
14943else
14944 ac_have_decl=0
14945fi
14946
14947cat >>confdefs.h <<_ACEOF
14948#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14949_ACEOF
14950ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14951"
14952if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14953 ac_have_decl=1
14954else
14955 ac_have_decl=0
14956fi
14957
14958cat >>confdefs.h <<_ACEOF
14959#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14960_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014961ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14962"
14963if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14964 ac_have_decl=1
14965else
14966 ac_have_decl=0
14967fi
14968
14969cat >>confdefs.h <<_ACEOF
14970#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14971_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014972
14973
Mark Dickinsonbd792642009-03-18 20:06:12 +000014974# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14976$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014977# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014978if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014979 enableval=$enable_big_digits; case $enable_big_digits in
14980yes)
14981 enable_big_digits=30 ;;
14982no)
14983 enable_big_digits=15 ;;
1498415|30)
14985 ;;
14986*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014987 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 +000014988esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14990$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014991
14992cat >>confdefs.h <<_ACEOF
14993#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14994_ACEOF
14995
14996
14997else
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14999$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000015000fi
15001
15002
Guido van Rossumef2255b2000-03-10 22:30:29 +000015003# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000015004ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020015005if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
15007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015010 wchar_h="yes"
15011
Guido van Rossumef2255b2000-03-10 22:30:29 +000015012else
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015014
15015fi
15016
Michael W. Hudson54241132001-12-07 15:38:26 +000015017
Martin v. Löwis11437992002-04-12 09:54:03 +000015018
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019# determine wchar_t size
15020if test "$wchar_h" = yes
15021then
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15025# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000015026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
15027$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015028if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015030else
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
15032"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
Martin v. Löwis11437992002-04-12 09:54:03 +000015034else
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 if test "$ac_cv_type_wchar_t" = yes; then
15036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015038as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020015039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 else
15041 ac_cv_sizeof_wchar_t=0
15042 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015044
Martin v. Löwis11437992002-04-12 09:54:03 +000015045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
15047$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048
15049
15050
Martin v. Löwis11437992002-04-12 09:54:03 +000015051cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015052#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015053_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015054
Michael W. Hudson54241132001-12-07 15:38:26 +000015055
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015056fi
15057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
15059$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015060have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015063
15064#include <tcl.h>
15065#if TCL_UTF_MAX != 6
15066# error "NOT UCS4_TCL"
15067#endif
15068int
15069main ()
15070{
15071
15072 ;
15073 return 0;
15074}
15075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015077
15078
Matthias Kloseb9621712010-04-24 17:59:49 +000015079$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015080
15081 have_ucs4_tcl=yes
15082
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
15086$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000015087
Skip Montanaro6dead952003-09-25 14:50:04 +000015088# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015089if test "$wchar_h" = yes
15090then
15091 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15093$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015094 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015096else
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015099 ac_cv_wchar_t_signed=yes
15100else
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015102/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015103
15104 #include <wchar.h>
15105 int main()
15106 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015107 /* Success: exit code 0 */
15108 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015109 }
15110
15111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015112if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015113 ac_cv_wchar_t_signed=yes
15114else
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15118 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015119fi
15120
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015121fi
15122
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15124$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125fi
15126
Michael Osipov3738fad2018-08-24 18:17:19 +020015127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15128$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015129# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015130if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015131 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015132then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
Michael Osipov3738fad2018-08-24 18:17:19 +020015136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15137$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015138else
Michael Osipov3738fad2018-08-24 18:17:19 +020015139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15140$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015141fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015142
15143# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15145$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015146if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015148else
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 ac_cv_c_bigendian=unknown
15150 # See if we're dealing with a universal compiler.
15151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15152/* end confdefs.h. */
15153#ifndef __APPLE_CC__
15154 not a universal capable compiler
15155 #endif
15156 typedef int dummy;
15157
Skip Montanaro6dead952003-09-25 14:50:04 +000015158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015159if ac_fn_c_try_compile "$LINENO"; then :
15160
15161 # Check for potential -arch flags. It is not universal unless
15162 # there are at least two -arch flags with different values.
15163 ac_arch=
15164 ac_prev=
15165 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15166 if test -n "$ac_prev"; then
15167 case $ac_word in
15168 i?86 | x86_64 | ppc | ppc64)
15169 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15170 ac_arch=$ac_word
15171 else
15172 ac_cv_c_bigendian=universal
15173 break
15174 fi
15175 ;;
15176 esac
15177 ac_prev=
15178 elif test "x$ac_word" = "x-arch"; then
15179 ac_prev=arch
15180 fi
15181 done
15182fi
15183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15184 if test $ac_cv_c_bigendian = unknown; then
15185 # See if sys/param.h defines the BYTE_ORDER macro.
15186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015188#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190
Martin v. Löwis11437992002-04-12 09:54:03 +000015191int
15192main ()
15193{
Matthias Kloseb9621712010-04-24 17:59:49 +000015194#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15195 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15196 && LITTLE_ENDIAN)
15197 bogus endian macros
15198 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015199
15200 ;
15201 return 0;
15202}
15203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015204if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015205 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015207/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015208#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015210
Martin v. Löwis11437992002-04-12 09:54:03 +000015211int
15212main ()
15213{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015214#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 not big endian
15216 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015217
15218 ;
15219 return 0;
15220}
15221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015222if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015223 ac_cv_c_bigendian=yes
15224else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015228fi
15229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15230 fi
15231 if test $ac_cv_c_bigendian = unknown; then
15232 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015234/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015235#include <limits.h>
15236
Martin v. Löwis11437992002-04-12 09:54:03 +000015237int
15238main ()
15239{
Matthias Kloseb9621712010-04-24 17:59:49 +000015240#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15241 bogus endian macros
15242 #endif
15243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ;
15245 return 0;
15246}
15247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015248if ac_fn_c_try_compile "$LINENO"; then :
15249 # It does; now see whether it defined to _BIG_ENDIAN or not.
15250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15251/* end confdefs.h. */
15252#include <limits.h>
15253
15254int
15255main ()
15256{
15257#ifndef _BIG_ENDIAN
15258 not big endian
15259 #endif
15260
15261 ;
15262 return 0;
15263}
15264_ACEOF
15265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015267else
Matthias Kloseb9621712010-04-24 17:59:49 +000015268 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15271fi
15272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15273 fi
15274 if test $ac_cv_c_bigendian = unknown; then
15275 # Compile a test program.
15276 if test "$cross_compiling" = yes; then :
15277 # Try to guess by grepping values from an object file.
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279/* end confdefs.h. */
15280short int ascii_mm[] =
15281 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15282 short int ascii_ii[] =
15283 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15284 int use_ascii (int i) {
15285 return ascii_mm[i] + ascii_ii[i];
15286 }
15287 short int ebcdic_ii[] =
15288 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15289 short int ebcdic_mm[] =
15290 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15291 int use_ebcdic (int i) {
15292 return ebcdic_mm[i] + ebcdic_ii[i];
15293 }
15294 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296int
15297main ()
15298{
15299return use_ascii (foo) == use_ebcdic (foo);
15300 ;
15301 return 0;
15302}
15303_ACEOF
15304if ac_fn_c_try_compile "$LINENO"; then :
15305 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15306 ac_cv_c_bigendian=yes
15307 fi
15308 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15309 if test "$ac_cv_c_bigendian" = unknown; then
15310 ac_cv_c_bigendian=no
15311 else
15312 # finding both strings is unlikely to happen, but who knows?
15313 ac_cv_c_bigendian=unknown
15314 fi
15315 fi
15316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015318else
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015320/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015322int
15323main ()
15324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 /* Are we little or big endian? From Harbison&Steele. */
15327 union
15328 {
15329 long int l;
15330 char c[sizeof (long int)];
15331 } u;
15332 u.l = 1;
15333 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334
15335 ;
15336 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015337}
Martin v. Löwis11437992002-04-12 09:54:03 +000015338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015339if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015340 ac_cv_c_bigendian=no
15341else
Matthias Kloseb9621712010-04-24 17:59:49 +000015342 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15351$as_echo "$ac_cv_c_bigendian" >&6; }
15352 case $ac_cv_c_bigendian in #(
15353 yes)
15354 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15355;; #(
15356 no)
15357 ;; #(
15358 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 ;; #(
15363 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015364 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015365 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015367
Michael W. Hudson54241132001-12-07 15:38:26 +000015368
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015369# ABI version string for Python extension modules. This appears between the
15370# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15371# from the following attributes which affect the ABI of this Python build (in
15372# this order):
15373#
15374# * The Python implementation (always 'cpython-' for us)
15375# * The major and minor version numbers
15376# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015377#
15378# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015379# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15380# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015381#
15382# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15383# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015384
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15386$as_echo_n "checking ABIFLAGS... " >&6; }
15387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15388$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15390$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015391SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15393$as_echo "$SOABI" >&6; }
15394
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015395# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15396if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015397 # Similar to SOABI but remove "d" flag from ABIFLAGS
15398
15399 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15400
15401cat >>confdefs.h <<_ACEOF
15402#define ALT_SOABI "${ALT_SOABI}"
15403_ACEOF
15404
15405fi
15406
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015407
15408case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015409 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015410 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15411 *)
15412 EXT_SUFFIX=${SHLIB_SUFFIX};;
15413esac
15414
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15416$as_echo_n "checking LDVERSION... " >&6; }
15417LDVERSION='$(VERSION)$(ABIFLAGS)'
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15419$as_echo "$LDVERSION" >&6; }
15420
E. M. Brayc994c8f2019-05-24 17:33:47 +020015421# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015422
E. M. Brayb1fc4172019-05-24 18:39:39 +020015423if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015424 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015425else
15426 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015427fi
15428
doko@python.org87421192013-01-26 11:39:31 +010015429
Victor Stinner51ae31e2020-06-09 15:32:43 +020015430
15431BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15432
15433
15434# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015435# /usr/$LIDIRNAME/python$VERSION
15436
15437PLATLIBDIR="lib"
15438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15439$as_echo_n "checking for --with-platlibdir... " >&6; }
15440
15441# Check whether --with-platlibdir was given.
15442if test "${with_platlibdir+set}" = set; then :
15443 withval=$with_platlibdir;
15444# ignore 3 options:
15445# --with-platlibdir
15446# --with-platlibdir=
15447# --without-platlibdir
15448if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15449then
15450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15451$as_echo "yes" >&6; }
15452 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015453 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015454else
Victor Stinner8510f432020-03-10 09:53:09 +010015455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15456$as_echo "no" >&6; }
15457fi
15458else
15459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15460$as_echo "no" >&6; }
15461fi
15462
15463
15464
15465
15466if test x$PLATFORM_TRIPLET = x; then
15467 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15468else
15469 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015470fi
doko@python.org87421192013-01-26 11:39:31 +010015471
15472
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015473# Check whether right shifting a negative integer extends the sign bit
15474# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15476$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015477if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015482 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015483else
Matthias Kloseb9621712010-04-24 17:59:49 +000015484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015485/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015486
15487int main()
15488{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015489 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015490}
15491
Martin v. Löwis11437992002-04-12 09:54:03 +000015492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015493if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015494 ac_cv_rshift_extends_sign=yes
15495else
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015500fi
15501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502fi
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15505$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015506if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015507then
Martin v. Löwis11437992002-04-12 09:54:03 +000015508
Matthias Kloseb9621712010-04-24 17:59:49 +000015509$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015510
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015511fi
15512
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015513# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15515$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015516if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015518else
Martin v. Löwis11437992002-04-12 09:54:03 +000015519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015521/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015522#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015523int
15524main ()
15525{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015526
15527 FILE *f = fopen("/dev/null", "r");
15528 flockfile(f);
15529 getc_unlocked(f);
15530 funlockfile(f);
15531
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 ;
15533 return 0;
15534}
15535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015536if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015537 ac_cv_have_getc_unlocked=yes
15538else
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 ac_cv_have_getc_unlocked=no
15540fi
15541rm -f core conftest.err conftest.$ac_objext \
15542 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15546$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015547if test "$ac_cv_have_getc_unlocked" = yes
15548then
Martin v. Löwis11437992002-04-12 09:54:03 +000015549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015551
15552fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015553
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015554# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015555# save the value of LIBS so we don't actually link Python with readline
15556LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015557
Gregory P. Smith18820942008-09-07 06:24:49 +000015558# On some systems we need to link readline to a termcap compatible
15559# library. NOTE: Keep the precedence of listed libraries synchronised
15560# with setup.py.
15561py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15563$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015564for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015565 if test -z "$py_libtermcap"; then
15566 READLINE_LIBS="-lreadline"
15567 else
15568 READLINE_LIBS="-lreadline -l$py_libtermcap"
15569 fi
15570 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015572/* end confdefs.h. */
15573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574/* Override any GCC internal prototype to avoid an error.
15575 Use char because int might match the return type of a GCC
15576 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015577#ifdef __cplusplus
15578extern "C"
15579#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015580char readline ();
15581int
15582main ()
15583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015585 ;
15586 return 0;
15587}
15588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015589if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015590 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015592rm -f core conftest.err conftest.$ac_objext \
15593 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015594 if test $py_cv_lib_readline = yes; then
15595 break
15596 fi
15597done
15598# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15599#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015600if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15602$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015603else
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15605$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015608
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015609fi
15610
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015611# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015613/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015614#include <readline/readline.h>
15615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015616if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015617 have_readline=yes
15618else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015619 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015620
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015621fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015622rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015623if test $have_readline = yes
15624then
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015626/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015627#include <readline/readline.h>
15628
15629_ACEOF
15630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015634
15635fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015636rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015639/* end confdefs.h. */
15640#include <readline/readline.h>
15641
15642_ACEOF
15643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015645
Matthias Kloseb9621712010-04-24 17:59:49 +000015646$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015647
15648fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015649rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015650
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015651fi
15652
Martin v. Löwis0daad592001-09-30 21:09:59 +000015653# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15655$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015656if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015658else
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015660LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664/* Override any GCC internal prototype to avoid an error.
15665 Use char because int might match the return type of a GCC
15666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015667#ifdef __cplusplus
15668extern "C"
15669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015670char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015671int
15672main ()
15673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015674return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 ;
15676 return 0;
15677}
15678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015684rm -f core conftest.err conftest.$ac_objext \
15685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015686LIBS=$ac_check_lib_save_LIBS
15687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15689$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015690if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015691
Matthias Kloseb9621712010-04-24 17:59:49 +000015692$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015693
Martin v. Löwis0daad592001-09-30 21:09:59 +000015694fi
15695
Michael W. Hudson54241132001-12-07 15:38:26 +000015696
Thomas Wouters89d996e2007-09-08 17:39:28 +000015697# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15699$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015700if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015701 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015702else
15703 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015704LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015706/* end confdefs.h. */
15707
15708/* Override any GCC internal prototype to avoid an error.
15709 Use char because int might match the return type of a GCC
15710 builtin and then its argument prototype would still apply. */
15711#ifdef __cplusplus
15712extern "C"
15713#endif
15714char rl_completion_display_matches_hook ();
15715int
15716main ()
15717{
15718return rl_completion_display_matches_hook ();
15719 ;
15720 return 0;
15721}
15722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015723if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015724 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15725else
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015728rm -f core conftest.err conftest.$ac_objext \
15729 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015730LIBS=$ac_check_lib_save_LIBS
15731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15733$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015734if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015737
15738fi
15739
15740
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015741# also in 4.0, but not in editline
15742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15743$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15744if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15745 $as_echo_n "(cached) " >&6
15746else
15747 ac_check_lib_save_LIBS=$LIBS
15748LIBS="-lreadline $READLINE_LIBS $LIBS"
15749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15750/* end confdefs.h. */
15751
15752/* Override any GCC internal prototype to avoid an error.
15753 Use char because int might match the return type of a GCC
15754 builtin and then its argument prototype would still apply. */
15755#ifdef __cplusplus
15756extern "C"
15757#endif
15758char rl_resize_terminal ();
15759int
15760main ()
15761{
15762return rl_resize_terminal ();
15763 ;
15764 return 0;
15765}
15766_ACEOF
15767if ac_fn_c_try_link "$LINENO"; then :
15768 ac_cv_lib_readline_rl_resize_terminal=yes
15769else
15770 ac_cv_lib_readline_rl_resize_terminal=no
15771fi
15772rm -f core conftest.err conftest.$ac_objext \
15773 conftest$ac_exeext conftest.$ac_ext
15774LIBS=$ac_check_lib_save_LIBS
15775fi
15776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15777$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15778if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15779
15780$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15781
15782fi
15783
15784
Martin v. Löwis0daad592001-09-30 21:09:59 +000015785# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15787$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015788if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015790else
Martin v. Löwis11437992002-04-12 09:54:03 +000015791 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015792LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796/* Override any GCC internal prototype to avoid an error.
15797 Use char because int might match the return type of a GCC
15798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015799#ifdef __cplusplus
15800extern "C"
15801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015802char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015803int
15804main ()
15805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 ;
15808 return 0;
15809}
15810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015813else
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015816rm -f core conftest.err conftest.$ac_objext \
15817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015818LIBS=$ac_check_lib_save_LIBS
15819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15821$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015822if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015823
Matthias Kloseb9621712010-04-24 17:59:49 +000015824$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015825
Guido van Rossum353ae582001-07-10 16:45:32 +000015826fi
15827
Jack Jansendd19cf82001-12-06 22:36:17 +000015828
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015829# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015831/* end confdefs.h. */
15832#include <readline/readline.h>
15833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015834if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015835 have_readline=yes
15836else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015837 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015838
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015839fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015840rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015841if test $have_readline = yes
15842then
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015844/* end confdefs.h. */
15845#include <readline/readline.h>
15846
15847_ACEOF
15848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015852
15853fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015854rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015855
15856fi
15857
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15859$as_echo_n "checking for append_history in -lreadline... " >&6; }
15860if ${ac_cv_lib_readline_append_history+:} false; then :
15861 $as_echo_n "(cached) " >&6
15862else
15863 ac_check_lib_save_LIBS=$LIBS
15864LIBS="-lreadline $READLINE_LIBS $LIBS"
15865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866/* end confdefs.h. */
15867
15868/* Override any GCC internal prototype to avoid an error.
15869 Use char because int might match the return type of a GCC
15870 builtin and then its argument prototype would still apply. */
15871#ifdef __cplusplus
15872extern "C"
15873#endif
15874char append_history ();
15875int
15876main ()
15877{
15878return append_history ();
15879 ;
15880 return 0;
15881}
15882_ACEOF
15883if ac_fn_c_try_link "$LINENO"; then :
15884 ac_cv_lib_readline_append_history=yes
15885else
15886 ac_cv_lib_readline_append_history=no
15887fi
15888rm -f core conftest.err conftest.$ac_objext \
15889 conftest$ac_exeext conftest.$ac_ext
15890LIBS=$ac_check_lib_save_LIBS
15891fi
15892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15893$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15894if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15895
15896$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15897
15898fi
15899
15900
Martin v. Löwis82bca632006-02-10 20:49:30 +000015901# End of readline checks: restore LIBS
15902LIBS=$LIBS_no_readline
15903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15905$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015906if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015907 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015908else
Martin v. Löwis11437992002-04-12 09:54:03 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015911 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015912else
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015914/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015915
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015916#include <stdlib.h>
15917#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015918int main()
15919{
15920 int val1 = nice(1);
15921 if (val1 != -1 && val1 == nice(2))
15922 exit(0);
15923 exit(1);
15924}
15925
Martin v. Löwis11437992002-04-12 09:54:03 +000015926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015927if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015928 ac_cv_broken_nice=yes
15929else
Matthias Kloseb9621712010-04-24 17:59:49 +000015930 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015934fi
15935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936fi
15937
Matthias Kloseb9621712010-04-24 17:59:49 +000015938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15939$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015940if test "$ac_cv_broken_nice" = yes
15941then
Martin v. Löwis11437992002-04-12 09:54:03 +000015942
Matthias Kloseb9621712010-04-24 17:59:49 +000015943$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015944
15945fi
15946
Matthias Kloseb9621712010-04-24 17:59:49 +000015947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15948$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015949if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015950 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015951else
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015953 ac_cv_broken_poll=no
15954else
Matthias Kloseb9621712010-04-24 17:59:49 +000015955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015956/* end confdefs.h. */
15957
15958#include <poll.h>
15959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015960int main()
15961{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015962 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015963 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015964
15965 close (42);
15966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015967 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015968 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015969 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015970 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015971 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015972 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015973 return 1;
15974}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015975
15976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015977if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015978 ac_cv_broken_poll=yes
15979else
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15983 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015986fi
15987
Matthias Kloseb9621712010-04-24 17:59:49 +000015988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15989$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015990if test "$ac_cv_broken_poll" = yes
15991then
15992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015994
15995fi
15996
Martin v. Löwis1d459062005-03-14 21:23:33 +000015997# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15999$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016000if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016001 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016002else
16003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016005 ac_cv_working_tzset=no
16006else
Matthias Kloseb9621712010-04-24 17:59:49 +000016007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016008/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016009
16010#include <stdlib.h>
16011#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000016012#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000016013
16014#if HAVE_TZNAME
16015extern char *tzname[];
16016#endif
16017
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016018int main()
16019{
Brett Cannon18367812003-09-19 00:59:16 +000016020 /* Note that we need to ensure that not only does tzset(3)
16021 do 'something' with localtime, but it works as documented
16022 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000016023 This includes making sure that tzname is set properly if
16024 tm->tm_zone does not exist since it is the alternative way
16025 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000016026
16027 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000016028 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000016029 */
16030
Martin v. Löwis1d459062005-03-14 21:23:33 +000016031 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000016032 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
16033
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016034 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016035 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016036 if (localtime(&groundhogday)->tm_hour != 0)
16037 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016038#if HAVE_TZNAME
16039 /* For UTC, tzname[1] is sometimes "", sometimes " " */
16040 if (strcmp(tzname[0], "UTC") ||
16041 (tzname[1][0] != 0 && tzname[1][0] != ' '))
16042 exit(1);
16043#endif
Brett Cannon18367812003-09-19 00:59:16 +000016044
Neal Norwitz7f2588c2003-04-11 15:35:53 +000016045 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016046 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000016047 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016048 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016049#if HAVE_TZNAME
16050 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
16051 exit(1);
16052#endif
Brett Cannon18367812003-09-19 00:59:16 +000016053
16054 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
16055 tzset();
16056 if (localtime(&groundhogday)->tm_hour != 11)
16057 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016058#if HAVE_TZNAME
16059 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
16060 exit(1);
16061#endif
16062
16063#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000016064 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
16065 exit(1);
16066 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
16067 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000016068#endif
Brett Cannon18367812003-09-19 00:59:16 +000016069
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016070 exit(0);
16071}
16072
16073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016074if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016075 ac_cv_working_tzset=yes
16076else
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016081fi
16082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016083fi
16084
Matthias Kloseb9621712010-04-24 17:59:49 +000016085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
16086$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016087if test "$ac_cv_working_tzset" = yes
16088then
16089
Matthias Kloseb9621712010-04-24 17:59:49 +000016090$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000016091
16092fi
16093
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016094# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16096$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016097if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016098 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016099else
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016101/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016102#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016103int
16104main ()
16105{
16106
16107struct stat st;
16108st.st_mtim.tv_nsec = 1;
16109
16110 ;
16111 return 0;
16112}
16113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016114if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016115 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016116else
Matthias Kloseb9621712010-04-24 17:59:49 +000016117 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16120fi
16121
Matthias Kloseb9621712010-04-24 17:59:49 +000016122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16123$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016124if test "$ac_cv_stat_tv_nsec" = yes
16125then
16126
Matthias Kloseb9621712010-04-24 17:59:49 +000016127$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016128
16129fi
16130
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016131# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16133$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016134if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016135 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016136else
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016138/* end confdefs.h. */
16139#include <sys/stat.h>
16140int
16141main ()
16142{
16143
16144struct stat st;
16145st.st_mtimespec.tv_nsec = 1;
16146
16147 ;
16148 return 0;
16149}
16150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016152 ac_cv_stat_tv_nsec2=yes
16153else
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16157fi
16158
Matthias Kloseb9621712010-04-24 17:59:49 +000016159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16160$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016161if test "$ac_cv_stat_tv_nsec2" = yes
16162then
16163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016165
16166fi
16167
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016168# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016169ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016170if test "$cross_compiling" = no; then
16171 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16172fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016173
16174for ac_header in curses.h ncurses.h
16175do :
16176 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16177ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16178if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16179 cat >>confdefs.h <<_ACEOF
16180#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16181_ACEOF
16182
16183fi
16184
16185done
16186
16187
16188# On Solaris, term.h requires curses.h
16189for ac_header in term.h
16190do :
16191 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16192#ifdef HAVE_CURSES_H
16193#include <curses.h>
16194#endif
16195
16196"
16197if test "x$ac_cv_header_term_h" = xyes; then :
16198 cat >>confdefs.h <<_ACEOF
16199#define HAVE_TERM_H 1
16200_ACEOF
16201
16202fi
16203
16204done
16205
16206
Jack Jansen666b1e72001-10-31 12:11:48 +000016207# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16209$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016210if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016211 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016212else
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016214/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016215#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016216int
16217main ()
16218{
Jack Jansen666b1e72001-10-31 12:11:48 +000016219
16220 int rtn;
16221 rtn = mvwdelch(0,0,0);
16222
Martin v. Löwis11437992002-04-12 09:54:03 +000016223 ;
16224 return 0;
16225}
16226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016227if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016228 ac_cv_mvwdelch_is_expression=yes
16229else
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16233fi
16234
Matthias Kloseb9621712010-04-24 17:59:49 +000016235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16236$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016237
16238if test "$ac_cv_mvwdelch_is_expression" = yes
16239then
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
Matthias Kloseb9621712010-04-24 17:59:49 +000016241$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016242
16243fi
16244
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016245# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16246# structs since version 5.7. If the macro is defined as zero before including
16247# [n]curses.h, ncurses will expose fields of the structs regardless of the
16248# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16250$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016251if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016252 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016253else
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016255/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016256
16257 #define NCURSES_OPAQUE 0
16258 #include <curses.h>
16259
Martin v. Löwis11437992002-04-12 09:54:03 +000016260int
16261main ()
16262{
Jack Jansen666b1e72001-10-31 12:11:48 +000016263
16264 WINDOW *w;
16265 w->_flags = 0;
16266
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 ;
16268 return 0;
16269}
16270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016271if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016272 ac_cv_window_has_flags=yes
16273else
Matthias Kloseb9621712010-04-24 17:59:49 +000016274 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16277fi
16278
Matthias Kloseb9621712010-04-24 17:59:49 +000016279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16280$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016281
Jack Jansen666b1e72001-10-31 12:11:48 +000016282
16283if test "$ac_cv_window_has_flags" = yes
16284then
Martin v. Löwis11437992002-04-12 09:54:03 +000016285
Matthias Kloseb9621712010-04-24 17:59:49 +000016286$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016287
16288fi
16289
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16291$as_echo_n "checking for is_pad... " >&6; }
16292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16293/* end confdefs.h. */
16294#include <curses.h>
16295int
16296main ()
16297{
16298
16299#ifndef is_pad
16300void *x=is_pad
16301#endif
16302
16303 ;
16304 return 0;
16305}
16306_ACEOF
16307if ac_fn_c_try_compile "$LINENO"; then :
16308
16309$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16310
16311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16312$as_echo "yes" >&6; }
16313else
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16315$as_echo "no" >&6; }
16316
16317fi
16318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16319
Matthias Kloseb9621712010-04-24 17:59:49 +000016320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16321$as_echo_n "checking for is_term_resized... " >&6; }
16322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016323/* end confdefs.h. */
16324#include <curses.h>
16325int
16326main ()
16327{
16328void *x=is_term_resized
16329 ;
16330 return 0;
16331}
16332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016334
Matthias Kloseb9621712010-04-24 17:59:49 +000016335$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016336
Matthias Kloseb159a552010-04-25 21:00:44 +000016337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016338$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016339else
Matthias Kloseb9621712010-04-24 17:59:49 +000016340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16341$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016342
16343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16345
Matthias Kloseb9621712010-04-24 17:59:49 +000016346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16347$as_echo_n "checking for resize_term... " >&6; }
16348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016349/* end confdefs.h. */
16350#include <curses.h>
16351int
16352main ()
16353{
16354void *x=resize_term
16355 ;
16356 return 0;
16357}
16358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016359if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016360
Matthias Kloseb9621712010-04-24 17:59:49 +000016361$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016362
Matthias Kloseb159a552010-04-25 21:00:44 +000016363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016364$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016365else
Matthias Kloseb9621712010-04-24 17:59:49 +000016366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16367$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016368
16369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16371
Matthias Kloseb9621712010-04-24 17:59:49 +000016372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16373$as_echo_n "checking for resizeterm... " >&6; }
16374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016375/* end confdefs.h. */
16376#include <curses.h>
16377int
16378main ()
16379{
16380void *x=resizeterm
16381 ;
16382 return 0;
16383}
16384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016385if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016386
Matthias Kloseb9621712010-04-24 17:59:49 +000016387$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016388
Matthias Kloseb159a552010-04-25 21:00:44 +000016389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016390$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016391else
Matthias Kloseb9621712010-04-24 17:59:49 +000016392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16393$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016394
16395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016397
16398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16399$as_echo_n "checking for immedok... " >&6; }
16400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16401/* end confdefs.h. */
16402#include <curses.h>
16403int
16404main ()
16405{
16406
16407#ifndef immedok
16408void *x=immedok
16409#endif
16410
16411 ;
16412 return 0;
16413}
16414_ACEOF
16415if ac_fn_c_try_compile "$LINENO"; then :
16416
16417$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16418
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16420$as_echo "yes" >&6; }
16421else
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16423$as_echo "no" >&6; }
16424
16425fi
16426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16427
16428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16429$as_echo_n "checking for syncok... " >&6; }
16430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431/* end confdefs.h. */
16432#include <curses.h>
16433int
16434main ()
16435{
16436
16437#ifndef syncok
16438void *x=syncok
16439#endif
16440
16441 ;
16442 return 0;
16443}
16444_ACEOF
16445if ac_fn_c_try_compile "$LINENO"; then :
16446
16447$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16448
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16450$as_echo "yes" >&6; }
16451else
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16453$as_echo "no" >&6; }
16454
16455fi
16456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16457
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16459$as_echo_n "checking for wchgat... " >&6; }
16460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16461/* end confdefs.h. */
16462#include <curses.h>
16463int
16464main ()
16465{
16466
16467#ifndef wchgat
16468void *x=wchgat
16469#endif
16470
16471 ;
16472 return 0;
16473}
16474_ACEOF
16475if ac_fn_c_try_compile "$LINENO"; then :
16476
16477$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16478
16479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16480$as_echo "yes" >&6; }
16481else
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16483$as_echo "no" >&6; }
16484
16485fi
16486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16487
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16489$as_echo_n "checking for filter... " >&6; }
16490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16491/* end confdefs.h. */
16492#include <curses.h>
16493int
16494main ()
16495{
16496
16497#ifndef filter
16498void *x=filter
16499#endif
16500
16501 ;
16502 return 0;
16503}
16504_ACEOF
16505if ac_fn_c_try_compile "$LINENO"; then :
16506
16507$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16508
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16510$as_echo "yes" >&6; }
16511else
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16513$as_echo "no" >&6; }
16514
16515fi
16516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16517
16518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16519$as_echo_n "checking for has_key... " >&6; }
16520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16521/* end confdefs.h. */
16522#include <curses.h>
16523int
16524main ()
16525{
16526
16527#ifndef has_key
16528void *x=has_key
16529#endif
16530
16531 ;
16532 return 0;
16533}
16534_ACEOF
16535if ac_fn_c_try_compile "$LINENO"; then :
16536
16537$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16538
16539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16540$as_echo "yes" >&6; }
16541else
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16543$as_echo "no" >&6; }
16544
16545fi
16546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16547
16548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16549$as_echo_n "checking for typeahead... " >&6; }
16550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16551/* end confdefs.h. */
16552#include <curses.h>
16553int
16554main ()
16555{
16556
16557#ifndef typeahead
16558void *x=typeahead
16559#endif
16560
16561 ;
16562 return 0;
16563}
16564_ACEOF
16565if ac_fn_c_try_compile "$LINENO"; then :
16566
16567$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16568
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16570$as_echo "yes" >&6; }
16571else
16572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16573$as_echo "no" >&6; }
16574
16575fi
16576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16577
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16579$as_echo_n "checking for use_env... " >&6; }
16580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16581/* end confdefs.h. */
16582#include <curses.h>
16583int
16584main ()
16585{
16586
16587#ifndef use_env
16588void *x=use_env
16589#endif
16590
16591 ;
16592 return 0;
16593}
16594_ACEOF
16595if ac_fn_c_try_compile "$LINENO"; then :
16596
16597$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16598
16599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16600$as_echo "yes" >&6; }
16601else
16602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16603$as_echo "no" >&6; }
16604
16605fi
16606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016607# last curses configure check
16608CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16611$as_echo "$as_me: checking for device files" >&6;}
16612
16613if test "x$cross_compiling" = xyes; then
16614 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16616$as_echo_n "checking for /dev/ptmx... " >&6; }
16617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16618$as_echo "not set" >&6; }
16619 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16620 fi
16621 if test "${ac_cv_file__dev_ptc+set}" != set; then
16622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16623$as_echo_n "checking for /dev/ptc... " >&6; }
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16625$as_echo "not set" >&6; }
16626 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16627 fi
16628fi
16629
Matthias Kloseb9621712010-04-24 17:59:49 +000016630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16631$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016632if ${ac_cv_file__dev_ptmx+:} false; then :
16633 $as_echo_n "(cached) " >&6
16634else
16635 test "$cross_compiling" = yes &&
16636 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16637if test -r "/dev/ptmx"; then
16638 ac_cv_file__dev_ptmx=yes
16639else
16640 ac_cv_file__dev_ptmx=no
16641fi
16642fi
16643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16644$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16645if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016646
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016647fi
16648
16649if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016650
Matthias Kloseb9621712010-04-24 17:59:49 +000016651$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016652
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16655$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016656if ${ac_cv_file__dev_ptc+:} false; then :
16657 $as_echo_n "(cached) " >&6
16658else
16659 test "$cross_compiling" = yes &&
16660 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16661if test -r "/dev/ptc"; then
16662 ac_cv_file__dev_ptc=yes
16663else
16664 ac_cv_file__dev_ptc=no
16665fi
16666fi
16667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16668$as_echo "$ac_cv_file__dev_ptc" >&6; }
16669if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016670
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016671fi
16672
16673if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016676
Neal Norwitz865400f2003-03-21 01:42:58 +000016677fi
16678
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016679if test $ac_sys_system = Darwin
16680then
16681 LIBS="$LIBS -framework CoreFoundation"
16682fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016683
Matthias Kloseb9621712010-04-24 17:59:49 +000016684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16685$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016686if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016687 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016688else
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016690 ac_cv_have_size_t_format="cross -- assuming yes"
16691
Thomas Wouters477c8d52006-05-27 19:21:47 +000016692else
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016694/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016695
Thomas Wouters477c8d52006-05-27 19:21:47 +000016696#include <stdio.h>
16697#include <stddef.h>
16698#include <string.h>
16699
Christian Heimes2c181612007-12-17 20:04:13 +000016700#ifdef HAVE_SYS_TYPES_H
16701#include <sys/types.h>
16702#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016703
16704#ifdef HAVE_SSIZE_T
16705typedef ssize_t Py_ssize_t;
16706#elif SIZEOF_VOID_P == SIZEOF_LONG
16707typedef long Py_ssize_t;
16708#else
16709typedef int Py_ssize_t;
16710#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016711
Christian Heimes2c181612007-12-17 20:04:13 +000016712int main()
16713{
16714 char buffer[256];
16715
Thomas Wouters477c8d52006-05-27 19:21:47 +000016716 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16717 return 1;
16718
Thomas Wouters89f507f2006-12-13 04:49:30 +000016719 if (strcmp(buffer, "123"))
16720 return 1;
16721
16722 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16723 return 1;
16724
16725 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016726 return 1;
16727
16728 return 0;
16729}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016730
Thomas Wouters477c8d52006-05-27 19:21:47 +000016731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016733 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016734else
Matthias Kloseb9621712010-04-24 17:59:49 +000016735 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016739fi
16740
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16743$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016744if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016745
Matthias Kloseb9621712010-04-24 17:59:49 +000016746$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016747
16748fi
16749
Matthias Kloseb9621712010-04-24 17:59:49 +000016750ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016751#ifdef HAVE_SYS_TYPES_H
16752#include <sys/types.h>
16753#endif
16754#ifdef HAVE_SYS_SOCKET_H
16755#include <sys/socket.h>
16756#endif
16757
Matthias Kloseb9621712010-04-24 17:59:49 +000016758"
Victor Stinnere0be4232011-10-25 13:06:09 +020016759if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016762
Matthias Kloseb9621712010-04-24 17:59:49 +000016763$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016764
16765fi
16766
Michael W. Hudson54241132001-12-07 15:38:26 +000016767
Matthias Kloseb9621712010-04-24 17:59:49 +000016768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16769$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016770if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016772else
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016774 ac_cv_broken_mbstowcs=no
16775else
Matthias Kloseb9621712010-04-24 17:59:49 +000016776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016777/* end confdefs.h. */
16778
Stefan Krah19c21392012-11-22 23:47:32 +010016779#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016780#include<stdlib.h>
16781int main() {
16782 size_t len = -1;
16783 const char *str = "text";
16784 len = mbstowcs(NULL, str, 0);
16785 return (len != 4);
16786}
16787
16788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016789if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016790 ac_cv_broken_mbstowcs=no
16791else
Matthias Kloseb9621712010-04-24 17:59:49 +000016792 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016796fi
16797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016798fi
16799
Matthias Kloseb9621712010-04-24 17:59:49 +000016800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16801$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016802if test "$ac_cv_broken_mbstowcs" = yes
16803then
16804
Matthias Kloseb9621712010-04-24 17:59:49 +000016805$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016806
16807fi
16808
Antoine Pitroub52ec782009-01-25 16:34:23 +000016809# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16811$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016812
16813# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016814if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016815 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016816if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016817then
16818
Matthias Kloseb9621712010-04-24 17:59:49 +000016819$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016820
Matthias Kloseb9621712010-04-24 17:59:49 +000016821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16822$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016823fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016824if test "$withval" = no
16825then
16826
16827$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16828
Matthias Kloseb9621712010-04-24 17:59:49 +000016829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16830$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016831fi
16832
Antoine Pitrou042b1282010-08-13 21:15:58 +000016833else
16834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16835$as_echo "no value specified" >&6; }
16836fi
16837
Antoine Pitroub52ec782009-01-25 16:34:23 +000016838
Matthias Kloseb17289e2012-03-15 19:51:34 +010016839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16840$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16841if ${ac_cv_computed_gotos+:} false; then :
16842 $as_echo_n "(cached) " >&6
16843else
16844 if test "$cross_compiling" = yes; then :
16845 if test "${with_computed_gotos+set}" = set; then
16846 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16847 else
16848 ac_cv_computed_gotos=no
16849 fi
16850else
16851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16852/* end confdefs.h. */
16853
16854int main(int argc, char **argv)
16855{
16856 static void *targets[1] = { &&LABEL1 };
16857 goto LABEL2;
16858LABEL1:
16859 return 0;
16860LABEL2:
16861 goto *targets[0];
16862 return 1;
16863}
16864
16865_ACEOF
16866if ac_fn_c_try_run "$LINENO"; then :
16867 ac_cv_computed_gotos=yes
16868else
16869 ac_cv_computed_gotos=no
16870fi
16871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16872 conftest.$ac_objext conftest.beam conftest.$ac_ext
16873fi
16874
16875fi
16876
16877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16878$as_echo "$ac_cv_computed_gotos" >&6; }
16879case "$ac_cv_computed_gotos" in yes*)
16880
16881$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16882
16883esac
16884
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016885case $ac_sys_system in
16886AIX*)
16887
16888$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16889 ;;
16890esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016891
Michael W. Hudson54241132001-12-07 15:38:26 +000016892
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016893
16894
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016895for h in `(cd $srcdir;echo Python/thread_*.h)`
16896do
16897 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16898done
16899
Michael W. Hudson54241132001-12-07 15:38:26 +000016900
Ned Deily8d02f912020-06-25 10:46:44 -040016901SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16903$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016904for dir in $SRCDIRS; do
16905 if test ! -d $dir; then
16906 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016907 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016908done
Matthias Kloseb9621712010-04-24 17:59:49 +000016909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16910$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016911
Stefan Krah1919b7e2012-03-21 18:25:23 +010016912# Availability of -O2:
16913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16914$as_echo_n "checking for -O2... " >&6; }
16915saved_cflags="$CFLAGS"
16916CFLAGS="-O2"
16917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16918/* end confdefs.h. */
16919
16920int
16921main ()
16922{
16923
16924
16925 ;
16926 return 0;
16927}
16928_ACEOF
16929if ac_fn_c_try_compile "$LINENO"; then :
16930 have_O2=yes
16931else
16932 have_O2=no
16933fi
16934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16936$as_echo "$have_O2" >&6; }
16937CFLAGS="$saved_cflags"
16938
16939# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16940# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16942$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16943saved_cflags="$CFLAGS"
16944CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16945if test "$have_O2" = no; then
16946 CFLAGS=""
16947fi
16948if test "$cross_compiling" = yes; then :
16949 have_glibc_memmove_bug=undefined
16950else
16951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16952/* end confdefs.h. */
16953
16954#include <stdio.h>
16955#include <stdlib.h>
16956#include <string.h>
16957void foo(void *p, void *q) { memmove(p, q, 19); }
16958int main() {
16959 char a[32] = "123456789000000000";
16960 foo(&a[9], a);
16961 if (strcmp(a, "123456789123456789000000000") != 0)
16962 return 1;
16963 foo(a, &a[9]);
16964 if (strcmp(a, "123456789000000000") != 0)
16965 return 1;
16966 return 0;
16967}
16968
16969_ACEOF
16970if ac_fn_c_try_run "$LINENO"; then :
16971 have_glibc_memmove_bug=no
16972else
16973 have_glibc_memmove_bug=yes
16974fi
16975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16976 conftest.$ac_objext conftest.beam conftest.$ac_ext
16977fi
16978
16979CFLAGS="$saved_cflags"
16980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16981$as_echo "$have_glibc_memmove_bug" >&6; }
16982if test "$have_glibc_memmove_bug" = yes; then
16983
16984$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16985
16986fi
16987
16988if test "$have_gcc_asm_for_x87" = yes; then
16989 # Some versions of gcc miscompile inline asm:
16990 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16991 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16992 case $CC in
16993 *gcc*)
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16995$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16996 saved_cflags="$CFLAGS"
16997 CFLAGS="-O2"
16998 if test "$cross_compiling" = yes; then :
16999 have_ipa_pure_const_bug=undefined
17000else
17001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17002/* end confdefs.h. */
17003
17004 __attribute__((noinline)) int
17005 foo(int *p) {
17006 int r;
17007 asm ( "movl \$6, (%1)\n\t"
17008 "xorl %0, %0\n\t"
17009 : "=r" (r) : "r" (p) : "memory"
17010 );
17011 return r;
17012 }
17013 int main() {
17014 int p = 8;
17015 if ((foo(&p) ? : p) != 6)
17016 return 1;
17017 return 0;
17018 }
17019
17020_ACEOF
17021if ac_fn_c_try_run "$LINENO"; then :
17022 have_ipa_pure_const_bug=no
17023else
17024 have_ipa_pure_const_bug=yes
17025fi
17026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17027 conftest.$ac_objext conftest.beam conftest.$ac_ext
17028fi
17029
17030 CFLAGS="$saved_cflags"
17031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
17032$as_echo "$have_ipa_pure_const_bug" >&6; }
17033 if test "$have_ipa_pure_const_bug" = yes; then
17034
17035$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
17036
17037 fi
17038 ;;
17039 esac
17040fi
17041
Victor Stinner4f5366e2015-01-09 02:13:19 +010017042# Check for stdatomic.h
17043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
17044$as_echo_n "checking for stdatomic.h... " >&6; }
17045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17046/* end confdefs.h. */
17047
17048
17049 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020017050 atomic_int int_var;
17051 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010017052 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020017053 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
17054 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
17055 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010017056 return 0;
17057 }
17058
17059
17060_ACEOF
17061if ac_fn_c_try_link "$LINENO"; then :
17062 have_stdatomic_h=yes
17063else
17064 have_stdatomic_h=no
17065fi
17066rm -f core conftest.err conftest.$ac_objext \
17067 conftest$ac_exeext conftest.$ac_ext
17068
17069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
17070$as_echo "$have_stdatomic_h" >&6; }
17071
17072if test "$have_stdatomic_h" = yes; then
17073
17074$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
17075
17076fi
17077
17078# Check for GCC >= 4.7 __atomic builtins
17079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
17080$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
17081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082/* end confdefs.h. */
17083
17084
17085 volatile int val = 1;
17086 int main() {
17087 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
17088 return 0;
17089 }
17090
17091
17092_ACEOF
17093if ac_fn_c_try_link "$LINENO"; then :
17094 have_builtin_atomic=yes
17095else
17096 have_builtin_atomic=no
17097fi
17098rm -f core conftest.err conftest.$ac_objext \
17099 conftest$ac_exeext conftest.$ac_ext
17100
17101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17102$as_echo "$have_builtin_atomic" >&6; }
17103
17104if test "$have_builtin_atomic" = yes; then
17105
17106$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17107
17108fi
17109
Ned Deily322f5ba2013-11-21 23:01:59 -080017110# ensurepip option
17111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17112$as_echo_n "checking for ensurepip... " >&6; }
17113
17114# Check whether --with-ensurepip was given.
17115if test "${with_ensurepip+set}" = set; then :
17116 withval=$with_ensurepip;
17117else
17118 with_ensurepip=upgrade
17119fi
17120
17121case $with_ensurepip in #(
17122 yes|upgrade) :
17123 ENSUREPIP=upgrade ;; #(
17124 install) :
17125 ENSUREPIP=install ;; #(
17126 no) :
17127 ENSUREPIP=no ;; #(
17128 *) :
17129 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17130esac
17131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17132$as_echo "$ENSUREPIP" >&6; }
17133
17134
Victor Stinner35a97c02015-03-08 02:59:09 +010017135# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17137$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17139/* end confdefs.h. */
17140
17141
17142 #include <dirent.h>
17143
17144 int main() {
17145 struct dirent entry;
17146 return entry.d_type == DT_UNKNOWN;
17147 }
17148
17149
17150_ACEOF
17151if ac_fn_c_try_link "$LINENO"; then :
17152 have_dirent_d_type=yes
17153else
17154 have_dirent_d_type=no
17155fi
17156rm -f core conftest.err conftest.$ac_objext \
17157 conftest$ac_exeext conftest.$ac_ext
17158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17159$as_echo "$have_dirent_d_type" >&6; }
17160
17161if test "$have_dirent_d_type" = yes; then
17162
17163$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17164
17165fi
17166
Victor Stinner9eb57c52015-03-19 22:21:49 +010017167# check if the Linux getrandom() syscall is available
17168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17169$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17171/* end confdefs.h. */
17172
17173
Victor Stinner1b80b242016-04-12 22:34:58 +020017174 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017175 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017176 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017177
17178 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017179 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017180 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017181 const int flags = GRND_NONBLOCK;
17182 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017183 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017184 return 0;
17185 }
17186
17187
17188_ACEOF
17189if ac_fn_c_try_link "$LINENO"; then :
17190 have_getrandom_syscall=yes
17191else
17192 have_getrandom_syscall=no
17193fi
17194rm -f core conftest.err conftest.$ac_objext \
17195 conftest$ac_exeext conftest.$ac_ext
17196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17197$as_echo "$have_getrandom_syscall" >&6; }
17198
17199if test "$have_getrandom_syscall" = yes; then
17200
17201$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17202
17203fi
17204
Victor Stinner3abf44e2015-09-18 15:38:37 +020017205# check if the getrandom() function is available
17206# the test was written for the Solaris function of <sys/random.h>
17207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17208$as_echo_n "checking for the getrandom() function... " >&6; }
17209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17210/* end confdefs.h. */
17211
17212
17213 #include <sys/random.h>
17214
17215 int main() {
17216 char buffer[1];
17217 const size_t buflen = sizeof(buffer);
17218 const int flags = 0;
17219 /* ignore the result, Python checks for ENOSYS at runtime */
17220 (void)getrandom(buffer, buflen, flags);
17221 return 0;
17222 }
17223
17224
17225_ACEOF
17226if ac_fn_c_try_link "$LINENO"; then :
17227 have_getrandom=yes
17228else
17229 have_getrandom=no
17230fi
17231rm -f core conftest.err conftest.$ac_objext \
17232 conftest$ac_exeext conftest.$ac_ext
17233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17234$as_echo "$have_getrandom" >&6; }
17235
17236if test "$have_getrandom" = yes; then
17237
17238$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17239
17240fi
17241
Neil Schemenauer5741c452019-02-08 10:48:46 -080017242# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17243# shm_* may only be available if linking against librt
17244save_LIBS="$LIBS"
17245save_includes_default="$ac_includes_default"
17246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17247$as_echo_n "checking for library containing shm_open... " >&6; }
17248if ${ac_cv_search_shm_open+:} false; then :
17249 $as_echo_n "(cached) " >&6
17250else
17251 ac_func_search_save_LIBS=$LIBS
17252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17253/* end confdefs.h. */
17254
17255/* Override any GCC internal prototype to avoid an error.
17256 Use char because int might match the return type of a GCC
17257 builtin and then its argument prototype would still apply. */
17258#ifdef __cplusplus
17259extern "C"
17260#endif
17261char shm_open ();
17262int
17263main ()
17264{
17265return shm_open ();
17266 ;
17267 return 0;
17268}
17269_ACEOF
17270for ac_lib in '' rt; do
17271 if test -z "$ac_lib"; then
17272 ac_res="none required"
17273 else
17274 ac_res=-l$ac_lib
17275 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17276 fi
17277 if ac_fn_c_try_link "$LINENO"; then :
17278 ac_cv_search_shm_open=$ac_res
17279fi
17280rm -f core conftest.err conftest.$ac_objext \
17281 conftest$ac_exeext
17282 if ${ac_cv_search_shm_open+:} false; then :
17283 break
17284fi
17285done
17286if ${ac_cv_search_shm_open+:} false; then :
17287
17288else
17289 ac_cv_search_shm_open=no
17290fi
17291rm conftest.$ac_ext
17292LIBS=$ac_func_search_save_LIBS
17293fi
17294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17295$as_echo "$ac_cv_search_shm_open" >&6; }
17296ac_res=$ac_cv_search_shm_open
17297if test "$ac_res" != no; then :
17298 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17299
17300fi
17301
17302if test "$ac_cv_search_shm_open" = "-lrt"; then
17303
17304$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17305
17306fi
17307for ac_header in sys/mman.h
17308do :
17309 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17310if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17311 cat >>confdefs.h <<_ACEOF
17312#define HAVE_SYS_MMAN_H 1
17313_ACEOF
17314
17315fi
17316
17317done
17318
17319# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17320ac_includes_default="\
17321${ac_includes_default}
17322#ifndef __cplusplus
17323# ifdef HAVE_SYS_MMAN_H
17324# include <sys/mman.h>
17325# endif
17326#endif
17327"
17328for ac_func in shm_open shm_unlink
17329do :
17330 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17331ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17332if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17333 cat >>confdefs.h <<_ACEOF
17334#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17335_ACEOF
17336
17337fi
17338done
17339
17340# we don't want to link with librt always, restore LIBS
17341LIBS="$save_LIBS"
17342ac_includes_default="$save_includes_default"
17343
Christian Heimesff5be6e2018-01-20 13:19:21 +010017344# Check for usable OpenSSL
17345
17346 found=false
17347
17348# Check whether --with-openssl was given.
17349if test "${with_openssl+set}" = set; then :
17350 withval=$with_openssl;
17351 case "$withval" in
17352 "" | y | ye | yes | n | no)
17353 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17354 ;;
17355 *) ssldirs="$withval"
17356 ;;
17357 esac
17358
17359else
17360
17361 # if pkg-config is installed and openssl has installed a .pc file,
17362 # then use that information and don't search ssldirs
17363 if test -n "$ac_tool_prefix"; then
17364 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17365set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17367$as_echo_n "checking for $ac_word... " >&6; }
17368if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17369 $as_echo_n "(cached) " >&6
17370else
17371 if test -n "$PKG_CONFIG"; then
17372 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17373else
17374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17375for as_dir in $PATH
17376do
17377 IFS=$as_save_IFS
17378 test -z "$as_dir" && as_dir=.
17379 for ac_exec_ext in '' $ac_executable_extensions; do
17380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17381 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17383 break 2
17384 fi
17385done
17386 done
17387IFS=$as_save_IFS
17388
17389fi
17390fi
17391PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17392if test -n "$PKG_CONFIG"; then
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17394$as_echo "$PKG_CONFIG" >&6; }
17395else
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17397$as_echo "no" >&6; }
17398fi
17399
17400
17401fi
17402if test -z "$ac_cv_prog_PKG_CONFIG"; then
17403 ac_ct_PKG_CONFIG=$PKG_CONFIG
17404 # Extract the first word of "pkg-config", so it can be a program name with args.
17405set dummy pkg-config; ac_word=$2
17406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17407$as_echo_n "checking for $ac_word... " >&6; }
17408if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17409 $as_echo_n "(cached) " >&6
17410else
17411 if test -n "$ac_ct_PKG_CONFIG"; then
17412 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17413else
17414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17415for as_dir in $PATH
17416do
17417 IFS=$as_save_IFS
17418 test -z "$as_dir" && as_dir=.
17419 for ac_exec_ext in '' $ac_executable_extensions; do
17420 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17421 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17423 break 2
17424 fi
17425done
17426 done
17427IFS=$as_save_IFS
17428
17429fi
17430fi
17431ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17432if test -n "$ac_ct_PKG_CONFIG"; then
17433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17434$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17435else
17436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17437$as_echo "no" >&6; }
17438fi
17439
17440 if test "x$ac_ct_PKG_CONFIG" = x; then
17441 PKG_CONFIG=""
17442 else
17443 case $cross_compiling:$ac_tool_warned in
17444yes:)
17445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17447ac_tool_warned=yes ;;
17448esac
17449 PKG_CONFIG=$ac_ct_PKG_CONFIG
17450 fi
17451else
17452 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17453fi
17454
17455 if test x"$PKG_CONFIG" != x""; then
17456 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17457 if test $? = 0; then
17458 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17459 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17460 found=true
17461 fi
17462 fi
17463
17464 # no such luck; use some default ssldirs
17465 if ! $found; then
17466 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17467 fi
17468
17469
17470fi
17471
17472
17473
17474 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17475 # an 'openssl' subdirectory
17476
17477 if ! $found; then
17478 OPENSSL_INCLUDES=
17479 for ssldir in $ssldirs; do
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17481$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17482 if test -f "$ssldir/include/openssl/ssl.h"; then
17483 OPENSSL_INCLUDES="-I$ssldir/include"
17484 OPENSSL_LDFLAGS="-L$ssldir/lib"
17485 OPENSSL_LIBS="-lssl -lcrypto"
17486 found=true
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17488$as_echo "yes" >&6; }
17489 break
17490 else
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17492$as_echo "no" >&6; }
17493 fi
17494 done
17495
17496 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17497 # it will just work!
17498 fi
17499
17500 # try the preprocessor and linker with our new flags,
17501 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17502
17503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17504$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17505 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17506 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17507
17508 save_LIBS="$LIBS"
17509 save_LDFLAGS="$LDFLAGS"
17510 save_CPPFLAGS="$CPPFLAGS"
17511 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17512 LIBS="$OPENSSL_LIBS $LIBS"
17513 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17515/* end confdefs.h. */
17516#include <openssl/ssl.h>
17517int
17518main ()
17519{
17520SSL_new(NULL)
17521 ;
17522 return 0;
17523}
17524_ACEOF
17525if ac_fn_c_try_link "$LINENO"; then :
17526
17527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17528$as_echo "yes" >&6; }
17529 have_openssl=yes
17530
17531else
17532
17533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17534$as_echo "no" >&6; }
17535 have_openssl=no
17536
17537fi
17538rm -f core conftest.err conftest.$ac_objext \
17539 conftest$ac_exeext conftest.$ac_ext
17540 CPPFLAGS="$save_CPPFLAGS"
17541 LDFLAGS="$save_LDFLAGS"
17542 LIBS="$save_LIBS"
17543
17544
17545
17546
17547
17548
17549if test "$have_openssl" = yes; then
17550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17551$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17552
17553 save_LIBS="$LIBS"
17554 save_LDFLAGS="$LDFLAGS"
17555 save_CPPFLAGS="$CPPFLAGS"
17556 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17557 LIBS="$OPENSSL_LIBS $LIBS"
17558 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17559
17560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17561/* end confdefs.h. */
17562
17563 #include <openssl/x509_vfy.h>
17564
17565int
17566main ()
17567{
17568
17569 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17570 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17571 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17572 X509_VERIFY_PARAM_set_hostflags(p, 0);
17573
17574 ;
17575 return 0;
17576}
17577
17578_ACEOF
17579if ac_fn_c_try_link "$LINENO"; then :
17580
17581 ac_cv_has_x509_verify_param_set1_host=yes
17582
17583else
17584
17585 ac_cv_has_x509_verify_param_set1_host=no
17586
17587fi
17588rm -f core conftest.err conftest.$ac_objext \
17589 conftest$ac_exeext conftest.$ac_ext
17590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17591$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17592 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17593
17594$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17595
17596 fi
17597
17598 CPPFLAGS="$save_CPPFLAGS"
17599 LDFLAGS="$save_LDFLAGS"
17600 LIBS="$save_LIBS"
17601fi
17602
Christian Heimes892d66e2018-01-29 14:10:18 +010017603# ssl module default cipher suite string
17604
17605
17606
17607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17608$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17609
17610# Check whether --with-ssl-default-suites was given.
17611if test "${with_ssl_default_suites+set}" = set; then :
17612 withval=$with_ssl_default_suites;
17613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17614$as_echo "$withval" >&6; }
17615case "$withval" in
17616 python)
17617 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17618
17619 ;;
17620 openssl)
17621 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17622
17623 ;;
17624 *)
17625 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17626
17627 cat >>confdefs.h <<_ACEOF
17628#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17629_ACEOF
17630
17631 ;;
17632esac
17633
17634else
17635
17636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17637$as_echo "python" >&6; }
17638$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17639
17640
17641fi
17642
17643
Christian Heimes9b60e552020-05-15 23:54:53 +020017644# builtin hash modules
17645default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17646
17647$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17648
17649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17650$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17651
17652# Check whether --with-builtin-hashlib-hashes was given.
17653if test "${with_builtin_hashlib_hashes+set}" = set; then :
17654 withval=$with_builtin_hashlib_hashes;
17655case "$withval" in
17656 yes)
17657 withval=$default_hashlib_hashes
17658 ;;
17659 no)
17660 withval=""
17661 ;;
17662esac
17663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17664$as_echo "$withval" >&6; }
17665cat >>confdefs.h <<_ACEOF
17666#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17667_ACEOF
17668
17669
17670else
17671
17672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17673$as_echo "$default_hashlib_hashes" >&6; };
17674cat >>confdefs.h <<_ACEOF
17675#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17676_ACEOF
17677
17678
17679fi
17680
17681
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017682# --with-experimental-isolated-subinterpreters
17683
17684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17685$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17686
17687# Check whether --with-experimental-isolated-subinterpreters was given.
17688if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17689 withval=$with_experimental_isolated_subinterpreters;
17690if test "$withval" != no
17691then
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17693$as_echo "yes" >&6; };
17694 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17695
17696else
17697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17698$as_echo "no" >&6; };
17699fi
17700else
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17702$as_echo "no" >&6; }
17703fi
17704
17705
Christian Heimes892d66e2018-01-29 14:10:18 +010017706
Guido van Rossum627b2d71993-12-24 10:39:16 +000017707# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017708ac_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 +000017709
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017710ac_config_files="$ac_config_files Modules/ld_so_aix"
17711
Martin v. Löwis11437992002-04-12 09:54:03 +000017712cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017713# This file is a shell script that caches the results of configure
17714# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017715# scripts and configure runs, see configure's option --config-cache.
17716# It is not useful on other systems. If it contains results you don't
17717# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017718#
Martin v. Löwis11437992002-04-12 09:54:03 +000017719# config.status only pays attention to the cache file if you give it
17720# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017721#
Skip Montanaro6dead952003-09-25 14:50:04 +000017722# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017723# loading this file, other *unset* `ac_cv_foo' will be assigned the
17724# following values.
17725
17726_ACEOF
17727
Guido van Rossumf78abae1997-01-21 22:02:36 +000017728# The following way of writing the cache mishandles newlines in values,
17729# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017731# Ultrix sh set writes to stderr and can't be redirected directly,
17732# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733(
17734 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17735 eval ac_val=\$$ac_var
17736 case $ac_val in #(
17737 *${as_nl}*)
17738 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017739 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17740$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 esac
17742 case $ac_var in #(
17743 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17745 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746 esac ;;
17747 esac
17748 done
17749
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17752 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 # `set' does not quote correctly, so add quotes: double-quote
17754 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017756 "s/'/'\\\\''/g;
17757 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 *)
17760 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763 esac |
17764 sort
17765) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17771 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17773 :end' >>confcache
17774if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17775 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017776 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017777 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17778$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017779 if test ! -f "$cache_file" || test -h "$cache_file"; then
17780 cat confcache >"$cache_file"
17781 else
17782 case $cache_file in #(
17783 */* | ?:*)
17784 mv -f confcache "$cache_file"$$ &&
17785 mv -f "$cache_file"$$ "$cache_file" ;; #(
17786 *)
17787 mv -f confcache "$cache_file" ;;
17788 esac
17789 fi
17790 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017791 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017792 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17793$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017794 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017795fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017796rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017798test "x$prefix" = xNONE && prefix=$ac_default_prefix
17799# Let make expand exec_prefix.
17800test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017802DEFS=-DHAVE_CONFIG_H
17803
Skip Montanaro6dead952003-09-25 14:50:04 +000017804ac_libobjs=
17805ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017806U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017807for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17808 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017810 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17812 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017813 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17814 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017815done
17816LIBOBJS=$ac_libobjs
17817
17818LTLIBOBJS=$ac_ltlibobjs
17819
17820
Martin v. Löwis11437992002-04-12 09:54:03 +000017821
Matthias Kloseb9621712010-04-24 17:59:49 +000017822
Victor Stinnere0be4232011-10-25 13:06:09 +020017823: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017824ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017825ac_clean_files_save=$ac_clean_files
17826ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017827{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17828$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17829as_write_fail=0
17830cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017831#! $SHELL
17832# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017833# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017834# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017835# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017836
Martin v. Löwis11437992002-04-12 09:54:03 +000017837debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017838ac_cs_recheck=false
17839ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017840
Matthias Kloseb9621712010-04-24 17:59:49 +000017841SHELL=\${CONFIG_SHELL-$SHELL}
17842export SHELL
17843_ASEOF
17844cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17845## -------------------- ##
17846## M4sh Initialization. ##
17847## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849# Be more Bourne compatible
17850DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017851if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 emulate sh
17853 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017855 # is contrary to our usage. Disable this feature.
17856 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017858else
Matthias Kloseb9621712010-04-24 17:59:49 +000017859 case `(set -o) 2>/dev/null` in #(
17860 *posix*) :
17861 set -o posix ;; #(
17862 *) :
17863 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017865fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017866
17867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868as_nl='
17869'
17870export as_nl
17871# Printing a long string crashes Solaris 7 /usr/bin/printf.
17872as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17873as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17874as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17875# Prefer a ksh shell builtin over an external printf program on Solaris,
17876# but without wasting forks for bash or zsh.
17877if test -z "$BASH_VERSION$ZSH_VERSION" \
17878 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17879 as_echo='print -r --'
17880 as_echo_n='print -rn --'
17881elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17882 as_echo='printf %s\n'
17883 as_echo_n='printf %s'
17884else
17885 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17886 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17887 as_echo_n='/usr/ucb/echo -n'
17888 else
17889 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17890 as_echo_n_body='eval
17891 arg=$1;
17892 case $arg in #(
17893 *"$as_nl"*)
17894 expr "X$arg" : "X\\(.*\\)$as_nl";
17895 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17896 esac;
17897 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17898 '
17899 export as_echo_n_body
17900 as_echo_n='sh -c $as_echo_n_body as_echo'
17901 fi
17902 export as_echo_body
17903 as_echo='sh -c $as_echo_body as_echo'
17904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017905
17906# The user is always right.
17907if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 PATH_SEPARATOR=:
17909 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17910 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17911 PATH_SEPARATOR=';'
17912 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915
17916# IFS
17917# We need space, tab and new line, in precisely that order. Quoting is
17918# there to prevent editors from complaining about space-tab.
17919# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17920# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921IFS=" "" $as_nl"
17922
17923# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017924as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017925case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 *[\\/]* ) as_myself=$0 ;;
17927 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017928for as_dir in $PATH
17929do
17930 IFS=$as_save_IFS
17931 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017932 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17933 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936 ;;
17937esac
17938# We did not find ourselves, most probably we were run as `sh COMMAND'
17939# in which case we are not to be found in the path.
17940if test "x$as_myself" = x; then
17941 as_myself=$0
17942fi
17943if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017944 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17945 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946fi
17947
Matthias Kloseb9621712010-04-24 17:59:49 +000017948# Unset variables that we do not need and which cause bugs (e.g. in
17949# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17950# suppresses any "Segmentation fault" message there. '((' could
17951# trigger a bug in pdksh 5.2.14.
17952for as_var in BASH_ENV ENV MAIL MAILPATH
17953do eval test x\${$as_var+set} = xset \
17954 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955done
17956PS1='$ '
17957PS2='> '
17958PS4='+ '
17959
17960# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017961LC_ALL=C
17962export LC_ALL
17963LANGUAGE=C
17964export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965
Matthias Kloseb9621712010-04-24 17:59:49 +000017966# CDPATH.
17967(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17968
17969
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017970# as_fn_error STATUS ERROR [LINENO LOG_FD]
17971# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017972# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17973# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017974# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017975as_fn_error ()
17976{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017977 as_status=$1; test $as_status -eq 0 && as_status=1
17978 if test "$4"; then
17979 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17980 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017981 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017982 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017983 as_fn_exit $as_status
17984} # as_fn_error
17985
17986
17987# as_fn_set_status STATUS
17988# -----------------------
17989# Set $? to STATUS, without forking.
17990as_fn_set_status ()
17991{
17992 return $1
17993} # as_fn_set_status
17994
17995# as_fn_exit STATUS
17996# -----------------
17997# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17998as_fn_exit ()
17999{
18000 set +e
18001 as_fn_set_status $1
18002 exit $1
18003} # as_fn_exit
18004
18005# as_fn_unset VAR
18006# ---------------
18007# Portably unset VAR.
18008as_fn_unset ()
18009{
18010 { eval $1=; unset $1;}
18011}
18012as_unset=as_fn_unset
18013# as_fn_append VAR VALUE
18014# ----------------------
18015# Append the text in VALUE to the end of the definition contained in VAR. Take
18016# advantage of any shell optimizations that allow amortized linear growth over
18017# repeated appends, instead of the typical quadratic growth present in naive
18018# implementations.
18019if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18020 eval 'as_fn_append ()
18021 {
18022 eval $1+=\$2
18023 }'
18024else
18025 as_fn_append ()
18026 {
18027 eval $1=\$$1\$2
18028 }
18029fi # as_fn_append
18030
18031# as_fn_arith ARG...
18032# ------------------
18033# Perform arithmetic evaluation on the ARGs, and store the result in the
18034# global $as_val. Take advantage of shells that can avoid forks. The arguments
18035# must be portable across $(()) and expr.
18036if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18037 eval 'as_fn_arith ()
18038 {
18039 as_val=$(( $* ))
18040 }'
18041else
18042 as_fn_arith ()
18043 {
18044 as_val=`expr "$@" || test $? -eq 1`
18045 }
18046fi # as_fn_arith
18047
18048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049if expr a : '\(a\)' >/dev/null 2>&1 &&
18050 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18051 as_expr=expr
18052else
18053 as_expr=false
18054fi
18055
18056if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18057 as_basename=basename
18058else
18059 as_basename=false
18060fi
18061
Matthias Kloseb9621712010-04-24 17:59:49 +000018062if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18063 as_dirname=dirname
18064else
18065 as_dirname=false
18066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068as_me=`$as_basename -- "$0" ||
18069$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18070 X"$0" : 'X\(//\)$' \| \
18071 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018072$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073 sed '/^.*\/\([^/][^/]*\)\/*$/{
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
Matthias Kloseb9621712010-04-24 17:59:49 +000018087# Avoid depending upon Character Ranges.
18088as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18089as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18090as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18091as_cr_digits='0123456789'
18092as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093
18094ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018095case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018099 xy) ECHO_C='\c';;
18100 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18101 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102 esac;;
18103*)
18104 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018106
Martin v. Löwis11437992002-04-12 09:54:03 +000018107rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108if test -d conf$$.dir; then
18109 rm -f conf$$.dir/conf$$.file
18110else
18111 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018112 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018114if (echo >conf$$.file) 2>/dev/null; then
18115 if ln -s conf$$.file conf$$ 2>/dev/null; then
18116 as_ln_s='ln -s'
18117 # ... but there are two gotchas:
18118 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18119 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018120 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018121 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018122 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018123 elif ln conf$$.file conf$$ 2>/dev/null; then
18124 as_ln_s=ln
18125 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018126 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018127 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018128else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018129 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18132rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018133
Matthias Kloseb9621712010-04-24 17:59:49 +000018134
18135# as_fn_mkdir_p
18136# -------------
18137# Create "$as_dir" as a directory, including parents if necessary.
18138as_fn_mkdir_p ()
18139{
18140
18141 case $as_dir in #(
18142 -*) as_dir=./$as_dir;;
18143 esac
18144 test -d "$as_dir" || eval $as_mkdir_p || {
18145 as_dirs=
18146 while :; do
18147 case $as_dir in #(
18148 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18149 *) as_qdir=$as_dir;;
18150 esac
18151 as_dirs="'$as_qdir' $as_dirs"
18152 as_dir=`$as_dirname -- "$as_dir" ||
18153$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18154 X"$as_dir" : 'X\(//\)[^/]' \| \
18155 X"$as_dir" : 'X\(//\)$' \| \
18156 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18157$as_echo X"$as_dir" |
18158 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18159 s//\1/
18160 q
18161 }
18162 /^X\(\/\/\)[^/].*/{
18163 s//\1/
18164 q
18165 }
18166 /^X\(\/\/\)$/{
18167 s//\1/
18168 q
18169 }
18170 /^X\(\/\).*/{
18171 s//\1/
18172 q
18173 }
18174 s/.*/./; q'`
18175 test -d "$as_dir" && break
18176 done
18177 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018178 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018179
18180
18181} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018182if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018183 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018184else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018185 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018186 as_mkdir_p=false
18187fi
18188
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018189
18190# as_fn_executable_p FILE
18191# -----------------------
18192# Test if FILE is an executable regular file.
18193as_fn_executable_p ()
18194{
18195 test -f "$1" && test -x "$1"
18196} # as_fn_executable_p
18197as_test_x='test -x'
18198as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018199
18200# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018201as_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 +000018202
18203# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018204as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018205
18206
Martin v. Löwis11437992002-04-12 09:54:03 +000018207exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018208## ----------------------------------- ##
18209## Main body of $CONFIG_STATUS script. ##
18210## ----------------------------------- ##
18211_ASEOF
18212test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018213
Matthias Kloseb9621712010-04-24 17:59:49 +000018214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18215# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018216# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217# values after options handling.
18218ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018219This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018220generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018221
18222 CONFIG_FILES = $CONFIG_FILES
18223 CONFIG_HEADERS = $CONFIG_HEADERS
18224 CONFIG_LINKS = $CONFIG_LINKS
18225 CONFIG_COMMANDS = $CONFIG_COMMANDS
18226 $ $0 $@
18227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018228on `(hostname || uname -n) 2>/dev/null | sed 1q`
18229"
18230
Martin v. Löwis11437992002-04-12 09:54:03 +000018231_ACEOF
18232
Matthias Kloseb9621712010-04-24 17:59:49 +000018233case $ac_config_files in *"
18234"*) set x $ac_config_files; shift; ac_config_files=$*;;
18235esac
18236
18237case $ac_config_headers in *"
18238"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18239esac
18240
18241
18242cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018243# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018244config_files="$ac_config_files"
18245config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018247_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018248
Matthias Kloseb9621712010-04-24 17:59:49 +000018249cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018250ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018251\`$as_me' instantiates files and other configuration actions
18252from templates according to the current configuration. Unless the files
18253and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018254
Matthias Kloseb9621712010-04-24 17:59:49 +000018255Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018256
18257 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018259 --config print configuration, then exit
18260 -q, --quiet, --silent
18261 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018262 -d, --debug don't remove temporary files
18263 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018264 --file=FILE[:TEMPLATE]
18265 instantiate the configuration file FILE
18266 --header=FILE[:TEMPLATE]
18267 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018268
18269Configuration files:
18270$config_files
18271
18272Configuration headers:
18273$config_headers
18274
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018275Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018278cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18279ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018280ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018281python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018282configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018283 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018284
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018285Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018286This config.status script is free software; the Free Software Foundation
18287gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288
18289ac_pwd='$ac_pwd'
18290srcdir='$srcdir'
18291INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018292MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018293test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018294_ACEOF
18295
Matthias Kloseb9621712010-04-24 17:59:49 +000018296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18297# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018298ac_need_defaults=:
18299while test $# != 0
18300do
18301 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018302 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018303 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18304 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018305 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018306 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018307 --*=)
18308 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18309 ac_optarg=
18310 ac_shift=:
18311 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018312 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018313 ac_option=$1
18314 ac_optarg=$2
18315 ac_shift=shift
18316 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 esac
18318
Skip Montanaro6dead952003-09-25 14:50:04 +000018319 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018320 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018321 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18322 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018323 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018324 $as_echo "$ac_cs_version"; exit ;;
18325 --config | --confi | --conf | --con | --co | --c )
18326 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018328 debug=: ;;
18329 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018330 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018331 case $ac_optarg in
18332 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018333 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018334 esac
18335 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 ac_need_defaults=false;;
18337 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018338 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018339 case $ac_optarg in
18340 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18341 esac
18342 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018343 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344 --he | --h)
18345 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018346 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018347Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018348 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018349 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018350 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18351 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18352 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018353
18354 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018355 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018356Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018357
Matthias Kloseb9621712010-04-24 17:59:49 +000018358 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018360
18361 esac
18362 shift
18363done
18364
Skip Montanaro6dead952003-09-25 14:50:04 +000018365ac_configure_extra_args=
18366
18367if $ac_cs_silent; then
18368 exec 6>/dev/null
18369 ac_configure_extra_args="$ac_configure_extra_args --silent"
18370fi
18371
18372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018374if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018375 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018376 shift
18377 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18378 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018380 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018381fi
18382
Martin v. Löwis11437992002-04-12 09:54:03 +000018383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385exec 5>>config.log
18386{
18387 echo
18388 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18389## Running $as_me. ##
18390_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018391 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018397
Matthias Kloseb9621712010-04-24 17:59:49 +000018398cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399
18400# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018401for ac_config_target in $ac_config_targets
18402do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403 case $ac_config_target in
18404 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18405 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18406 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018407 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18408 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018410 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018411 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018412 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018413 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414
Victor Stinnere0be4232011-10-25 13:06:09 +020018415 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018416 esac
18417done
18418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018419
Martin v. Löwis11437992002-04-12 09:54:03 +000018420# If the user did not use the arguments to specify the items to instantiate,
18421# then the envvar interface is used. Set only those that are not.
18422# We use the long form for the default assignment because of an extremely
18423# bizarre bug on SunOS 4.1.3.
18424if $ac_need_defaults; then
18425 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18426 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18427fi
18428
Skip Montanaro6dead952003-09-25 14:50:04 +000018429# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018431# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432# Hook for its removal unless debugging.
18433# Note that there is a small window in which the directory will not be cleaned:
18434# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018435$debug ||
18436{
Victor Stinnere0be4232011-10-25 13:06:09 +020018437 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018439 : "${ac_tmp:=$tmp}"
18440 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018442 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018443}
Martin v. Löwis11437992002-04-12 09:54:03 +000018444# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018445
Martin v. Löwis11437992002-04-12 09:54:03 +000018446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018448 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018449} ||
18450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 tmp=./conf$$-$RANDOM
18452 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018453} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018454ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018455
Matthias Kloseb9621712010-04-24 17:59:49 +000018456# Set up the scripts for CONFIG_FILES section.
18457# No need to generate them if there are no CONFIG_FILES.
18458# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018460
Matthias Kloseb9621712010-04-24 17:59:49 +000018461
18462ac_cr=`echo X | tr X '\015'`
18463# On cygwin, bash can eat \r inside `` if the user requested igncr.
18464# But we know of no other shell where ac_cr would be empty at this
18465# point, so we can use a bashism as a fallback.
18466if test "x$ac_cr" = x; then
18467 eval ac_cr=\$\'\\r\'
18468fi
18469ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18470if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018471 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018472else
18473 ac_cs_awk_cr=$ac_cr
18474fi
18475
Victor Stinnere0be4232011-10-25 13:06:09 +020018476echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018477_ACEOF
18478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479
Matthias Kloseb9621712010-04-24 17:59:49 +000018480{
18481 echo "cat >conf$$subs.awk <<_ACEOF" &&
18482 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18483 echo "_ACEOF"
18484} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018485 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18486ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487ac_delim='%!_!# '
18488for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018489 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018490 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491
Matthias Kloseb9621712010-04-24 17:59:49 +000018492 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18493 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 break
18495 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018496 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 else
18498 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500done
Matthias Kloseb9621712010-04-24 17:59:49 +000018501rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502
Matthias Kloseb9621712010-04-24 17:59:49 +000018503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018504cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018506sed -n '
18507h
18508s/^/S["/; s/!.*/"]=/
18509p
18510g
18511s/^[^!]*!//
18512:repl
18513t repl
18514s/'"$ac_delim"'$//
18515t delim
18516:nl
18517h
18518s/\(.\{148\}\)..*/\1/
18519t more1
18520s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18521p
18522n
18523b repl
18524:more1
18525s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18526p
18527g
18528s/.\{148\}//
18529t nl
18530:delim
18531h
18532s/\(.\{148\}\)..*/\1/
18533t more2
18534s/["\\]/\\&/g; s/^/"/; s/$/"/
18535p
18536b
18537:more2
18538s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18539p
18540g
18541s/.\{148\}//
18542t delim
18543' <conf$$subs.awk | sed '
18544/^[^""]/{
18545 N
18546 s/\n//
18547}
18548' >>$CONFIG_STATUS || ac_write_fail=1
18549rm -f conf$$subs.awk
18550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18551_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018552cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018553 for (key in S) S_is_set[key] = 1
18554 FS = ""
18555
18556}
18557{
18558 line = $ 0
18559 nfields = split(line, field, "@")
18560 substed = 0
18561 len = length(field[1])
18562 for (i = 2; i < nfields; i++) {
18563 key = field[i]
18564 keylen = length(key)
18565 if (S_is_set[key]) {
18566 value = S[key]
18567 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18568 len += length(value) + length(field[++i])
18569 substed = 1
18570 } else
18571 len += 1 + keylen
18572 }
18573
18574 print line
18575}
18576
18577_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18580if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18581 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18582else
18583 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018584fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018585 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018586_ACEOF
18587
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018588# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18589# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590# trailing colons and then remove the whole line if VPATH becomes empty
18591# (actually we leave an empty line to preserve line numbers).
18592if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018593 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18594h
18595s///
18596s/^/:/
18597s/[ ]*$/:/
18598s/:\$(srcdir):/:/g
18599s/:\${srcdir}:/:/g
18600s/:@srcdir@:/:/g
18601s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018603x
18604s/\(=[ ]*\).*/\1/
18605G
18606s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018607s/^[^=]*=[ ]*$//
18608}'
18609fi
18610
Matthias Kloseb9621712010-04-24 17:59:49 +000018611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018612fi # test -n "$CONFIG_FILES"
18613
Matthias Kloseb9621712010-04-24 17:59:49 +000018614# Set up the scripts for CONFIG_HEADERS section.
18615# No need to generate them if there are no CONFIG_HEADERS.
18616# This happens for instance with `./config.status Makefile'.
18617if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018618cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018619BEGIN {
18620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018621
Matthias Kloseb9621712010-04-24 17:59:49 +000018622# Transform confdefs.h into an awk script `defines.awk', embedded as
18623# here-document in config.status, that substitutes the proper values into
18624# config.h.in to produce config.h.
18625
18626# Create a delimiter string that does not exist in confdefs.h, to ease
18627# handling of long lines.
18628ac_delim='%!_!# '
18629for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018630 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18631 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018632 break
18633 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018634 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018635 else
18636 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18637 fi
18638done
18639
18640# For the awk script, D is an array of macro values keyed by name,
18641# likewise P contains macro parameters if any. Preserve backslash
18642# newline sequences.
18643
18644ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18645sed -n '
18646s/.\{148\}/&'"$ac_delim"'/g
18647t rset
18648:rset
18649s/^[ ]*#[ ]*define[ ][ ]*/ /
18650t def
18651d
18652:def
18653s/\\$//
18654t bsnl
18655s/["\\]/\\&/g
18656s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18657D["\1"]=" \3"/p
18658s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18659d
18660:bsnl
18661s/["\\]/\\&/g
18662s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18663D["\1"]=" \3\\\\\\n"\\/p
18664t cont
18665s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18666t cont
18667d
18668:cont
18669n
18670s/.\{148\}/&'"$ac_delim"'/g
18671t clear
18672:clear
18673s/\\$//
18674t bsnlc
18675s/["\\]/\\&/g; s/^/"/; s/$/"/p
18676d
18677:bsnlc
18678s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18679b cont
18680' <confdefs.h | sed '
18681s/'"$ac_delim"'/"\\\
18682"/g' >>$CONFIG_STATUS || ac_write_fail=1
18683
18684cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18685 for (key in D) D_is_set[key] = 1
18686 FS = ""
18687}
18688/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18689 line = \$ 0
18690 split(line, arg, " ")
18691 if (arg[1] == "#") {
18692 defundef = arg[2]
18693 mac1 = arg[3]
18694 } else {
18695 defundef = substr(arg[1], 2)
18696 mac1 = arg[2]
18697 }
18698 split(mac1, mac2, "(") #)
18699 macro = mac2[1]
18700 prefix = substr(line, 1, index(line, defundef) - 1)
18701 if (D_is_set[macro]) {
18702 # Preserve the white space surrounding the "#".
18703 print prefix "define", macro P[macro] D[macro]
18704 next
18705 } else {
18706 # Replace #undef with comments. This is necessary, for example,
18707 # in the case of _POSIX_SOURCE, which is predefined and required
18708 # on some systems where configure will not decide to define it.
18709 if (defundef == "undef") {
18710 print "/*", prefix defundef, macro, "*/"
18711 next
18712 }
18713 }
18714}
18715{ print }
18716_ACAWK
18717_ACEOF
18718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018719 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018720fi # test -n "$CONFIG_HEADERS"
18721
18722
18723eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18724shift
18725for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726do
18727 case $ac_tag in
18728 :[FHLC]) ac_mode=$ac_tag; continue;;
18729 esac
18730 case $ac_mode$ac_tag in
18731 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018732 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733 :[FH]-) ac_tag=-:-;;
18734 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18735 esac
18736 ac_save_IFS=$IFS
18737 IFS=:
18738 set x $ac_tag
18739 IFS=$ac_save_IFS
18740 shift
18741 ac_file=$1
18742 shift
18743
18744 case $ac_mode in
18745 :L) ac_source=$1;;
18746 :[FH])
18747 ac_file_inputs=
18748 for ac_f
18749 do
18750 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018751 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752 *) # Look for the file first in the build tree, then in the source tree
18753 # (if the path is not absolute). The absolute path cannot be DOS-style,
18754 # because $ac_f cannot contain `:'.
18755 test -f "$ac_f" ||
18756 case $ac_f in
18757 [\\/$]*) false;;
18758 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18759 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018760 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018761 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018762 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18763 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018764 done
18765
18766 # Let's still pretend it is `configure' which instantiates (i.e., don't
18767 # use $as_me), people would be surprised to read:
18768 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018769 configure_input='Generated from '`
18770 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18771 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018772 if test x"$ac_file" != x-; then
18773 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018774 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18775$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018776 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018777 # Neutralize special characters interpreted by sed in replacement strings.
18778 case $configure_input in #(
18779 *\&* | *\|* | *\\* )
18780 ac_sed_conf_input=`$as_echo "$configure_input" |
18781 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18782 *) ac_sed_conf_input=$configure_input;;
18783 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018784
18785 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018786 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18787 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018788 esac
18789 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018790 esac
18791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018792 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018794 X"$ac_file" : 'X\(//\)[^/]' \| \
18795 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018797$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018798 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18799 s//\1/
18800 q
18801 }
18802 /^X\(\/\/\)[^/].*/{
18803 s//\1/
18804 q
18805 }
18806 /^X\(\/\/\)$/{
18807 s//\1/
18808 q
18809 }
18810 /^X\(\/\).*/{
18811 s//\1/
18812 q
18813 }
18814 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018815 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018816 ac_builddir=.
18817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818case "$ac_dir" in
18819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18820*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018821 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018822 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018823 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018824 case $ac_top_builddir_sub in
18825 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18826 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18827 esac ;;
18828esac
18829ac_abs_top_builddir=$ac_pwd
18830ac_abs_builddir=$ac_pwd$ac_dir_suffix
18831# for backward compatibility:
18832ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018833
18834case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018835 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018836 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018837 ac_top_srcdir=$ac_top_builddir_sub
18838 ac_abs_top_srcdir=$ac_pwd ;;
18839 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018840 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018841 ac_top_srcdir=$srcdir
18842 ac_abs_top_srcdir=$srcdir ;;
18843 *) # Relative name.
18844 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18845 ac_top_srcdir=$ac_top_build_prefix$srcdir
18846 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018847esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018849
Martin v. Löwis11437992002-04-12 09:54:03 +000018850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018851 case $ac_mode in
18852 :F)
18853 #
18854 # CONFIG_FILE
18855 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018856
18857 case $INSTALL in
18858 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018860 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018861 ac_MKDIR_P=$MKDIR_P
18862 case $MKDIR_P in
18863 [\\/$]* | ?:[\\/]* ) ;;
18864 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18865 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018866_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867
Matthias Kloseb9621712010-04-24 17:59:49 +000018868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869# If the template does not know about datarootdir, expand it.
18870# FIXME: This hack should be removed a few years after 2.60.
18871ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018872ac_sed_dataroot='
18873/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018874 p
18875 q
18876}
18877/@datadir@/p
18878/@docdir@/p
18879/@infodir@/p
18880/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018881/@mandir@/p'
18882case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018883*datarootdir*) ac_datarootdir_seen=yes;;
18884*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18886$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018888cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018889 ac_datarootdir_hack='
18890 s&@datadir@&$datadir&g
18891 s&@docdir@&$docdir&g
18892 s&@infodir@&$infodir&g
18893 s&@localedir@&$localedir&g
18894 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018895 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018896esac
18897_ACEOF
18898
18899# Neutralize VPATH when `$srcdir' = `.'.
18900# Shell code in configure.ac might set extrasub.
18901# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18903ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018904$extrasub
18905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018907:t
18908/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018909s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018911s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018912s&@srcdir@&$ac_srcdir&;t t
18913s&@abs_srcdir@&$ac_abs_srcdir&;t t
18914s&@top_srcdir@&$ac_top_srcdir&;t t
18915s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18916s&@builddir@&$ac_builddir&;t t
18917s&@abs_builddir@&$ac_abs_builddir&;t t
18918s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18919s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018920s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018922"
Victor Stinnere0be4232011-10-25 13:06:09 +020018923eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18924 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018926test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018927 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18928 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18929 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018931which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018932$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018933which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018934
Victor Stinnere0be4232011-10-25 13:06:09 +020018935 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018937 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18938 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018939 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018940 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018941 ;;
18942 :H)
18943 #
18944 # CONFIG_HEADER
18945 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018947 {
18948 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018949 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18950 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018951 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018952 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018953 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18954$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018956 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018957 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018958 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 fi
18960 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018961 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018962 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018963 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967
18968 esac
18969
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018970
18971 case $ac_file$ac_mode in
18972 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18973
18974 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018975done # for ac_tag
18976
Guido van Rossum627b2d71993-12-24 10:39:16 +000018977
Matthias Kloseb9621712010-04-24 17:59:49 +000018978as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018979_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018980ac_clean_files=$ac_clean_files_save
18981
Matthias Kloseb9621712010-04-24 17:59:49 +000018982test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018983 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018984
Martin v. Löwis11437992002-04-12 09:54:03 +000018985
18986# configure is writing to config.log, and then calls config.status.
18987# config.status does its own redirection, appending to config.log.
18988# Unfortunately, on DOS this fails, as config.log is still kept open
18989# by configure, so config.status won't be able to write to it; its
18990# output is simply discarded. So we exec the FD to /dev/null,
18991# effectively closing config.log, so it can be properly (re)opened and
18992# appended to by config.status. When coming back to configure, we
18993# need to make the FD available again.
18994if test "$no_create" != yes; then
18995 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018996 ac_config_status_args=
18997 test "$silent" = yes &&
18998 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018999 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019000 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019001 exec 5>>config.log
19002 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19003 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020019004 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000019005fi
19006if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19008$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019009fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019010
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019011
Christian Heimes75ed8902013-11-20 01:11:18 +010019012echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019013if test ! -f Modules/Setup.local
19014then
19015 echo "# Edit this file for local setup changes" >Modules/Setup.local
19016fi
19017
Christian Heimes75ed8902013-11-20 01:11:18 +010019018echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019019$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020019020 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020019021 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019022mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070019023
19024if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
19025 echo "" >&6
19026 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070019027 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 +000019028 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070019029 echo "" >&6
19030 echo "" >&6
19031fi
19032