blob: 139c2bf7de132817de4bbab0c89194c30dd9be73 [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
703LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000704LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000705RUNSHARED
706INSTSONAME
707LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000708PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BLDLIBRARY
710DLLLIBRARY
711LDLIBRARY
712LIBRARY
713BUILDEXEEXT
714EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200715NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200716MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717PLATFORM_TRIPLET
718MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200719ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720MAINCC
721CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700722SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723GREP
724CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732EXPORT_MACOSX_DEPLOYMENT_TARGET
733CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000735MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000736FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800738FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKALTINSTALLLAST
740FRAMEWORKALTINSTALLFIRST
741FRAMEWORKINSTALLLAST
742FRAMEWORKINSTALLFIRST
743PYTHONFRAMEWORKINSTALLDIR
744PYTHONFRAMEWORKPREFIX
745PYTHONFRAMEWORKDIR
746PYTHONFRAMEWORKIDENTIFIER
747PYTHONFRAMEWORK
748LIPO_32BIT_FLAGS
749ARCH_RUN_32BIT
750UNIVERSALSDK
751CONFIG_ARGS
752SOVERSION
753VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200755PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500764HAS_GIT
765GITBRANCH
766GITTAG
767GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200819with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Paul Ganssle62972d92020-05-16 04:20:06 -0400824with_tzpath
Charles-François Natalid30b0222014-05-08 23:08:51 +0100825with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800826with_memory_sanitizer
827with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_libs
829with_system_expat
830with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100831with_system_libmpdec
Stefan Krah815280e2020-02-29 19:43:42 +0100832with_decimal_contextvar
Benjamin Peterson076ed002010-10-31 17:11:02 +0000833enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700834with_tcltk_includes
835with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000837enable_ipv6
838with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000840with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700842with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_libm
844with_libc
845enable_big_digits
Victor Stinner8510f432020-03-10 09:53:09 +0100846with_platlibdir
Matthias Kloseb9621712010-04-24 17:59:49 +0000847with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800848with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100849with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100850with_ssl_default_suites
Christian Heimes9b60e552020-05-15 23:54:53 +0200851with_builtin_hashlib_hashes
Victor Stinnerc5fa3642020-05-05 16:41:11 +0200852with_experimental_isolated_subinterpreters
Matthias Kloseb9621712010-04-24 17:59:49 +0000853'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 ac_precious_vars='build_alias
855host_alias
856target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100857MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858CC
859CFLAGS
860LDFLAGS
861LIBS
862CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800863CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700864PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800865PKG_CONFIG
866PKG_CONFIG_PATH
867PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871ac_init_help=
872ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000873ac_unrecognized_opts=
874ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875# The variables have the same names as the options, with
876# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000877cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880no_recursion=
881prefix=NONE
882program_prefix=NONE
883program_suffix=NONE
884program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889x_includes=NONE
890x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000891
892# Installation directory options.
893# These are left unexpanded so users can "make install exec_prefix=/foo"
894# and all the variables that are supposed to be based on exec_prefix
895# by default will actually change.
896# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898bindir='${exec_prefix}/bin'
899sbindir='${exec_prefix}/sbin'
900libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901datarootdir='${prefix}/share'
902datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000903sysconfdir='${prefix}/etc'
904sharedstatedir='${prefix}/com'
905localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906includedir='${prefix}/include'
907oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
909infodir='${datarootdir}/info'
910htmldir='${docdir}'
911dvidir='${docdir}'
912pdfdir='${docdir}'
913psdir='${docdir}'
914libdir='${exec_prefix}/lib'
915localedir='${datarootdir}/locale'
916mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922 # If the previous option needs an argument, assign it.
923 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 ac_prev=
926 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000927 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200930 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
931 *=) ac_optarg= ;;
932 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 # Accept the important Cygnus configure options, so we can diagnose typos.
936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 case $ac_dashdash$ac_option in
938 --)
939 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -bindir | --bindir | --bindi | --bind | --bin | --bi)
942 ac_prev=bindir ;;
943 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
946 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 -cache-file | --cache-file | --cache-fil | --cache-fi \
952 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
953 ac_prev=cache_file ;;
954 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
955 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 cache_file=$ac_optarg ;;
957
958 --config-cache | -C)
959 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000963 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
967 | --dataroo | --dataro | --datar)
968 ac_prev=datarootdir ;;
969 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
970 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
971 datarootdir=$ac_optarg ;;
972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000976 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200977 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000978 ac_useropt_orig=$ac_useropt
979 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
980 case $ac_user_opts in
981 *"
982"enable_$ac_useropt"
983"*) ;;
984 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
985 ac_unrecognized_sep=', ';;
986 esac
987 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000988
989 -docdir | --docdir | --docdi | --doc | --do)
990 ac_prev=docdir ;;
991 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
992 docdir=$ac_optarg ;;
993
994 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
995 ac_prev=dvidir ;;
996 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
997 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
999 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001000 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001002 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001003 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001004 ac_useropt_orig=$ac_useropt
1005 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1006 case $ac_user_opts in
1007 *"
1008"enable_$ac_useropt"
1009"*) ;;
1010 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1011 ac_unrecognized_sep=', ';;
1012 esac
1013 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1016 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1017 | --exec | --exe | --ex)
1018 ac_prev=exec_prefix ;;
1019 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1020 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1021 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025 # Obsolete; use --with-gas.
1026 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 -help | --help | --hel | --he | -h)
1029 ac_init_help=long ;;
1030 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1031 ac_init_help=recursive ;;
1032 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1033 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
1035 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1041 ac_prev=htmldir ;;
1042 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1043 | --ht=*)
1044 htmldir=$ac_optarg ;;
1045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -includedir | --includedir | --includedi | --included | --include \
1047 | --includ | --inclu | --incl | --inc)
1048 ac_prev=includedir ;;
1049 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1050 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -infodir | --infodir | --infodi | --infod | --info | --inf)
1054 ac_prev=infodir ;;
1055 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -libdir | --libdir | --libdi | --libd)
1059 ac_prev=libdir ;;
1060 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1064 | --libexe | --libex | --libe)
1065 ac_prev=libexecdir ;;
1066 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1067 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 -localedir | --localedir | --localedi | --localed | --locale)
1071 ac_prev=localedir ;;
1072 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1073 localedir=$ac_optarg ;;
1074
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001076 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077 ac_prev=localstatedir ;;
1078 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001079 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
1082 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1083 ac_prev=mandir ;;
1084 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 # Obsolete; use --without-fp.
1089 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 no_create=yes ;;
1094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001095 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1096 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1097 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1100 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1101 | --oldin | --oldi | --old | --ol | --o)
1102 ac_prev=oldincludedir ;;
1103 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1104 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1105 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001107
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1109 ac_prev=prefix ;;
1110 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1114 | --program-pre | --program-pr | --program-p)
1115 ac_prev=program_prefix ;;
1116 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1117 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1121 | --program-suf | --program-su | --program-s)
1122 ac_prev=program_suffix ;;
1123 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1124 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
1127 -program-transform-name | --program-transform-name \
1128 | --program-transform-nam | --program-transform-na \
1129 | --program-transform-n | --program-transform- \
1130 | --program-transform | --program-transfor \
1131 | --program-transfo | --program-transf \
1132 | --program-trans | --program-tran \
1133 | --progr-tra | --program-tr | --program-t)
1134 ac_prev=program_transform_name ;;
1135 -program-transform-name=* | --program-transform-name=* \
1136 | --program-transform-nam=* | --program-transform-na=* \
1137 | --program-transform-n=* | --program-transform-=* \
1138 | --program-transform=* | --program-transfor=* \
1139 | --program-transfo=* | --program-transf=* \
1140 | --program-trans=* | --program-tran=* \
1141 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1145 ac_prev=pdfdir ;;
1146 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1147 pdfdir=$ac_optarg ;;
1148
1149 -psdir | --psdir | --psdi | --psd | --ps)
1150 ac_prev=psdir ;;
1151 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1152 psdir=$ac_optarg ;;
1153
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1155 | -silent | --silent | --silen | --sile | --sil)
1156 silent=yes ;;
1157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1159 ac_prev=sbindir ;;
1160 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1161 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
1164 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1165 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1166 | --sharedst | --shareds | --shared | --share | --shar \
1167 | --sha | --sh)
1168 ac_prev=sharedstatedir ;;
1169 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1170 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1171 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1172 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 -site | --site | --sit)
1176 ac_prev=site ;;
1177 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001179
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1181 ac_prev=srcdir ;;
1182 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1186 | --syscon | --sysco | --sysc | --sys | --sy)
1187 ac_prev=sysconfdir ;;
1188 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1189 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1198 verbose=yes ;;
1199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 -version | --version | --versio | --versi | --vers | -V)
1201 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001207 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 ac_useropt_orig=$ac_useropt
1209 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210 case $ac_user_opts in
1211 *"
1212"with_$ac_useropt"
1213"*) ;;
1214 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1215 ac_unrecognized_sep=', ';;
1216 esac
1217 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 ac_useropt_orig=$ac_useropt
1225 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226 case $ac_user_opts in
1227 *"
1228"with_$ac_useropt"
1229"*) ;;
1230 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1231 ac_unrecognized_sep=', ';;
1232 esac
1233 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 --x)
1236 # Obsolete; use --with-x.
1237 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1240 | --x-incl | --x-inc | --x-in | --x-i)
1241 ac_prev=x_includes ;;
1242 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1243 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
1246 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1247 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1248 ac_prev=x_libraries ;;
1249 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1250 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1254Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 *=*)
1258 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1259 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 case $ac_envvar in #(
1261 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 export $ac_envvar ;;
1266
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001267 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001272 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 ;;
1274
1275 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276done
1277
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281fi
1282
Matthias Kloseb9621712010-04-24 17:59:49 +00001283if test -n "$ac_unrecognized_opts"; then
1284 case $enable_option_checking in
1285 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001286 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001287 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1288 esac
1289fi
1290
1291# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1293 datadir sysconfdir sharedstatedir localstatedir includedir \
1294 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner8510f432020-03-10 09:53:09 +01001295 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001298 # Remove trailing slashes.
1299 case $ac_val in
1300 */ )
1301 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1302 eval $ac_var=\$ac_val;;
1303 esac
1304 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306 [\\/$]* | ?:[\\/]* ) continue;;
1307 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001310done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# There might be people who depend on the old broken behavior: `$host'
1313# used to hold the argument of --host etc.
1314# FIXME: To remove some day.
1315build=$build_alias
1316host=$host_alias
1317target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Martin v. Löwis11437992002-04-12 09:54:03 +00001319# FIXME: To remove some day.
1320if test "x$host_alias" != x; then
1321 if test "x$build_alias" = x; then
1322 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 elif test "x$build_alias" != "x$host_alias"; then
1324 cross_compiling=yes
1325 fi
1326fi
1327
1328ac_tool_prefix=
1329test -n "$host_alias" && ac_tool_prefix=$host_alias-
1330
1331test "$silent" = yes && exec 6>/dev/null
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334ac_pwd=`pwd` && test -n "$ac_pwd" &&
1335ac_ls_di=`ls -di .` &&
1336ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340
1341
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342# Find the source files, if location was not specified.
1343if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001344 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 ac_confdir=`$as_dirname -- "$as_myself" ||
1347$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1348 X"$as_myself" : 'X\(//\)[^/]' \| \
1349 X"$as_myself" : 'X\(//\)$' \| \
1350 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1351$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)[^/].*/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\/\)$/{
1361 s//\1/
1362 q
1363 }
1364 /^X\(\/\).*/{
1365 s//\1/
1366 q
1367 }
1368 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001369 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371 srcdir=..
1372 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373else
1374 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376if test ! -r "$srcdir/$ac_unique_file"; then
1377 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1381ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001382 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383 pwd)`
1384# When building in place, set srcdir=.
1385if test "$ac_abs_confdir" = "$ac_pwd"; then
1386 srcdir=.
1387fi
1388# Remove unnecessary trailing slashes from srcdir.
1389# Double slashes in file names in object file debugging info
1390# mess up M-x gdb in Emacs.
1391case $srcdir in
1392*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1393esac
1394for ac_var in $ac_precious_vars; do
1395 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_env_${ac_var}_value=\$${ac_var}
1397 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1399done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401#
1402# Report the --help message.
1403#
1404if test "$ac_init_help" = "long"; then
1405 # Omit some internal or obsolete options to make the list less imposing.
1406 # This message is too long to be a string in the A/UX 3.1 sh.
1407 cat <<_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001408\`configure' configures python 3.10 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410Usage: $0 [OPTION]... [VAR=VALUE]...
1411
1412To assign environment variables (e.g., CC, CFLAGS...), specify them as
1413VAR=VALUE. See below for descriptions of some of the useful variables.
1414
1415Defaults for the options are specified in brackets.
1416
1417Configuration:
1418 -h, --help display this help and exit
1419 --help=short display options specific to this package
1420 --help=recursive display the short help of all the included packages
1421 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001422 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --cache-file=FILE cache test results in FILE [disabled]
1424 -C, --config-cache alias for \`--cache-file=config.cache'
1425 -n, --no-create do not create output files
1426 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1427
Martin v. Löwis11437992002-04-12 09:54:03 +00001428Installation directories:
1429 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434By default, \`make install' will install all the files in
1435\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1436an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1437for instance \`--prefix=\$HOME'.
1438
1439For better control, use the options below.
1440
1441Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --bindir=DIR user executables [EPREFIX/bin]
1443 --sbindir=DIR system admin executables [EPREFIX/sbin]
1444 --libexecdir=DIR program executables [EPREFIX/libexec]
1445 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1446 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1447 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1448 --libdir=DIR object code libraries [EPREFIX/lib]
1449 --includedir=DIR C header files [PREFIX/include]
1450 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1451 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1452 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1453 --infodir=DIR info documentation [DATAROOTDIR/info]
1454 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1455 --mandir=DIR man documentation [DATAROOTDIR/man]
1456 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1457 --htmldir=DIR html documentation [DOCDIR]
1458 --dvidir=DIR dvi documentation [DOCDIR]
1459 --pdfdir=DIR pdf documentation [DOCDIR]
1460 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462
1463 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001464
1465System types:
1466 --build=BUILD configure for building on BUILD [guessed]
1467 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469fi
1470
1471if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 case $ac_init_help in
Pablo Galindod4fe0982020-05-19 03:33:01 +01001473 short | recursive ) echo "Configuration of python 3.10:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 cat <<\_ACEOF
1476
1477Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1480 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001481 --enable-universalsdk[=SDKDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001482 create a universal binary build. SDKDIR specifies
1483 which macOS SDK should be used to perform the build,
1484 see Mac/README.rst. (default is no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-framework[=INSTALLDIR]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001486 create a Python.framework rather than a traditional
1487 Unix install. optional INSTALLDIR specifies the
1488 installation path. see Mac/README.rst (default is
1489 no)
1490 --enable-shared enable building a shared Python library (default is
1491 no)
1492 --enable-profiling enable C-level code profiling with gprof (default is
1493 no)
1494 --enable-optimizations enable expensive, stable optimizations (PGO, etc.)
1495 (default is no)
Benjamin Peterson076ed002010-10-31 17:11:02 +00001496 --enable-loadable-sqlite-extensions
Anthony Shaw2de064e2020-01-14 17:40:10 +11001497 support loadable extensions in _sqlite module, see
1498 Doc/library/sqlite3.rst (default is no)
1499 --enable-ipv6 enable ipv6 (with ipv4) support, see
1500 Doc/library/socket.rst (default is yes if supported)
1501 --enable-big-digits[=15|30]
1502 use big digits (30 or 15 bits) for Python longs
1503 (default is system-dependent)]
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
1505Optional Packages:
1506 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1507 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001508 --with-universal-archs=ARCH
Anthony Shaw2de064e2020-01-14 17:40:10 +11001509 specify the kind of universal binary that should be
1510 created. this option is only valid when
1511 --enable-universalsdk is set; options are:
1512 ("32-bit", "64-bit", "3-way", "intel", "intel-32",
1513 "intel-64", or "all") see Mac/README.rst
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001514 --with-framework-name=FRAMEWORK
Anthony Shaw2de064e2020-01-14 17:40:10 +11001515 specify the name for the python framework on macOS
1516 only valid when --enable-framework is set. see
1517 Mac/README.rst (default is 'Python')
1518 --with-cxx-main[=COMPILER]
1519 compile main() and link Python executable with C++
1520 compiler specified in COMPILER (default is $CXX)
1521 --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe')
1522 --with-pydebug build with Py_DEBUG defined (default is no)
Victor Stinnerf4e47032019-04-25 00:56:28 +02001523 --with-trace-refs enable tracing references for debugging purpose
Anthony Shaw2de064e2020-01-14 17:40:10 +11001524 (default is no)
1525 --with-assertions build with C assertions enabled (default is no)
1526 --with-lto enable Link-Time-Optimization in any build (default
1527 is no)
Christian Heimes985ecdc2013-11-20 11:46:18 +01001528 --with-hash-algorithm=[fnv|siphash24]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001529 select hash algorithm for use in Python/pyhash.c
1530 (default is SipHash24)
Paul Ganssle62972d92020-05-16 04:20:06 -04001531 --with-tzpath=<list of absolute paths separated by pathsep>
1532 Select the default time zone search path for zoneinfo.TZPATH
1533
Charles-François Natalid30b0222014-05-08 23:08:51 +01001534 --with-address-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001535 enable AddressSanitizer memory error detector,
1536 'asan' (default is no)
1537 --with-memory-sanitizer enable MemorySanitizer allocation error detector,
1538 'msan' (default is no)
Gregory P. Smith1584a002018-11-12 12:07:14 -08001539 --with-undefined-behavior-sanitizer
Anthony Shaw2de064e2020-01-14 17:40:10 +11001540 enable UndefinedBehaviorSanitizer undefined
1541 behaviour detector, 'ubsan' (default is no)
1542 --with-libs='lib1 ...' link against additional libs (default is no)
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001543 --with-system-expat build pyexpat module using an installed expat
Anthony Shaw2de064e2020-01-14 17:40:10 +11001544 library, see Doc/library/pyexpat.rst (default is no)
1545 --with-system-ffi build _ctypes module using an installed ffi library,
1546 see Doc/library/ctypes.rst (default is
1547 system-dependent)
Stefan Krah60187b52012-03-23 19:06:27 +01001548 --with-system-libmpdec build _decimal module using an installed libmpdec
Anthony Shaw2de064e2020-01-14 17:40:10 +11001549 library, see Doc/library/decimal.rst (default is no)
Stefan Krah815280e2020-02-29 19:43:42 +01001550 --with-decimal-contextvar
1551 build _decimal module using a coroutine-local rather
1552 than a thread-local context (default is yes)
Ned Deilyd819b932013-09-06 01:07:05 -07001553 --with-tcltk-includes='-I...'
1554 override search for Tcl and Tk include files
1555 --with-tcltk-libs='-L...'
1556 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001557 --with-dbmliborder=db1:db2:...
Anthony Shaw2de064e2020-01-14 17:40:10 +11001558 override order to check db backends for dbm; a valid
1559 value is a colon separated string with the backend
1560 names `ndbm', `gdbm' and `bdb'.
1561 --with-doc-strings enable documentation strings (default is yes)
1562 --with-pymalloc enable specialized mallocs (default is yes)
1563 --with-c-locale-coercion
1564 enable C locale coercion to a UTF-8 based locale
1565 (default is yes)
1566 --with-valgrind enable Valgrind support (default is no)
1567 --with-dtrace enable DTrace support (default is no)
1568 --with-libm=STRING override libm math library to STRING (default is
1569 system-dependent)
1570 --with-libc=STRING override libc C library to STRING (default is
1571 system-dependent)
Victor Stinner8510f432020-03-10 09:53:09 +01001572 --with-platlibdir=DIRNAME
1573 Python library directory name (default is "lib")
Anthony Shaw2de064e2020-01-14 17:40:10 +11001574 --with-computed-gotos enable computed gotos in evaluation loop (enabled by
Antoine Pitrou042b1282010-08-13 21:15:58 +00001575 default on supported compilers)
Anthony Shaw2de064e2020-01-14 17:40:10 +11001576 --with-ensurepip[=install|upgrade|no]
1577 "install" or "upgrade" using bundled pip (default is
1578 upgrade)
1579 --with-openssl=DIR override root of the OpenSSL directory to DIR
Christian Heimes892d66e2018-01-29 14:10:18 +01001580 --with-ssl-default-suites=[python|openssl|STRING]
Anthony Shaw2de064e2020-01-14 17:40:10 +11001581 override default cipher suites string, python: use
Christian Heimes892d66e2018-01-29 14:10:18 +01001582 Python's preferred selection (default), openssl:
1583 leave OpenSSL's defaults untouched, STRING: use a
Anthony Shaw2de064e2020-01-14 17:40:10 +11001584 custom string, PROTOCOL_SSLv2 ignores the setting,
1585 see Doc/library/ssl.rst
Christian Heimes9b60e552020-05-15 23:54:53 +02001586 --with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2
1587 builtin hash modules, md5, sha1, sha256, sha512,
1588 sha3 (with shake), blake2
Victor Stinnerc5fa3642020-05-05 16:41:11 +02001589 --with-experimental-isolated-subinterpreters
1590 better isolate subinterpreters, experimental build
1591 mode (default is no)
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001594 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 CC C compiler command
1596 CFLAGS C compiler flags
1597 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1598 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001603 PROFILE_TASK
1604 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001605 PKG_CONFIG path to pkg-config utility
1606 PKG_CONFIG_PATH
1607 directories to add to pkg-config's search path
1608 PKG_CONFIG_LIBDIR
1609 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
1611Use these variables to override the choices made by `configure' or to help
1612it to find libraries and programs with nonstandard names/locations.
1613
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001614Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001617fi
1618
1619if test "$ac_init_help" = "recursive"; then
1620 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 test -d "$ac_dir" ||
1623 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1624 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 ac_builddir=.
1626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627case "$ac_dir" in
1628.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1629*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001630 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 case $ac_top_builddir_sub in
1634 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1635 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1636 esac ;;
1637esac
1638ac_abs_top_builddir=$ac_pwd
1639ac_abs_builddir=$ac_pwd$ac_dir_suffix
1640# for backward compatibility:
1641ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001642
1643case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001646 ac_top_srcdir=$ac_top_builddir_sub
1647 ac_abs_top_srcdir=$ac_pwd ;;
1648 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 ac_top_srcdir=$srcdir
1651 ac_abs_top_srcdir=$srcdir ;;
1652 *) # Relative name.
1653 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1654 ac_top_srcdir=$ac_top_build_prefix$srcdir
1655 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001656esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659 cd "$ac_dir" || { ac_status=$?; continue; }
1660 # Check for guested configure.
1661 if test -f "$ac_srcdir/configure.gnu"; then
1662 echo &&
1663 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1664 elif test -f "$ac_srcdir/configure"; then
1665 echo &&
1666 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001667 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001669 fi || ac_status=$?
1670 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001671 done
1672fi
1673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001674test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001675if $ac_init_version; then
1676 cat <<\_ACEOF
Pablo Galindod4fe0982020-05-19 03:33:01 +01001677python configure 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001678generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001679
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001680Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001681This configure script is free software; the Free Software Foundation
1682gives unlimited permission to copy, distribute and modify it.
1683_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001684 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001686
1687## ------------------------ ##
1688## Autoconf initialization. ##
1689## ------------------------ ##
1690
1691# ac_fn_c_try_compile LINENO
1692# --------------------------
1693# Try to compile conftest.$ac_ext, and return whether this succeeded.
1694ac_fn_c_try_compile ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 rm -f conftest.$ac_objext
1698 if { { ac_try="$ac_compile"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_compile") 2>conftest.err
1706 ac_status=$?
1707 if test -s conftest.err; then
1708 grep -v '^ *+' conftest.err >conftest.er1
1709 cat conftest.er1 >&5
1710 mv -f conftest.er1 conftest.err
1711 fi
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; } && {
1714 test -z "$ac_c_werror_flag" ||
1715 test ! -s conftest.err
1716 } && test -s conftest.$ac_objext; then :
1717 ac_retval=0
1718else
1719 $as_echo "$as_me: failed program was:" >&5
1720sed 's/^/| /' conftest.$ac_ext >&5
1721
1722 ac_retval=1
1723fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001724 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_compile
1728
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001729# ac_fn_c_try_cpp LINENO
1730# ----------------------
1731# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1732ac_fn_c_try_cpp ()
1733{
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 if { { ac_try="$ac_cpp conftest.$ac_ext"
1736case "(($ac_try" in
1737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1738 *) ac_try_echo=$ac_try;;
1739esac
1740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1741$as_echo "$ac_try_echo"; } >&5
1742 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1743 ac_status=$?
1744 if test -s conftest.err; then
1745 grep -v '^ *+' conftest.err >conftest.er1
1746 cat conftest.er1 >&5
1747 mv -f conftest.er1 conftest.err
1748 fi
1749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1750 test $ac_status = 0; } > conftest.i && {
1751 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1752 test ! -s conftest.err
1753 }; then :
1754 ac_retval=0
1755else
1756 $as_echo "$as_me: failed program was:" >&5
1757sed 's/^/| /' conftest.$ac_ext >&5
1758
1759 ac_retval=1
1760fi
1761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1762 as_fn_set_status $ac_retval
1763
1764} # ac_fn_c_try_cpp
1765
Matthias Kloseb9621712010-04-24 17:59:49 +00001766# ac_fn_c_try_link LINENO
1767# -----------------------
1768# Try to link conftest.$ac_ext, and return whether this succeeded.
1769ac_fn_c_try_link ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 rm -f conftest.$ac_objext conftest$ac_exeext
1773 if { { ac_try="$ac_link"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>conftest.err
1781 ac_status=$?
1782 if test -s conftest.err; then
1783 grep -v '^ *+' conftest.err >conftest.er1
1784 cat conftest.er1 >&5
1785 mv -f conftest.er1 conftest.err
1786 fi
1787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1788 test $ac_status = 0; } && {
1789 test -z "$ac_c_werror_flag" ||
1790 test ! -s conftest.err
1791 } && test -s conftest$ac_exeext && {
1792 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001793 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 }; then :
1795 ac_retval=0
1796else
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=1
1801fi
1802 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1803 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1804 # interfere with the next link command; also delete a directory that is
1805 # left behind by Apple's compiler. We do this before executing the actions.
1806 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 as_fn_set_status $ac_retval
1809
1810} # ac_fn_c_try_link
1811
Matthias Kloseb9621712010-04-24 17:59:49 +00001812# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1813# -------------------------------------------------------
1814# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1815# the include files in INCLUDES and setting the cache variable VAR
1816# accordingly.
1817ac_fn_c_check_header_mongrel ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001820 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001823if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001824 $as_echo_n "(cached) " >&6
1825fi
1826eval ac_res=\$$3
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1828$as_echo "$ac_res" >&6; }
1829else
1830 # Is the header compilable?
1831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1832$as_echo_n "checking $2 usability... " >&6; }
1833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836#include <$2>
1837_ACEOF
1838if ac_fn_c_try_compile "$LINENO"; then :
1839 ac_header_compiler=yes
1840else
1841 ac_header_compiler=no
1842fi
1843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1845$as_echo "$ac_header_compiler" >&6; }
1846
1847# Is the header present?
1848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1849$as_echo_n "checking $2 presence... " >&6; }
1850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1851/* end confdefs.h. */
1852#include <$2>
1853_ACEOF
1854if ac_fn_c_try_cpp "$LINENO"; then :
1855 ac_header_preproc=yes
1856else
1857 ac_header_preproc=no
1858fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001859rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1861$as_echo "$ac_header_preproc" >&6; }
1862
1863# So? What about this header?
1864case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1865 yes:no: )
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1867$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1869$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1870 ;;
1871 no:yes:* )
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1873$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1875$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1877$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1879$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1881$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001882( $as_echo "## --------------------------------------- ##
1883## Report this to https://bugs.python.org/ ##
1884## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001885 ) | sed "s/^/$as_me: WARNING: /" >&2
1886 ;;
1887esac
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001890if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 $as_echo_n "(cached) " >&6
1892else
1893 eval "$3=\$ac_header_compiler"
1894fi
1895eval ac_res=\$$3
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1897$as_echo "$ac_res" >&6; }
1898fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001899 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001900
1901} # ac_fn_c_check_header_mongrel
1902
1903# ac_fn_c_try_run LINENO
1904# ----------------------
1905# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1906# that executables *can* be run.
1907ac_fn_c_try_run ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 if { { ac_try="$ac_link"
1911case "(($ac_try" in
1912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1913 *) ac_try_echo=$ac_try;;
1914esac
1915eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1916$as_echo "$ac_try_echo"; } >&5
1917 (eval "$ac_link") 2>&5
1918 ac_status=$?
1919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1920 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1921 { { case "(($ac_try" in
1922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923 *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927 (eval "$ac_try") 2>&5
1928 ac_status=$?
1929 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1930 test $ac_status = 0; }; }; then :
1931 ac_retval=0
1932else
1933 $as_echo "$as_me: program exited with status $ac_status" >&5
1934 $as_echo "$as_me: failed program was:" >&5
1935sed 's/^/| /' conftest.$ac_ext >&5
1936
1937 ac_retval=$ac_status
1938fi
1939 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001940 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 as_fn_set_status $ac_retval
1942
1943} # ac_fn_c_try_run
1944
1945# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1946# -------------------------------------------------------
1947# Tests whether HEADER exists and can be compiled using the include files in
1948# INCLUDES, setting the cache variable VAR accordingly.
1949ac_fn_c_check_header_compile ()
1950{
1951 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1953$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001954if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001955 $as_echo_n "(cached) " >&6
1956else
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960#include <$2>
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 eval "$3=yes"
1964else
1965 eval "$3=no"
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_header_compile
1975
Matthias Kloseb9621712010-04-24 17:59:49 +00001976# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1977# -------------------------------------------
1978# Tests whether TYPE exists after having included INCLUDES, setting cache
1979# variable VAR accordingly.
1980ac_fn_c_check_type ()
1981{
1982 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1984$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001985if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001986 $as_echo_n "(cached) " >&6
1987else
1988 eval "$3=no"
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h. */
1991$4
1992int
1993main ()
1994{
1995if (sizeof ($2))
1996 return 0;
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$4
2005int
2006main ()
2007{
2008if (sizeof (($2)))
2009 return 0;
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015
2016else
2017 eval "$3=yes"
2018fi
2019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022fi
2023eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002027
2028} # ac_fn_c_check_type
2029
Matthias Kloseb9621712010-04-24 17:59:49 +00002030# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2031# --------------------------------------------
2032# Tries to find the compile-time value of EXPR in a program that includes
2033# INCLUDES, setting VAR accordingly. Returns whether the value could be
2034# computed
2035ac_fn_c_compute_int ()
2036{
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 if test "$cross_compiling" = yes; then
2039 # Depending upon the size, compute the lo and hi bounds.
2040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_lo=0 ac_mid=0
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_hi=$ac_mid; break
2073else
2074 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2075 if test $ac_lo -le $ac_mid; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h. */
2086$4
2087int
2088main ()
2089{
2090static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002091test_array [0] = 0;
2092return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002093
2094 ;
2095 return 0;
2096}
2097_ACEOF
2098if ac_fn_c_try_compile "$LINENO"; then :
2099 ac_hi=-1 ac_mid=-1
2100 while :; do
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_lo=$ac_mid; break
2117else
2118 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2119 if test $ac_mid -le $ac_hi; then
2120 ac_lo= ac_hi=
2121 break
2122 fi
2123 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2124fi
2125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126 done
2127else
2128 ac_lo= ac_hi=
2129fi
2130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133# Binary search between lo and hi bounds.
2134while test "x$ac_lo" != "x$ac_hi"; do
2135 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=$ac_mid
2152else
2153 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156done
2157case $ac_lo in #((
2158?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2159'') ac_retval=1 ;;
2160esac
2161 else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165static long int longval () { return $2; }
2166static unsigned long int ulongval () { return $2; }
2167#include <stdio.h>
2168#include <stdlib.h>
2169int
2170main ()
2171{
2172
2173 FILE *f = fopen ("conftest.val", "w");
2174 if (! f)
2175 return 1;
2176 if (($2) < 0)
2177 {
2178 long int i = longval ();
2179 if (i != ($2))
2180 return 1;
2181 fprintf (f, "%ld", i);
2182 }
2183 else
2184 {
2185 unsigned long int i = ulongval ();
2186 if (i != ($2))
2187 return 1;
2188 fprintf (f, "%lu", i);
2189 }
2190 /* Do not output a trailing newline, as this causes \r\n confusion
2191 on some platforms. */
2192 return ferror (f) || fclose (f) != 0;
2193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_run "$LINENO"; then :
2199 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2200else
2201 ac_retval=1
2202fi
2203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2204 conftest.$ac_objext conftest.beam conftest.$ac_ext
2205rm -f conftest.val
2206
2207 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002208 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002209 as_fn_set_status $ac_retval
2210
2211} # ac_fn_c_compute_int
2212
2213# ac_fn_c_check_func LINENO FUNC VAR
2214# ----------------------------------
2215# Tests whether FUNC exists, setting the cache variable VAR accordingly
2216ac_fn_c_check_func ()
2217{
2218 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2220$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002221if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002222 $as_echo_n "(cached) " >&6
2223else
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2227 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2228#define $2 innocuous_$2
2229
2230/* System header to define __stub macros and hopefully few prototypes,
2231 which can conflict with char $2 (); below.
2232 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2233 <limits.h> exists even on freestanding compilers. */
2234
2235#ifdef __STDC__
2236# include <limits.h>
2237#else
2238# include <assert.h>
2239#endif
2240
2241#undef $2
2242
2243/* Override any GCC internal prototype to avoid an error.
2244 Use char because int might match the return type of a GCC
2245 builtin and then its argument prototype would still apply. */
2246#ifdef __cplusplus
2247extern "C"
2248#endif
2249char $2 ();
2250/* The GNU C library defines this for functions which it implements
2251 to always fail with ENOSYS. Some functions are actually named
2252 something starting with __ and the normal name is an alias. */
2253#if defined __stub_$2 || defined __stub___$2
2254choke me
2255#endif
2256
2257int
2258main ()
2259{
2260return $2 ();
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_link "$LINENO"; then :
2266 eval "$3=yes"
2267else
2268 eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext \
2271 conftest$ac_exeext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002277
2278} # ac_fn_c_check_func
2279
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002280# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2281# ---------------------------------------------
2282# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2283# accordingly.
2284ac_fn_c_check_decl ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 as_decl_name=`echo $2|sed 's/ *(.*//'`
2288 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2290$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2291if eval \${$3+:} false; then :
2292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$4
2297int
2298main ()
2299{
2300#ifndef $as_decl_name
2301#ifdef __cplusplus
2302 (void) $as_decl_use;
2303#else
2304 (void) $as_decl_name;
2305#endif
2306#endif
2307
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
2313 eval "$3=yes"
2314else
2315 eval "$3=no"
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318fi
2319eval ac_res=\$$3
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2321$as_echo "$ac_res" >&6; }
2322 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2323
2324} # ac_fn_c_check_decl
2325
Matthias Kloseb9621712010-04-24 17:59:49 +00002326# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2327# ----------------------------------------------------
2328# Tries to find if the field MEMBER exists in type AGGR, after including
2329# INCLUDES, setting cache variable VAR accordingly.
2330ac_fn_c_check_member ()
2331{
2332 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2334$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002336 $as_echo_n "(cached) " >&6
2337else
2338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h. */
2340$5
2341int
2342main ()
2343{
2344static $2 ac_aggr;
2345if (ac_aggr.$3)
2346return 0;
2347 ;
2348 return 0;
2349}
2350_ACEOF
2351if ac_fn_c_try_compile "$LINENO"; then :
2352 eval "$4=yes"
2353else
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h. */
2356$5
2357int
2358main ()
2359{
2360static $2 ac_aggr;
2361if (sizeof ac_aggr.$3)
2362return 0;
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367if ac_fn_c_try_compile "$LINENO"; then :
2368 eval "$4=yes"
2369else
2370 eval "$4=no"
2371fi
2372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2373fi
2374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375fi
2376eval ac_res=\$$4
2377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2378$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002379 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002380
2381} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002383This file contains any messages produced by compilers while
2384running configure, to aid debugging if configure makes a mistake.
2385
Pablo Galindod4fe0982020-05-19 03:33:01 +01002386It was created by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002387generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
2389 $ $0 $@
2390
2391_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002393{
2394cat <<_ASUNAME
2395## --------- ##
2396## Platform. ##
2397## --------- ##
2398
2399hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2400uname -m = `(uname -m) 2>/dev/null || echo unknown`
2401uname -r = `(uname -r) 2>/dev/null || echo unknown`
2402uname -s = `(uname -s) 2>/dev/null || echo unknown`
2403uname -v = `(uname -v) 2>/dev/null || echo unknown`
2404
2405/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2406/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2407
2408/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2409/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2410/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002412/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2413/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2414/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2415
2416_ASUNAME
2417
2418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 $as_echo "PATH: $as_dir"
2424 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002426
2427} >&5
2428
2429cat >&5 <<_ACEOF
2430
2431
2432## ----------- ##
2433## Core tests. ##
2434## ----------- ##
2435
2436_ACEOF
2437
2438
2439# Keep a trace of the command line.
2440# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002441# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002442# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002443# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002444ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002445ac_configure_args0=
2446ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002447ac_must_keep_next=false
2448for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002449do
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 for ac_arg
2451 do
2452 case $ac_arg in
2453 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2454 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2455 | -silent | --silent | --silen | --sile | --sil)
2456 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002459 esac
2460 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002462 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002465 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002467 case $ac_arg in
2468 *=* | --config-cache | -C | -disable-* | --disable-* \
2469 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2470 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2471 | -with-* | --with-* | -without-* | --without-* | --x)
2472 case "$ac_configure_args0 " in
2473 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2474 esac
2475 ;;
2476 -* ) ac_must_keep_next=true ;;
2477 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 ;;
2481 esac
2482 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002483done
Matthias Kloseb9621712010-04-24 17:59:49 +00002484{ ac_configure_args0=; unset ac_configure_args0;}
2485{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002486
2487# When interrupted or exit'd, cleanup temporary files, and complete
2488# config.log. We remove comments because anyway the quotes in there
2489# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490# WARNING: Use '\'' to represent an apostrophe within the trap.
2491# 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 +00002492trap 'exit_status=$?
2493 # Save into config.log some information that might help in debugging.
2494 {
2495 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002496
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002498## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 echo
2501 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502(
2503 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2504 eval ac_val=\$$ac_var
2505 case $ac_val in #(
2506 *${as_nl}*)
2507 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2509$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
2511 case $ac_var in #(
2512 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2514 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac ;;
2516 esac
2517 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2520 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 "s/'\''/'\''\\\\'\'''\''/g;
2523 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2524 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002525 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002527 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac |
2529 sort
2530)
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002532
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002534## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 echo
2537 for ac_var in $ac_subst_vars
2538 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 eval ac_val=\$$ac_var
2540 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 done | sort
2545 echo
2546
2547 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 echo
2552 for ac_var in $ac_subst_files
2553 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 eval ac_val=\$$ac_var
2555 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 done | sort
2560 echo
2561 fi
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002565## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo
2570 fi
2571 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 $as_echo "$as_me: caught signal $ac_signal"
2573 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 rm -f core *.core core.conftest.* &&
2576 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002579for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002581done
2582ac_signal=0
2583
2584# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002586
Matthias Kloseb9621712010-04-24 17:59:49 +00002587$as_echo "/* confdefs.h */" > confdefs.h
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589# Predefined preprocessor variables.
2590
2591cat >>confdefs.h <<_ACEOF
2592#define PACKAGE_NAME "$PACKAGE_NAME"
2593_ACEOF
2594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595cat >>confdefs.h <<_ACEOF
2596#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2597_ACEOF
2598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599cat >>confdefs.h <<_ACEOF
2600#define PACKAGE_VERSION "$PACKAGE_VERSION"
2601_ACEOF
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603cat >>confdefs.h <<_ACEOF
2604#define PACKAGE_STRING "$PACKAGE_STRING"
2605_ACEOF
2606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607cat >>confdefs.h <<_ACEOF
2608#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2609_ACEOF
2610
Matthias Kloseb9621712010-04-24 17:59:49 +00002611cat >>confdefs.h <<_ACEOF
2612#define PACKAGE_URL "$PACKAGE_URL"
2613_ACEOF
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615
2616# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002617# Prefer an explicitly selected file to automatically selected ones.
2618ac_site_file1=NONE
2619ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002621 # We do not want a PATH search for config.site.
2622 case $CONFIG_SITE in #((
2623 -*) ac_site_file1=./$CONFIG_SITE;;
2624 */*) ac_site_file1=$CONFIG_SITE;;
2625 *) ac_site_file1=./$CONFIG_SITE;;
2626 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 ac_site_file1=$prefix/share/config.site
2629 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630else
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 ac_site_file1=$ac_default_prefix/share/config.site
2632 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002634for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635do
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 test "x$ac_site_file" = xNONE && continue
2637 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2639$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002641 . "$ac_site_file" \
2642 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2644as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002645See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002646 fi
2647done
2648
2649if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 # Some versions of bash will fail to source /dev/null (special files
2651 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2652 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2654$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2657 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 esac
2659 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660else
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2662$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 >$cache_file
2664fi
2665
2666# Check that the precious variables saved in the cache have kept the same
2667# value.
2668ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2671 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2673 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $ac_old_set,$ac_new_set in
2675 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2677$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 +00002678 ac_cache_corrupted=: ;;
2679 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2681$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 ac_cache_corrupted=: ;;
2683 ,);;
2684 *)
2685 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 # differences in whitespace do not lead to failure.
2687 ac_old_val_w=`echo x $ac_old_val`
2688 ac_new_val_w=`echo x $ac_new_val`
2689 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2691$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2692 ac_cache_corrupted=:
2693 else
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2695$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2696 eval $ac_var=\$ac_old_val
2697 fi
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2699$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2701$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 fi;;
2703 esac
2704 # Pass precious variables to config.status.
2705 if test "$ac_new_set" = set; then
2706 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 *) ac_arg=$ac_var=$ac_new_val ;;
2709 esac
2710 case " $ac_configure_args " in
2711 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 esac
2714 fi
2715done
2716if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2720$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002721 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002723## -------------------- ##
2724## Main body of script. ##
2725## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002726
Guido van Rossum7f43da71994-08-01 12:15:30 +00002727ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2731ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002732
Guido van Rossum627b2d71993-12-24 10:39:16 +00002733
Michael W. Hudson54241132001-12-07 15:38:26 +00002734
Trent Nelson4d4ec652012-10-16 08:51:24 -04002735
Christian Heimesff5be6e2018-01-20 13:19:21 +01002736
2737
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002738if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002739 # If we're building out-of-tree, we need to make sure the following
2740 # resources get picked up before their $srcdir counterparts.
2741 # Objects/ -> typeslots.inc
2742 # Include/ -> Python-ast.h, graminit.h
2743 # Python/ -> importlib.h
2744 # (A side effect of this is that these resources will automatically be
2745 # regenerated when building out-of-tree, regardless of whether or not
2746 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2747 # off.)
2748 BASECPPFLAGS="-IObjects -IInclude -IPython"
2749else
2750 BASECPPFLAGS=""
2751fi
2752
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753
2754
2755
2756
Victor Stinner9ed34a82017-05-02 22:35:58 +02002757if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759# Extract the first word of "git", so it can be a program name with args.
2760set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2762$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764 $as_echo_n "(cached) " >&6
2765else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766 if test -n "$HAS_GIT"; then
2767 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768else
2769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2770for as_dir in $PATH
2771do
2772 IFS=$as_save_IFS
2773 test -z "$as_dir" && as_dir=.
2774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002776 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2778 break 2
2779 fi
2780done
2781 done
2782IFS=$as_save_IFS
2783
Ned Deily5c4b0d02017-03-04 00:19:55 -05002784 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002785fi
2786fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002787HAS_GIT=$ac_cv_prog_HAS_GIT
2788if test -n "$HAS_GIT"; then
2789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2790$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791else
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793$as_echo "no" >&6; }
2794fi
2795
2796
2797else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002798HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002800if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002801then
Xiang Zhang4c855572018-08-20 22:36:19 +08002802 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2803 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2804 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002805else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002806 GITVERSION=""
2807 GITTAG=""
2808 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809fi
2810
2811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002813
2814
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002815ac_aux_dir=
2816for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2817 if test -f "$ac_dir/install-sh"; then
2818 ac_aux_dir=$ac_dir
2819 ac_install_sh="$ac_aux_dir/install-sh -c"
2820 break
2821 elif test -f "$ac_dir/install.sh"; then
2822 ac_aux_dir=$ac_dir
2823 ac_install_sh="$ac_aux_dir/install.sh -c"
2824 break
2825 elif test -f "$ac_dir/shtool"; then
2826 ac_aux_dir=$ac_dir
2827 ac_install_sh="$ac_aux_dir/shtool install -c"
2828 break
2829 fi
2830done
2831if test -z "$ac_aux_dir"; then
2832 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2833fi
2834
2835# These three variables are undocumented and unsupported,
2836# and are intended to be withdrawn in a future Autoconf release.
2837# They can cause serious problems if a builder's source tree is in a directory
2838# whose full name contains unusual characters.
2839ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2840ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2841ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2842
2843
2844# Make sure we can run config.sub.
2845$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2846 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2847
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2849$as_echo_n "checking build system type... " >&6; }
2850if ${ac_cv_build+:} false; then :
2851 $as_echo_n "(cached) " >&6
2852else
2853 ac_build_alias=$build_alias
2854test "x$ac_build_alias" = x &&
2855 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2856test "x$ac_build_alias" = x &&
2857 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2858ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2860
2861fi
2862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2863$as_echo "$ac_cv_build" >&6; }
2864case $ac_cv_build in
2865*-*-*) ;;
2866*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2867esac
2868build=$ac_cv_build
2869ac_save_IFS=$IFS; IFS='-'
2870set x $ac_cv_build
2871shift
2872build_cpu=$1
2873build_vendor=$2
2874shift; shift
2875# Remember, the first character of IFS is used to create $*,
2876# except with old shells:
2877build_os=$*
2878IFS=$ac_save_IFS
2879case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2880
2881
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2883$as_echo_n "checking host system type... " >&6; }
2884if ${ac_cv_host+:} false; then :
2885 $as_echo_n "(cached) " >&6
2886else
2887 if test "x$host_alias" = x; then
2888 ac_cv_host=$ac_cv_build
2889else
2890 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2891 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2892fi
2893
2894fi
2895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2896$as_echo "$ac_cv_host" >&6; }
2897case $ac_cv_host in
2898*-*-*) ;;
2899*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2900esac
2901host=$ac_cv_host
2902ac_save_IFS=$IFS; IFS='-'
2903set x $ac_cv_host
2904shift
2905host_cpu=$1
2906host_vendor=$2
2907shift; shift
2908# Remember, the first character of IFS is used to create $*,
2909# except with old shells:
2910host_os=$*
2911IFS=$ac_save_IFS
2912case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2913
2914
2915
doko@python.orga10e4a92013-01-25 18:45:12 +01002916
2917
Ned Deilyfcbc2462014-08-22 13:32:49 -07002918# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2919rm -f pybuilddir.txt
2920
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921for ac_prog in python$PACKAGE_VERSION python3 python
2922do
2923 # Extract the first word of "$ac_prog", so it can be a program name with args.
2924set dummy $ac_prog; ac_word=$2
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2926$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002927if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928 $as_echo_n "(cached) " >&6
2929else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930 if test -n "$PYTHON_FOR_REGEN"; then
2931 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932else
2933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2934for as_dir in $PATH
2935do
2936 IFS=$as_save_IFS
2937 test -z "$as_dir" && as_dir=.
2938 for ac_exec_ext in '' $ac_executable_extensions; do
2939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002940 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2942 break 2
2943 fi
2944done
2945 done
2946IFS=$as_save_IFS
2947
2948fi
2949fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002950PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2951if test -n "$PYTHON_FOR_REGEN"; then
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2953$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002954else
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2956$as_echo "no" >&6; }
2957fi
2958
2959
Victor Stinnera5c62a82017-05-03 18:21:48 +02002960 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002961done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002962test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002963
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002964
2965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002966if test "$cross_compiling" = yes; then
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2968$as_echo_n "checking for python interpreter for cross build... " >&6; }
2969 if test -z "$PYTHON_FOR_BUILD"; then
2970 for interp in python$PACKAGE_VERSION python3 python; do
2971 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002972 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 +02002973 break
2974 fi
2975 interp=
2976 done
2977 if test x$interp = x; then
2978 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2979 fi
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2981$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002982 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 +02002983 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002984elif test "$cross_compiling" = maybe; then
2985 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002986else
2987 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2988fi
2989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991
Benjamin Petersond23f8222009-04-05 19:13:16 +00002992if test "$prefix" != "/"; then
2993 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
2998
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002999# We don't use PACKAGE_ variables, and they cause conflicts
3000# with other autoconf-based packages that include Python.h
3001grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3002rm confdefs.h
3003mv confdefs.h.new confdefs.h
3004
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003005
Pablo Galindod4fe0982020-05-19 03:33:01 +01003006VERSION=3.10
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003007
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003008# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009
3010SOVERSION=1.0
3011
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012# The later defininition of _XOPEN_SOURCE disables certain features
3013# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003016
3017
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3019# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3020# them.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003023
3024
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3027# them.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003030
3031
Martin v. Löwisd6320502004-08-12 13:45:08 +00003032# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003033# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3034# them.
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003037
3038
3039
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003040define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003041
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003042# Arguments passed to configure.
3043
3044CONFIG_ARGS="$ac_configure_args"
3045
Matthias Kloseb9621712010-04-24 17:59:49 +00003046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3047$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003049if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 case $enableval in
3052 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003053 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054 # information
3055 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003056 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3059 if test ! -d "${enableval}"
3060 then
3061 enableval=/
3062 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064 ;;
3065 esac
3066 case $enableval in
3067 no)
3068 UNIVERSALSDK=
3069 enable_universalsdk=
3070 ;;
3071 *)
3072 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073 if test ! -d "${UNIVERSALSDK}"
3074 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003075 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077 ;;
3078 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003079
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080
Thomas Wouters477c8d52006-05-27 19:21:47 +00003081else
3082
3083 UNIVERSALSDK=
3084 enable_universalsdk=
3085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088if test -n "${UNIVERSALSDK}"
3089then
Matthias Kloseb9621712010-04-24 17:59:49 +00003090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3091$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092else
Matthias Kloseb9621712010-04-24 17:59:49 +00003093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003098
Ned Deily87adb6e2013-10-18 21:09:56 -07003099ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003100
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101# For backward compatibility reasons we prefer to select '32-bit' if available,
3102# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003104if test "`uname -s`" = "Darwin"
3105then
3106 if test -n "${UNIVERSALSDK}"
3107 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003108 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003109 then
3110 UNIVERSAL_ARCHS="intel"
3111 fi
3112 fi
3113fi
3114
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3117$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118
3119# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122 UNIVERSAL_ARCHS="$withval"
3123
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003124fi
3125
Ned Deily87adb6e2013-10-18 21:09:56 -07003126if test -n "${UNIVERSALSDK}"
3127then
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3129$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3130else
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3132$as_echo "no" >&6; }
3133fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003135
3136# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003137if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003138 withval=$with_framework_name;
3139 PYTHONFRAMEWORK=${withval}
3140 PYTHONFRAMEWORKDIR=${withval}.framework
3141 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3142
3143else
3144
3145 PYTHONFRAMEWORK=Python
3146 PYTHONFRAMEWORKDIR=Python.framework
3147 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3148
3149fi
3150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003152if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003154 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003155 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003156 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 esac
3158 case $enableval in
3159 no)
3160 PYTHONFRAMEWORK=
3161 PYTHONFRAMEWORKDIR=no-framework
3162 PYTHONFRAMEWORKPREFIX=
3163 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003164 FRAMEWORKINSTALLFIRST=
3165 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003166 FRAMEWORKALTINSTALLFIRST=
3167 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003168 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003169 if test "x${prefix}" = "xNONE"; then
3170 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003175 ;;
3176 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003180 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003181 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3182 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003183 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003185
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186 if test "x${prefix}" = "xNONE" ; then
3187 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189 else
3190 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3191 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003192
3193 case "${enableval}" in
3194 /System*)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 if test "${prefix}" = "NONE" ; then
3197 # See below
3198 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3199 fi
3200 ;;
3201
3202 /Library*)
3203 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3204 ;;
3205
3206 */Library/Frameworks)
3207 MDIR="`dirname "${enableval}"`"
3208 MDIR="`dirname "${MDIR}"`"
3209 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3210
3211 if test "${prefix}" = "NONE"; then
3212 # User hasn't specified the
3213 # --prefix option, but wants to install
3214 # the framework in a non-default location,
3215 # ensure that the compatibility links get
3216 # installed relative to that prefix as well
3217 # instead of in /usr/local.
3218 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3219 fi
3220 ;;
3221
3222 *)
3223 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3224 ;;
3225 esac
3226
Jack Jansen127e56e2001-09-11 14:41:54 +00003227 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3236
3237 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
Guido van Rossum563e7081996-09-10 18:20:48 +00003241else
Martin v. Löwis11437992002-04-12 09:54:03 +00003242
Jack Jansene578a632001-08-15 01:27:14 +00003243 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003244 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003245 PYTHONFRAMEWORKPREFIX=
3246 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003247 FRAMEWORKINSTALLFIRST=
3248 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003249 FRAMEWORKALTINSTALLFIRST=
3250 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003251 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003252 if test "x${prefix}" = "xNONE" ; then
3253 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3254 else
3255 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3256 fi
Jack Jansene578a632001-08-15 01:27:14 +00003257 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260fi
3261
Thomas Wouters477c8d52006-05-27 19:21:47 +00003262
3263
Michael W. Hudson54241132001-12-07 15:38:26 +00003264
3265
3266
3267
Jack Jansene578a632001-08-15 01:27:14 +00003268
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003269
3270
3271
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003272
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003273
Ned Deilyb8f944f2013-11-21 22:42:25 -08003274
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003275
3276cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003277#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003278_ACEOF
3279
3280
Jack Jansene578a632001-08-15 01:27:14 +00003281##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003282## AS_HELP_STRING([--with-dyld],
Anthony Shaw2de064e2020-01-14 17:40:10 +11003283## [use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003284##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285# Set name for machine-dependent library files
3286
Matthias Kloseb9621712010-04-24 17:59:49 +00003287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3288$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289if test -z "$MACHDEP"
3290then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 # avoid using uname for cross builds
3292 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003293 # ac_sys_system and ac_sys_release are used for setting
3294 # a lot of different things including 'define_xopen_source'
3295 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003297 *-*-linux-android*)
3298 ac_sys_system=Linux-android
3299 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003300 *-*-linux*)
3301 ac_sys_system=Linux
3302 ;;
3303 *-*-cygwin*)
3304 ac_sys_system=Cygwin
3305 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003306 *-*-vxworks*)
3307 ac_sys_system=VxWorks
3308 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 ac_sys_release=
3315 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003316 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003317 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003318 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 fi
3324 ac_md_system=`echo $ac_sys_system |
3325 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3326 ac_md_release=`echo $ac_sys_release |
3327 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3328 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003329
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003331 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003332 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003333 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003334 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003335 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003337fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3339$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003340
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003341
3342if test "$cross_compiling" = yes; then
3343 case "$host" in
3344 *-*-linux*)
3345 case "$host_cpu" in
3346 arm*)
3347 _host_cpu=arm
3348 ;;
3349 *)
3350 _host_cpu=$host_cpu
3351 esac
3352 ;;
3353 *-*-cygwin*)
3354 _host_cpu=
3355 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003356 *-*-vxworks*)
3357 _host_cpu=$host_cpu
3358 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003359 *)
3360 # for now, limit cross builds to known configurations
3361 MACHDEP="unknown"
3362 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3363 esac
3364 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3365fi
3366
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003367# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3368# disable features if it is defined, without any means to access these
3369# features as extensions. For these systems, we skip the definition of
3370# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3371# some feature, make sure there is no alternative way to access this
3372# feature. Also, when using wildcards, make sure you have verified the
3373# need for not defining _XOPEN_SOURCE on all systems matching the
3374# wildcard, and that the wildcard does not include future systems
3375# (which may remove their limitations).
3376case $ac_sys_system/$ac_sys_release in
3377 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3378 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003379 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003380 # In addition, Stefan Krah confirms that issue #1244610 exists through
3381 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003382 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003383 define_xopen_source=no
3384 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3385 # also defined. This can be overridden by defining _BSD_SOURCE
3386 # As this has a different meaning on Linux, only define it on OpenBSD
3387
Matthias Kloseb9621712010-04-24 17:59:49 +00003388$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003389
3390 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003391 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003392 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3393 # also defined. This can be overridden by defining _BSD_SOURCE
3394 # As this has a different meaning on Linux, only define it on OpenBSD
3395
Matthias Kloseb9621712010-04-24 17:59:49 +00003396$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003397
3398 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003399 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3400 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3401 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003402 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 +00003403 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003404 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3405 # request to enable features supported by the standard as a request
3406 # to disable features not supported by the standard. The best way
3407 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3408 # entirely and define __EXTENSIONS__ instead.
3409 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003410 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003411 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3412 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003413 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003414 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003415 define_xopen_source=no;;
3416 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003417 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003418 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003419 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003420 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3421 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3422 # identifies itself as Darwin/7.*
3423 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3424 # disables platform specific features beyond repair.
3425 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3426 # has no effect, don't bother defining them
3427 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003428 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003429 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003430 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003431 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3432 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3433 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003434 AIX/4)
3435 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003436 AIX/5)
3437 if test `uname -r` -eq 1; then
3438 define_xopen_source=no
3439 fi
3440 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003441 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3442 # defining NI_NUMERICHOST.
3443 QNX/6.3.2)
3444 define_xopen_source=no
3445 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003446 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3447 # in network headers still using system V types.
3448 VxWorks/*)
3449 define_xopen_source=no
3450 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003451
Ian Nortona9edf442020-02-14 03:09:11 +00003452 # On HP-UX, defining _XOPEN_SOURCE to 600 or greater hides
3453 # chroot() and other functions
3454 hp*|HP*)
3455 define_xopen_source=no
3456 ;;
3457
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003458esac
3459
3460if test $define_xopen_source = yes
3461then
Victor Stinner14d098d2011-09-07 22:29:43 +02003462 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Victor Stinner14d098d2011-09-07 22:29:43 +02003464$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003465
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003466
3467 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3468 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3469 # several APIs are not declared. Since this is also needed in some
3470 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
3474
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003475
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003476$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003477
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003478fi
3479
Christian Heimes647cd872013-12-07 23:39:33 +01003480# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3481case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003482 hp*|HP*)
3483 define_stdc_a1=yes;;
3484 *)
3485 define_stdc_a1=no;;
3486esac
3487
3488if test $define_stdc_a1 = yes
3489then
Christian Heimes647cd872013-12-07 23:39:33 +01003490
3491$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3492
Christian Heimesb02bcae2013-12-08 15:21:08 +01003493fi
Christian Heimes647cd872013-12-07 23:39:33 +01003494
Jack Jansen6b08a402004-06-03 12:41:45 +00003495# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3496# it may influence the way we can build extensions, so distutils
3497# needs to check it
3498
Thomas Wouters477c8d52006-05-27 19:21:47 +00003499
Jack Jansen6b08a402004-06-03 12:41:45 +00003500CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003501EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003502
Guido van Rossum627b2d71993-12-24 10:39:16 +00003503# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003504
3505# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3506# for debug/optimization stuff. BASECFLAGS is for flags that are required
3507# just to get things to compile and link. Users are free to override OPT
3508# when running configure or make. The build should not break if they do.
3509# BASECFLAGS should generally not be messed with, however.
3510
Guido van Rossum8b131c51995-03-09 14:10:13 +00003511# If the user switches compilers, we can't believe the cache
3512if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3513then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003514 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003515(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003516fi
3517
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003518# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3519# when the compiler supports them, but we don't always want -O2, and
3520# we set -g later.
3521if test -z "$CFLAGS"; then
3522 CFLAGS=
3523fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524
3525if test "$ac_sys_system" = "Darwin"
3526then
3527 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003528 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 # information
3530 if test -z "${CC}"
3531 then
3532 found_gcc=
3533 found_clang=
3534 as_save_IFS=$IFS; IFS=:
3535 for as_dir in $PATH
3536 do
3537 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003538 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003540 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003541 fi
3542 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003543 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003545 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003546 fi
3547 fi
3548 done
3549 IFS=$as_save_IFS
3550
3551 if test -n "$found_gcc" -a -n "$found_clang"
3552 then
3553 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3554 then
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3556$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3557 CC="$found_clang"
3558 CXX="$found_clang++"
3559 fi
3560
3561
3562 elif test -z "$found_gcc" -a -n "$found_clang"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3565$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3566 CC="$found_clang"
3567 CXX="$found_clang++"
3568
3569 elif test -z "$found_gcc" -a -z "$found_clang"
3570 then
3571 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3572 if test -n "${found_clang}"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3575$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3576 CC="${found_clang}"
3577 CXX="`/usr/bin/xcrun -find clang++`"
3578
3579 # else: use default behaviour
3580 fi
3581 fi
3582 fi
3583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003584ac_ext=c
3585ac_cpp='$CPP $CPPFLAGS'
3586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3588ac_compiler_gnu=$ac_cv_c_compiler_gnu
3589if test -n "$ac_tool_prefix"; then
3590 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3591set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3593$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003594if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003596else
3597 if test -n "$CC"; then
3598 ac_cv_prog_CC="$CC" # Let the user override the test.
3599else
Martin v. Löwis11437992002-04-12 09:54:03 +00003600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601for as_dir in $PATH
3602do
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 $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 +00003609 break 2
3610 fi
3611done
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003614
Jack Jansendd19cf82001-12-06 22:36:17 +00003615fi
3616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003617CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003618if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3620$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003621else
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3623$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003624fi
3625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627fi
3628if test -z "$ac_cv_prog_CC"; then
3629 ac_ct_CC=$CC
3630 # Extract the first word of "gcc", so it can be a program name with args.
3631set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003634if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003636else
3637 if test -n "$ac_ct_CC"; then
3638 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3639else
3640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
3655fi
3656fi
3657ac_ct_CC=$ac_cv_prog_ac_ct_CC
3658if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3660$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666 if test "x$ac_ct_CC" = x; then
3667 CC=""
3668 else
3669 case $cross_compiling:$ac_tool_warned in
3670yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673ac_tool_warned=yes ;;
3674esac
3675 CC=$ac_ct_CC
3676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
3678 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003679fi
3680
Jack Jansendd19cf82001-12-06 22:36:17 +00003681if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test -n "$ac_tool_prefix"; then
3683 # 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 +00003684set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003687if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003689else
3690 if test -n "$CC"; then
3691 ac_cv_prog_CC="$CC" # Let the user override the test.
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $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 +00003702 break 2
3703 fi
3704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708fi
3709fi
3710CC=$ac_cv_prog_CC
3711if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3713$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003717fi
3718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 # Extract the first word of "cc", so it can be a program name with args.
3724set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3726$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003727if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003729else
3730 if test -n "$CC"; then
3731 ac_cv_prog_CC="$CC" # Let the user override the test.
3732else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3742 ac_prog_rejected=yes
3743 continue
3744 fi
3745 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 $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 +00003747 break 2
3748 fi
3749done
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test $ac_prog_rejected = yes; then
3754 # We found a bogon in the path, so make sure we never use it.
3755 set dummy $ac_cv_prog_CC
3756 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758 # We chose a different compiler from the bogus one.
3759 # However, it has the same basename, so the bogon will be chosen
3760 # first if we set CC to just the basename; use the full file name.
3761 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003762 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763 fi
3764fi
3765fi
3766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003767CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3770$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771else
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3773$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774fi
3775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
3778if test -z "$CC"; then
3779 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 do
3782 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3783set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3785$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003786if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003788else
3789 if test -n "$CC"; then
3790 ac_cv_prog_CC="$CC" # Let the user override the test.
3791else
Martin v. Löwis11437992002-04-12 09:54:03 +00003792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3793for as_dir in $PATH
3794do
3795 IFS=$as_save_IFS
3796 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $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 +00003801 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003803done
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
3807fi
3808fi
3809CC=$ac_cv_prog_CC
3810if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3812$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003816fi
3817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 test -n "$CC" && break
3820 done
3821fi
3822if test -z "$CC"; then
3823 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003825do
3826 # Extract the first word of "$ac_prog", so it can be a program name with args.
3827set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3829$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003830if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
3833 if test -n "$ac_ct_CC"; then
3834 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3835else
3836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3837for as_dir in $PATH
3838do
3839 IFS=$as_save_IFS
3840 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 $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 +00003845 break 2
3846 fi
3847done
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851fi
3852fi
3853ac_ct_CC=$ac_cv_prog_ac_ct_CC
3854if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3856$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003857else
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 test -n "$ac_ct_CC" && break
3864done
Michael W. Hudson54241132001-12-07 15:38:26 +00003865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003866 if test "x$ac_ct_CC" = x; then
3867 CC=""
3868 else
3869 case $cross_compiling:$ac_tool_warned in
3870yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003871{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3872$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873ac_tool_warned=yes ;;
3874esac
3875 CC=$ac_ct_CC
3876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878
3879fi
3880
3881
Matthias Kloseb9621712010-04-24 17:59:49 +00003882test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003884as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003885See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
3887# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003888$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3889set X $ac_compile
3890ac_compiler=$2
3891for ac_option in --version -v -V -qversion; do
3892 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
3899 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 if test -s conftest.err; then
3902 sed '10a\
3903... rest of stderr output deleted ...
3904 10q' conftest.err >conftest.er1
3905 cat conftest.er1 >&5
3906 fi
3907 rm -f conftest.er1 conftest.err
3908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909 test $ac_status = 0; }
3910done
Martin v. Löwis11437992002-04-12 09:54:03 +00003911
Matthias Kloseb9621712010-04-24 17:59:49 +00003912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003913/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003914
Martin v. Löwis11437992002-04-12 09:54:03 +00003915int
3916main ()
3917{
3918
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003924ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003925# Try to create an executable without -o first, disregard a.out.
3926# It will help us diagnose broken compilers, and finding out an intuition
3927# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3929$as_echo_n "checking whether the C compiler works... " >&6; }
3930ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3931
3932# The possible output files:
3933ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935ac_rmfiles=
3936for ac_file in $ac_files
3937do
3938 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3941 esac
3942done
3943rm -f $ac_rmfiles
3944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3951$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3955 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3957# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3958# in a Makefile. We should not override ac_cv_exeext if it was cached,
3959# so that the user can short-circuit this test for compilers unknown to
3960# Autoconf.
3961for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003962do
3963 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966 ;;
3967 [ab].out )
3968 # We found the default executable, but exeext='' is most
3969 # certainly right.
3970 break;;
3971 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 then :; else
3974 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3975 fi
3976 # We set ac_cv_exeext here because the later test for it is not
3977 # safe: cross compilers may not add the suffix if given an `-o'
3978 # argument, so we may need to know it at that point already.
3979 # Even if this section looks crufty: it has the advantage of
3980 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 break;;
3982 * )
3983 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 esac
3985done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986test "$ac_cv_exeext" = no && ac_cv_exeext=
3987
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003988else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 ac_file=''
3990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003991if test -z "$ac_file"; then :
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3993$as_echo "no" >&6; }
3994$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003995sed 's/^/| /' conftest.$ac_ext >&5
3996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003999as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004000See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004001else
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4003$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4006$as_echo_n "checking for C compiler default output file name... " >&6; }
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4008$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
Matthias Kloseb9621712010-04-24 17:59:49 +00004011rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4014$as_echo_n "checking for suffix of executables... " >&6; }
4015if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4027# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4028# work properly (i.e., refer to `conftest.exe'), while it won't with
4029# `rm'.
4030for ac_file in conftest.exe conftest conftest.*; do
4031 test -f "$ac_file" || continue
4032 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4035 break;;
4036 * ) break;;
4037 esac
4038done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039else
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004042as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004043See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004045rm -f conftest conftest$ac_cv_exeext
4046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4047$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004048
4049rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004050EXEEXT=$ac_cv_exeext
4051ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4053/* end confdefs.h. */
4054#include <stdio.h>
4055int
4056main ()
4057{
4058FILE *f = fopen ("conftest.out", "w");
4059 return ferror (f) || fclose (f) != 0;
4060
4061 ;
4062 return 0;
4063}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004065ac_clean_files="$ac_clean_files conftest.out"
4066# Check that the compiler produces executables we can run. If not, either
4067# the compiler is broken, or we cross compile.
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4069$as_echo_n "checking whether we are cross compiling... " >&6; }
4070if test "$cross_compiling" != yes; then
4071 { { ac_try="$ac_link"
4072case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_link") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }
4082 if { ac_try='./conftest$ac_cv_exeext'
4083 { { case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086esac
4087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088$as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_try") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }; }; then
4093 cross_compiling=no
4094 else
4095 if test "$cross_compiling" = maybe; then
4096 cross_compiling=yes
4097 else
4098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004100as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004101If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004102See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 fi
4104 fi
4105fi
4106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4107$as_echo "$cross_compiling" >&6; }
4108
4109rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4110ac_clean_files=$ac_clean_files_save
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4112$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004113if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
4115else
4116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117/* end confdefs.h. */
4118
4119int
4120main ()
4121{
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004128if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129case "(($ac_try" in
4130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4131 *) ac_try_echo=$ac_try;;
4132esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4134$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4138 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139 for ac_file in conftest.o conftest.obj conftest.*; do
4140 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4144 break;;
4145 esac
4146done
4147else
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004149sed 's/^/| /' conftest.$ac_ext >&5
4150
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004153as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004154See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004156rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4159$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160OBJEXT=$ac_cv_objext
4161ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4163$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004164if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004169
Martin v. Löwis11437992002-04-12 09:54:03 +00004170int
4171main ()
4172{
4173#ifndef __GNUC__
4174 choke me
4175#endif
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 ac_compiler_gnu=yes
4183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_cv_c_compiler_gnu=$ac_compiler_gnu
4188
4189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4191$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4192if test $ac_compiler_gnu = yes; then
4193 GCC=yes
4194else
4195 GCC=
4196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004197ac_test_CFLAGS=${CFLAGS+set}
4198ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4200$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004201if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004203else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204 ac_save_c_werror_flag=$ac_c_werror_flag
4205 ac_c_werror_flag=yes
4206 ac_cv_prog_cc_g=no
4207 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
Martin v. Löwis11437992002-04-12 09:54:03 +00004211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004220 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221else
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 CFLAGS=""
4223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224/* end confdefs.h. */
4225
4226int
4227main ()
4228{
4229
4230 ;
4231 return 0;
4232}
4233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235
Matthias Kloseb9621712010-04-24 17:59:49 +00004236else
4237 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4258 ac_c_werror_flag=$ac_save_c_werror_flag
4259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4261$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264elif test $ac_cv_prog_cc_g = yes; then
4265 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004266 CFLAGS="-g -O2"
4267 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269 fi
4270else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004271 if test "$GCC" = yes; then
4272 CFLAGS="-O2"
4273 else
4274 CFLAGS=
4275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4278$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004279if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004280 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004281else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004283ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285/* end confdefs.h. */
4286#include <stdarg.h>
4287#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004288struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004289/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4290struct buf { int x; };
4291FILE * (*rcsopen) (struct buf *, struct stat *, int);
4292static char *e (p, i)
4293 char **p;
4294 int i;
4295{
4296 return p[i];
4297}
4298static char *f (char * (*g) (char **, int), char **p, ...)
4299{
4300 char *s;
4301 va_list v;
4302 va_start (v,p);
4303 s = g (p, va_arg (v,int));
4304 va_end (v);
4305 return s;
4306}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004307
4308/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4309 function prototypes and stuff, but not '\xHH' hex character constants.
4310 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004312 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4313 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004315int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4318 inside strings and character constants. */
4319#define FOO(x) 'x'
4320int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4321
Skip Montanaro6dead952003-09-25 14:50:04 +00004322int test (int i, double x);
4323struct s1 {int (*f) (int a);};
4324struct s2 {int (*f) (double a);};
4325int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4326int argc;
4327char **argv;
4328int
4329main ()
4330{
4331return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4332 ;
4333 return 0;
4334}
4335_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4337 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004338do
4339 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343rm -f core conftest.err conftest.$ac_objext
4344 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004345done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004347CC=$ac_save_CC
4348
4349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350# AC_CACHE_VAL
4351case "x$ac_cv_prog_cc_c89" in
4352 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4354$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4357$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004358 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4361$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004362esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004363if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Matthias Kloseb9621712010-04-24 17:59:49 +00004365fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004366
Martin v. Löwis11437992002-04-12 09:54:03 +00004367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004372
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4379$as_echo_n "checking how to run the C preprocessor... " >&6; }
4380# On Suns, sometimes $CPP names a directory.
4381if test -n "$CPP" && test -d "$CPP"; then
4382 CPP=
4383fi
4384if test -z "$CPP"; then
4385 if ${ac_cv_prog_CPP+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 # Double quotes because CPP needs to be expanded
4389 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4390 do
4391 ac_preproc_ok=false
4392for ac_c_preproc_warn_flag in '' yes
4393do
4394 # Use a header file that comes with gcc, so configuring glibc
4395 # with a fresh cross-compiler works.
4396 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4397 # <limits.h> exists even on freestanding compilers.
4398 # On the NeXT, cc -E runs the code through the compiler's parser,
4399 # not just through cpp. "Syntax error" is here to catch this case.
4400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h. */
4402#ifdef __STDC__
4403# include <limits.h>
4404#else
4405# include <assert.h>
4406#endif
4407 Syntax error
4408_ACEOF
4409if ac_fn_c_try_cpp "$LINENO"; then :
4410
4411else
4412 # Broken: fails on valid input.
4413continue
4414fi
4415rm -f conftest.err conftest.i conftest.$ac_ext
4416
4417 # OK, works on sane cases. Now check whether nonexistent headers
4418 # can be detected and how.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420/* end confdefs.h. */
4421#include <ac_nonexistent.h>
4422_ACEOF
4423if ac_fn_c_try_cpp "$LINENO"; then :
4424 # Broken: success on invalid input.
4425continue
4426else
4427 # Passes both tests.
4428ac_preproc_ok=:
4429break
4430fi
4431rm -f conftest.err conftest.i conftest.$ac_ext
4432
4433done
4434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4435rm -f conftest.i conftest.err conftest.$ac_ext
4436if $ac_preproc_ok; then :
4437 break
4438fi
4439
4440 done
4441 ac_cv_prog_CPP=$CPP
4442
4443fi
4444 CPP=$ac_cv_prog_CPP
4445else
4446 ac_cv_prog_CPP=$CPP
4447fi
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4449$as_echo "$CPP" >&6; }
4450ac_preproc_ok=false
4451for ac_c_preproc_warn_flag in '' yes
4452do
4453 # Use a header file that comes with gcc, so configuring glibc
4454 # with a fresh cross-compiler works.
4455 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4456 # <limits.h> exists even on freestanding compilers.
4457 # On the NeXT, cc -E runs the code through the compiler's parser,
4458 # not just through cpp. "Syntax error" is here to catch this case.
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461#ifdef __STDC__
4462# include <limits.h>
4463#else
4464# include <assert.h>
4465#endif
4466 Syntax error
4467_ACEOF
4468if ac_fn_c_try_cpp "$LINENO"; then :
4469
4470else
4471 # Broken: fails on valid input.
4472continue
4473fi
4474rm -f conftest.err conftest.i conftest.$ac_ext
4475
4476 # OK, works on sane cases. Now check whether nonexistent headers
4477 # can be detected and how.
4478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4479/* end confdefs.h. */
4480#include <ac_nonexistent.h>
4481_ACEOF
4482if ac_fn_c_try_cpp "$LINENO"; then :
4483 # Broken: success on invalid input.
4484continue
4485else
4486 # Passes both tests.
4487ac_preproc_ok=:
4488break
4489fi
4490rm -f conftest.err conftest.i conftest.$ac_ext
4491
4492done
4493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4494rm -f conftest.i conftest.err conftest.$ac_ext
4495if $ac_preproc_ok; then :
4496
4497else
4498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4500as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4501See \`config.log' for more details" "$LINENO" 5; }
4502fi
4503
4504ac_ext=c
4505ac_cpp='$CPP $CPPFLAGS'
4506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4508ac_compiler_gnu=$ac_cv_c_compiler_gnu
4509
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4511$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4512if ${ac_cv_path_GREP+:} false; then :
4513 $as_echo_n "(cached) " >&6
4514else
4515 if test -z "$GREP"; then
4516 ac_path_GREP_found=false
4517 # Loop through the user's path and test for each of PROGNAME-LIST
4518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4520do
4521 IFS=$as_save_IFS
4522 test -z "$as_dir" && as_dir=.
4523 for ac_prog in grep ggrep; do
4524 for ac_exec_ext in '' $ac_executable_extensions; do
4525 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4526 as_fn_executable_p "$ac_path_GREP" || continue
4527# Check for GNU ac_path_GREP and select it if it is found.
4528 # Check for GNU $ac_path_GREP
4529case `"$ac_path_GREP" --version 2>&1` in
4530*GNU*)
4531 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4532*)
4533 ac_count=0
4534 $as_echo_n 0123456789 >"conftest.in"
4535 while :
4536 do
4537 cat "conftest.in" "conftest.in" >"conftest.tmp"
4538 mv "conftest.tmp" "conftest.in"
4539 cp "conftest.in" "conftest.nl"
4540 $as_echo 'GREP' >> "conftest.nl"
4541 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4542 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4543 as_fn_arith $ac_count + 1 && ac_count=$as_val
4544 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4545 # Best one so far, save it but keep looking for a better one
4546 ac_cv_path_GREP="$ac_path_GREP"
4547 ac_path_GREP_max=$ac_count
4548 fi
4549 # 10*(2^10) chars as input seems more than enough
4550 test $ac_count -gt 10 && break
4551 done
4552 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4553esac
4554
4555 $ac_path_GREP_found && break 3
4556 done
4557 done
4558 done
4559IFS=$as_save_IFS
4560 if test -z "$ac_cv_path_GREP"; then
4561 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4562 fi
4563else
4564 ac_cv_path_GREP=$GREP
4565fi
4566
4567fi
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4569$as_echo "$ac_cv_path_GREP" >&6; }
4570 GREP="$ac_cv_path_GREP"
4571
4572
Łukasz Langaa785c872016-09-09 17:37:37 -07004573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4574$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4575if ${ac_cv_path_SED+:} false; then :
4576 $as_echo_n "(cached) " >&6
4577else
4578 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4579 for ac_i in 1 2 3 4 5 6 7; do
4580 ac_script="$ac_script$as_nl$ac_script"
4581 done
4582 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4583 { ac_script=; unset ac_script;}
4584 if test -z "$SED"; then
4585 ac_path_SED_found=false
4586 # Loop through the user's path and test for each of PROGNAME-LIST
4587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588for as_dir in $PATH
4589do
4590 IFS=$as_save_IFS
4591 test -z "$as_dir" && as_dir=.
4592 for ac_prog in sed gsed; do
4593 for ac_exec_ext in '' $ac_executable_extensions; do
4594 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4595 as_fn_executable_p "$ac_path_SED" || continue
4596# Check for GNU ac_path_SED and select it if it is found.
4597 # Check for GNU $ac_path_SED
4598case `"$ac_path_SED" --version 2>&1` in
4599*GNU*)
4600 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4601*)
4602 ac_count=0
4603 $as_echo_n 0123456789 >"conftest.in"
4604 while :
4605 do
4606 cat "conftest.in" "conftest.in" >"conftest.tmp"
4607 mv "conftest.tmp" "conftest.in"
4608 cp "conftest.in" "conftest.nl"
4609 $as_echo '' >> "conftest.nl"
4610 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4611 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4612 as_fn_arith $ac_count + 1 && ac_count=$as_val
4613 if test $ac_count -gt ${ac_path_SED_max-0}; then
4614 # Best one so far, save it but keep looking for a better one
4615 ac_cv_path_SED="$ac_path_SED"
4616 ac_path_SED_max=$ac_count
4617 fi
4618 # 10*(2^10) chars as input seems more than enough
4619 test $ac_count -gt 10 && break
4620 done
4621 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4622esac
4623
4624 $ac_path_SED_found && break 3
4625 done
4626 done
4627 done
4628IFS=$as_save_IFS
4629 if test -z "$ac_cv_path_SED"; then
4630 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4631 fi
4632else
4633 ac_cv_path_SED=$SED
4634fi
4635
4636fi
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4638$as_echo "$ac_cv_path_SED" >&6; }
4639 SED="$ac_cv_path_SED"
4640 rm -f conftest.sed
4641
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004642
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004643
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4646$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004648# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004649if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652 case $withval in
4653 no) with_cxx_main=no
4654 MAINCC='$(CC)';;
4655 yes) with_cxx_main=yes
4656 MAINCC='$(CXX)';;
4657 *) with_cxx_main=yes
4658 MAINCC=$withval
4659 if test -z "$CXX"
4660 then
4661 CXX=$withval
4662 fi;;
4663 esac
4664else
4665
4666 with_cxx_main=no
4667 MAINCC='$(CC)'
4668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004669fi
4670
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4672$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673
4674preset_cxx="$CXX"
4675if test -z "$CXX"
4676then
4677 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 gcc) if test -n "$ac_tool_prefix"; then
4679 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4680set dummy ${ac_tool_prefix}g++; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_CXX+:} false; then :
4684 $as_echo_n "(cached) " >&6
4685else
4686 case $CXX in
4687 [\\/]* | ?:[\\/]*)
4688 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4689 ;;
4690 *)
4691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in notfound
4693do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
4696 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700 break 2
4701 fi
4702done
4703 done
4704IFS=$as_save_IFS
4705
4706 ;;
4707esac
4708fi
4709CXX=$ac_cv_path_CXX
4710if test -n "$CXX"; then
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4712$as_echo "$CXX" >&6; }
4713else
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719fi
4720if test -z "$ac_cv_path_CXX"; then
4721 ac_pt_CXX=$CXX
4722 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726if ${ac_cv_path_ac_pt_CXX+:} false; then :
4727 $as_echo_n "(cached) " >&6
4728else
4729 case $ac_pt_CXX in
4730 [\\/]* | ?:[\\/]*)
4731 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4732 ;;
4733 *)
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in notfound
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
4739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004741 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4743 break 2
4744 fi
4745done
4746 done
4747IFS=$as_save_IFS
4748
4749 ;;
4750esac
4751fi
4752ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4753if test -n "$ac_pt_CXX"; then
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4755$as_echo "$ac_pt_CXX" >&6; }
4756else
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
4759fi
4760
4761 if test "x$ac_pt_CXX" = x; then
4762 CXX="g++"
4763 else
4764 case $cross_compiling:$ac_tool_warned in
4765yes:)
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4767$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4768ac_tool_warned=yes ;;
4769esac
4770 CXX=$ac_pt_CXX
4771 fi
4772else
4773 CXX="$ac_cv_path_CXX"
4774fi
4775 ;;
4776 cc) if test -n "$ac_tool_prefix"; then
4777 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4778set dummy ${ac_tool_prefix}c++; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004781if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783else
4784 case $CXX in
4785 [\\/]* | ?:[\\/]*)
4786 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4787 ;;
4788 *)
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in notfound
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 break 2
4799 fi
4800done
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 ;;
4805esac
4806fi
4807CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004808if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4810$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004811else
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004815
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816
4817fi
4818if test -z "$ac_cv_path_CXX"; then
4819 ac_pt_CXX=$CXX
4820 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004827 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 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 +00004830 ;;
4831 *)
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in notfound
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841 break 2
4842 fi
4843done
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004845IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 ;;
4848esac
4849fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004850ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4851if test -n "$ac_pt_CXX"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4853$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004854else
Matthias Kloseb9621712010-04-24 17:59:49 +00004855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004858
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 if test "x$ac_pt_CXX" = x; then
4860 CXX="c++"
4861 else
4862 case $cross_compiling:$ac_tool_warned in
4863yes:)
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4866ac_tool_warned=yes ;;
4867esac
4868 CXX=$ac_pt_CXX
4869 fi
4870else
4871 CXX="$ac_cv_path_CXX"
4872fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004873 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 clang|*/clang) if test -n "$ac_tool_prefix"; then
4875 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4876set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878$as_echo_n "checking for $ac_word... " >&6; }
4879if ${ac_cv_path_CXX+:} false; then :
4880 $as_echo_n "(cached) " >&6
4881else
4882 case $CXX in
4883 [\\/]* | ?:[\\/]*)
4884 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4885 ;;
4886 *)
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in notfound
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
4892 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004894 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4896 break 2
4897 fi
4898done
4899 done
4900IFS=$as_save_IFS
4901
Ned Deilycbfb9a52012-06-23 16:02:19 -07004902 ;;
4903esac
4904fi
4905CXX=$ac_cv_path_CXX
4906if test -n "$CXX"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4908$as_echo "$CXX" >&6; }
4909else
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
4912fi
4913
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004914
4915fi
4916if test -z "$ac_cv_path_CXX"; then
4917 ac_pt_CXX=$CXX
4918 # Extract the first word of "clang++", so it can be a program name with args.
4919set dummy clang++; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_ac_pt_CXX+:} false; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 case $ac_pt_CXX in
4926 [\\/]* | ?:[\\/]*)
4927 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4928 ;;
4929 *)
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in notfound
4932do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004937 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941done
4942 done
4943IFS=$as_save_IFS
4944
4945 ;;
4946esac
4947fi
4948ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4949if test -n "$ac_pt_CXX"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4951$as_echo "$ac_pt_CXX" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957 if test "x$ac_pt_CXX" = x; then
4958 CXX="clang++"
4959 else
4960 case $cross_compiling:$ac_tool_warned in
4961yes:)
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4964ac_tool_warned=yes ;;
4965esac
4966 CXX=$ac_pt_CXX
4967 fi
4968else
4969 CXX="$ac_cv_path_CXX"
4970fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004971 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004972 icc|*/icc) if test -n "$ac_tool_prefix"; then
4973 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4974set dummy ${ac_tool_prefix}icpc; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_CXX+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979else
4980 case $CXX in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in notfound
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
4991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4992 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997 done
4998IFS=$as_save_IFS
4999
5000 ;;
5001esac
5002fi
5003CXX=$ac_cv_path_CXX
5004if test -n "$CXX"; then
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5006$as_echo "$CXX" >&6; }
5007else
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013fi
5014if test -z "$ac_cv_path_CXX"; then
5015 ac_pt_CXX=$CXX
5016 # Extract the first word of "icpc", so it can be a program name with args.
5017set dummy icpc; ac_word=$2
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; }
5020if ${ac_cv_path_ac_pt_CXX+:} false; then :
5021 $as_echo_n "(cached) " >&6
5022else
5023 case $ac_pt_CXX in
5024 [\\/]* | ?:[\\/]*)
5025 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5026 ;;
5027 *)
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in notfound
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 for ac_exec_ext in '' $ac_executable_extensions; do
5034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5035 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 break 2
5038 fi
5039done
5040 done
5041IFS=$as_save_IFS
5042
5043 ;;
5044esac
5045fi
5046ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5047if test -n "$ac_pt_CXX"; then
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5049$as_echo "$ac_pt_CXX" >&6; }
5050else
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
5053fi
5054
5055 if test "x$ac_pt_CXX" = x; then
5056 CXX="icpc"
5057 else
5058 case $cross_compiling:$ac_tool_warned in
5059yes:)
5060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5062ac_tool_warned=yes ;;
5063esac
5064 CXX=$ac_pt_CXX
5065 fi
5066else
5067 CXX="$ac_cv_path_CXX"
5068fi
5069 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005070 esac
5071 if test "$CXX" = "notfound"
5072 then
5073 CXX=""
5074 fi
5075fi
5076if test -z "$CXX"
5077then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005078 if test -n "$ac_tool_prefix"; then
5079 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5080 do
5081 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5082set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087else
5088 if test -n "$CXX"; then
5089 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5090else
5091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005100 break 2
5101 fi
5102done
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105
5106fi
5107fi
5108CXX=$ac_cv_prog_CXX
5109if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5111$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005112else
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115fi
5116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005118 test -n "$CXX" && break
5119 done
5120fi
5121if test -z "$CXX"; then
5122 ac_ct_CXX=$CXX
5123 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5124do
5125 # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131else
5132 if test -n "$ac_ct_CXX"; then
5133 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5134else
5135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138 IFS=$as_save_IFS
5139 test -z "$as_dir" && as_dir=.
5140 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005142 ac_cv_prog_ac_ct_CXX="$ac_prog"
5143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144 break 2
5145 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005147 done
5148IFS=$as_save_IFS
5149
5150fi
5151fi
5152ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5153if test -n "$ac_ct_CXX"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5155$as_echo "$ac_ct_CXX" >&6; }
5156else
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162 test -n "$ac_ct_CXX" && break
5163done
5164
5165 if test "x$ac_ct_CXX" = x; then
5166 CXX="notfound"
5167 else
5168 case $cross_compiling:$ac_tool_warned in
5169yes:)
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5172ac_tool_warned=yes ;;
5173esac
5174 CXX=$ac_ct_CXX
5175 fi
5176fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177
5178 if test "$CXX" = "notfound"
5179 then
5180 CXX=""
5181 fi
5182fi
5183if test "$preset_cxx" != "$CXX"
5184then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005185 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005186
5187 By default, distutils will build C++ extension modules with \"$CXX\".
5188 If this is not intended, then set CXX on the configure command line.
5189 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005190$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005191
5192 By default, distutils will build C++ extension modules with \"$CXX\".
5193 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005194 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005195fi
5196
5197
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005198MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5199
5200
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5202$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5203cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005204#undef bfin
5205#undef cris
5206#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005208#undef hppa
5209#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005210#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005211#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005212#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005215#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005216 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005217#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218# if defined(__x86_64__) && defined(__LP64__)
5219 x86_64-linux-gnu
5220# elif defined(__x86_64__) && defined(__ILP32__)
5221 x86_64-linux-gnux32
5222# elif defined(__i386__)
5223 i386-linux-gnu
5224# elif defined(__aarch64__) && defined(__AARCH64EL__)
5225# if defined(__ILP32__)
5226 aarch64_ilp32-linux-gnu
5227# else
5228 aarch64-linux-gnu
5229# endif
5230# elif defined(__aarch64__) && defined(__AARCH64EB__)
5231# if defined(__ILP32__)
5232 aarch64_be_ilp32-linux-gnu
5233# else
5234 aarch64_be-linux-gnu
5235# endif
5236# elif defined(__alpha__)
5237 alpha-linux-gnu
5238# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5239# if defined(__ARMEL__)
5240 arm-linux-gnueabihf
5241# else
5242 armeb-linux-gnueabihf
5243# endif
5244# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5245# if defined(__ARMEL__)
5246 arm-linux-gnueabi
5247# else
5248 armeb-linux-gnueabi
5249# endif
5250# elif defined(__hppa__)
5251 hppa-linux-gnu
5252# elif defined(__ia64__)
5253 ia64-linux-gnu
5254# elif defined(__m68k__) && !defined(__mcoldfire__)
5255 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005256# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5257# if _MIPS_SIM == _ABIO32
5258 mipsisa32r6el-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mipsisa64r6el-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mipsisa64r6el-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
5266# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5267# if _MIPS_SIM == _ABIO32
5268 mipsisa32r6-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mipsisa64r6-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mipsisa64r6-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005276# elif defined(__mips_hard_float) && defined(_MIPSEL)
5277# if _MIPS_SIM == _ABIO32
5278 mipsel-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64el-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64el-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__mips_hard_float)
5287# if _MIPS_SIM == _ABIO32
5288 mips-linux-gnu
5289# elif _MIPS_SIM == _ABIN32
5290 mips64-linux-gnuabin32
5291# elif _MIPS_SIM == _ABI64
5292 mips64-linux-gnuabi64
5293# else
5294# error unknown platform triplet
5295# endif
5296# elif defined(__or1k__)
5297 or1k-linux-gnu
5298# elif defined(__powerpc__) && defined(__SPE__)
5299 powerpc-linux-gnuspe
5300# elif defined(__powerpc64__)
5301# if defined(__LITTLE_ENDIAN__)
5302 powerpc64le-linux-gnu
5303# else
5304 powerpc64-linux-gnu
5305# endif
5306# elif defined(__powerpc__)
5307 powerpc-linux-gnu
5308# elif defined(__s390x__)
5309 s390x-linux-gnu
5310# elif defined(__s390__)
5311 s390-linux-gnu
5312# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5313 sh4-linux-gnu
5314# elif defined(__sparc__) && defined(__arch64__)
5315 sparc64-linux-gnu
5316# elif defined(__sparc__)
5317 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005318# elif defined(__riscv)
5319# if __riscv_xlen == 32
5320 riscv32-linux-gnu
5321# elif __riscv_xlen == 64
5322 riscv64-linux-gnu
5323# else
5324# error unknown platform triplet
5325# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__FreeBSD_kernel__)
5330# if defined(__LP64__)
5331 x86_64-kfreebsd-gnu
5332# elif defined(__i386__)
5333 i386-kfreebsd-gnu
5334# else
5335# error unknown platform triplet
5336# endif
5337#elif defined(__gnu_hurd__)
5338 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005339#elif defined(__APPLE__)
5340 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005341#elif defined(__VXWORKS__)
5342 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005343#else
5344# error unknown platform triplet
5345#endif
5346
5347EOF
5348
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005349if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005350 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5352$as_echo "$PLATFORM_TRIPLET" >&6; }
5353else
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5355$as_echo "none" >&6; }
5356fi
5357rm -f conftest.c conftest.out
5358
5359if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5360 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5361 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5362 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005363elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5364 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366
doko@ubuntu.com55532312016-06-14 08:55:19 +02005367if test x$MULTIARCH != x; then
5368 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5369fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005370
5371
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5373$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5374save_LDFLAGS="$LDFLAGS"
5375LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005376
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5378/* end confdefs.h. */
5379
5380int
5381main ()
5382{
5383
5384 ;
5385 return 0;
5386}
5387_ACEOF
5388if ac_fn_c_try_link "$LINENO"; then :
5389 NO_AS_NEEDED="-Wl,--no-as-needed"
5390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5391$as_echo "yes" >&6; }
5392else
5393 NO_AS_NEEDED=""
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395$as_echo "no" >&6; }
5396fi
5397rm -f core conftest.err conftest.$ac_objext \
5398 conftest$ac_exeext conftest.$ac_ext
5399LDFLAGS="$save_LDFLAGS"
5400
5401
5402
5403# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5406$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005407if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409else
5410 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5411 then ac_cv_path_EGREP="$GREP -E"
5412 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 # Loop through the user's path and test for each of PROGNAME-LIST
5416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5418do
5419 IFS=$as_save_IFS
5420 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 for ac_prog in egrep; do
5422 for ac_exec_ext in '' $ac_executable_extensions; do
5423 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005424 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005425# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 # Check for GNU $ac_path_EGREP
5427case `"$ac_path_EGREP" --version 2>&1` in
5428*GNU*)
5429 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5430*)
5431 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 while :
5434 do
5435 cat "conftest.in" "conftest.in" >"conftest.tmp"
5436 mv "conftest.tmp" "conftest.in"
5437 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005439 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5440 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5443 # Best one so far, save it but keep looking for a better one
5444 ac_cv_path_EGREP="$ac_path_EGREP"
5445 ac_path_EGREP_max=$ac_count
5446 fi
5447 # 10*(2^10) chars as input seems more than enough
5448 test $ac_count -gt 10 && break
5449 done
5450 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5451esac
5452
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 $ac_path_EGREP_found && break 3
5454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005459 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 +00005460 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461else
5462 ac_cv_path_EGREP=$EGREP
5463fi
5464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 fi
5466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5468$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005469 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005470
5471
Matthias Kloseb9621712010-04-24 17:59:49 +00005472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5473$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005474if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005475 $as_echo_n "(cached) " >&6
5476else
5477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005478/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005479#include <stdlib.h>
5480#include <stdarg.h>
5481#include <string.h>
5482#include <float.h>
5483
5484int
5485main ()
5486{
5487
5488 ;
5489 return 0;
5490}
5491_ACEOF
5492if ac_fn_c_try_compile "$LINENO"; then :
5493 ac_cv_header_stdc=yes
5494else
5495 ac_cv_header_stdc=no
5496fi
5497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5498
5499if test $ac_cv_header_stdc = yes; then
5500 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005504
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005505_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005507 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005509else
Matthias Kloseb9621712010-04-24 17:59:49 +00005510 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005511fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005512rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513
Matthias Kloseb9621712010-04-24 17:59:49 +00005514fi
5515
5516if test $ac_cv_header_stdc = yes; then
5517 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#include <stdlib.h>
5521
5522_ACEOF
5523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5524 $EGREP "free" >/dev/null 2>&1; then :
5525
5526else
5527 ac_cv_header_stdc=no
5528fi
5529rm -f conftest*
5530
5531fi
5532
5533if test $ac_cv_header_stdc = yes; then
5534 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5535 if test "$cross_compiling" = yes; then :
5536 :
5537else
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539/* end confdefs.h. */
5540#include <ctype.h>
5541#include <stdlib.h>
5542#if ((' ' & 0x0FF) == 0x020)
5543# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5544# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5545#else
5546# define ISLOWER(c) \
5547 (('a' <= (c) && (c) <= 'i') \
5548 || ('j' <= (c) && (c) <= 'r') \
5549 || ('s' <= (c) && (c) <= 'z'))
5550# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5551#endif
5552
5553#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5554int
5555main ()
5556{
5557 int i;
5558 for (i = 0; i < 256; i++)
5559 if (XOR (islower (i), ISLOWER (i))
5560 || toupper (i) != TOUPPER (i))
5561 return 2;
5562 return 0;
5563}
5564_ACEOF
5565if ac_fn_c_try_run "$LINENO"; then :
5566
5567else
5568 ac_cv_header_stdc=no
5569fi
5570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5571 conftest.$ac_objext conftest.beam conftest.$ac_ext
5572fi
5573
5574fi
5575fi
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5577$as_echo "$ac_cv_header_stdc" >&6; }
5578if test $ac_cv_header_stdc = yes; then
5579
5580$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5581
5582fi
5583
5584# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5585for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5586 inttypes.h stdint.h unistd.h
5587do :
5588 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5589ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5590"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005591if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 cat >>confdefs.h <<_ACEOF
5593#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5594_ACEOF
5595
5596fi
5597
5598done
5599
5600
5601
5602 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 +02005603if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 MINIX=yes
5605else
5606 MINIX=
5607fi
5608
5609
5610 if test "$MINIX" = yes; then
5611
5612$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5613
5614
5615$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5616
5617
5618$as_echo "#define _MINIX 1" >>confdefs.h
5619
5620 fi
5621
5622
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5624$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005625if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005626 $as_echo_n "(cached) " >&6
5627else
5628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5629/* end confdefs.h. */
5630
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005631# define __EXTENSIONS__ 1
5632 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005633int
5634main ()
5635{
5636
5637 ;
5638 return 0;
5639}
5640_ACEOF
5641if ac_fn_c_try_compile "$LINENO"; then :
5642 ac_cv_safe_to_define___extensions__=yes
5643else
5644 ac_cv_safe_to_define___extensions__=no
5645fi
5646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647fi
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5649$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5650 test $ac_cv_safe_to_define___extensions__ = yes &&
5651 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5652
5653 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5654
5655 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5656
5657 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5658
5659 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5660
5661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
Xavier de Gaye95750b12016-07-09 11:05:42 +02005663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5664$as_echo_n "checking for the Android API level... " >&6; }
5665cat >> conftest.c <<EOF
5666#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005667android_api = __ANDROID_API__
5668arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005669#else
5670#error not Android
5671#endif
5672EOF
5673
5674if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005675 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5676 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5678$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005679 if test -z "$ANDROID_API_LEVEL"; then
5680 echo 'Fatal: you must define __ANDROID_API__'
5681 exit 1
5682 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005683
5684cat >>confdefs.h <<_ACEOF
5685#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5686_ACEOF
5687
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005688
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5690$as_echo_n "checking for the Android arm ABI... " >&6; }
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5692$as_echo "$_arm_arch" >&6; }
5693 if test "$_arm_arch" = 7; then
5694 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5695 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5696 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005697else
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5699$as_echo "not Android" >&6; }
5700fi
5701rm -f conftest.c conftest.out
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703# Check for unsupported systems
5704case $ac_sys_system/$ac_sys_release in
5705atheos*|Linux*/1*)
5706 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5707 echo See README for details.
5708 exit 1;;
5709esac
5710
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5713$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005716if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 withval=$with_suffix;
5718 case $withval in
5719 no) EXEEXT=;;
5720 yes) EXEEXT=.exe;;
5721 *) EXEEXT=$withval;;
5722 esac
5723fi
5724
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5726$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# Test whether we're running on a non-case-sensitive system, in which
5729# case we give a warning if no ext is given
5730
Matthias Kloseb9621712010-04-24 17:59:49 +00005731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5732$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733if test ! -d CaseSensitiveTestDir; then
5734mkdir CaseSensitiveTestDir
5735fi
5736
5737if test -d casesensitivetestdir
5738then
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5740$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741 BUILDEXEEXT=.exe
5742else
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745 BUILDEXEEXT=$EXEEXT
5746fi
5747rmdir CaseSensitiveTestDir
5748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749case $ac_sys_system in
5750hp*|HP*)
5751 case $CC in
5752 cc|*/cc) CC="$CC -Ae";;
5753 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754esac
5755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5758$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759if test -z "$LIBRARY"
5760then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005761 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5764$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765
5766# LDLIBRARY is the name of the library to link against (as opposed to the
5767# name of the library into which to insert object files). BLDLIBRARY is also
5768# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5769# is blank as the main program is not linked directly against LDLIBRARY.
5770# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5771# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5772# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5773# DLLLIBRARY is the shared (i.e., DLL) library.
5774#
5775# RUNSHARED is used to run shared python without installed libraries
5776#
5777# INSTSONAME is the name of the shared library that will be use to install
5778# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005779#
5780# LDVERSION is the shared library version number, normally the Python version
5781# with the ABI build flags appended.
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784
5785
5786
5787
5788
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790LDLIBRARY="$LIBRARY"
5791BLDLIBRARY='$(LDLIBRARY)'
5792INSTSONAME='$(LDLIBRARY)'
5793DLLLIBRARY=''
5794LDLIBRARYDIR=''
5795RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005796LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
5798# LINKCC is the command that links the python executable -- default is $(CC).
5799# If CXX is set, and if it is needed to link a main function that was
5800# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5801# python might then depend on the C++ runtime
5802# This is altered for AIX in order to build the export list before
5803# linking.
5804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5806$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807if test -z "$LINKCC"
5808then
5809 LINKCC='$(PURIFY) $(MAINCC)'
5810 case $ac_sys_system in
5811 AIX*)
5812 exp_extra="\"\""
5813 if test $ac_sys_release -ge 5 -o \
5814 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5815 exp_extra="."
5816 fi
5817 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 QNX*)
5819 # qcc must be used because the other compilers do not
5820 # support -N.
5821 LINKCC=qcc;;
5822 esac
5823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5825$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
5827# 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"
6472else
6473 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006474 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006475 DEF_MAKE_RULE="all"
6476fi
6477
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006478
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6480$as_echo_n "checking PROFILE_TASK... " >&6; }
6481if test -z "$PROFILE_TASK"
6482then
6483 PROFILE_TASK='-m test --pgo'
6484fi
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6486$as_echo "$PROFILE_TASK" >&6; }
6487
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006488# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6489# normal names in the default $PATH (ie: Ubuntu). They exist under the
6490# non-suffixed name in their versioned llvm directory.
6491
6492llvm_bin_dir=''
6493llvm_path="${PATH}"
6494if test "${CC}" = "clang"
6495then
6496 clang_bin=`which clang`
6497 # Some systems install clang elsewhere as a symlink to the real path
6498 # which is where the related llvm tools are located.
6499 if test -L "${clang_bin}"
6500 then
6501 clang_dir=`dirname "${clang_bin}"`
6502 clang_bin=`readlink "${clang_bin}"`
6503 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6504 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6505 fi
6506fi
6507
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006508# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6510$as_echo_n "checking for --with-lto... " >&6; }
6511
6512# Check whether --with-lto was given.
6513if test "${with_lto+set}" = set; then :
6514 withval=$with_lto;
6515if test "$withval" != no
6516then
6517 Py_LTO='true'
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6519$as_echo "yes" >&6; };
6520else
6521 Py_LTO='false'
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523$as_echo "no" >&6; };
6524fi
6525else
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; }
6528fi
6529
6530if test "$Py_LTO" = 'true' ; then
6531 case $CC in
6532 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006533
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006534 if test -n "$ac_tool_prefix"; then
6535 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6536set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6538$as_echo_n "checking for $ac_word... " >&6; }
6539if ${ac_cv_path_LLVM_AR+:} false; then :
6540 $as_echo_n "(cached) " >&6
6541else
6542 case $LLVM_AR in
6543 [\\/]* | ?:[\\/]*)
6544 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6545 ;;
6546 *)
6547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6548for as_dir in ${llvm_path}
6549do
6550 IFS=$as_save_IFS
6551 test -z "$as_dir" && as_dir=.
6552 for ac_exec_ext in '' $ac_executable_extensions; do
6553 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6554 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6555 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6556 break 2
6557 fi
6558done
6559 done
6560IFS=$as_save_IFS
6561
6562 ;;
6563esac
6564fi
6565LLVM_AR=$ac_cv_path_LLVM_AR
6566if test -n "$LLVM_AR"; then
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6568$as_echo "$LLVM_AR" >&6; }
6569else
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
6572fi
6573
6574
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006575fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006576if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006577 ac_pt_LLVM_AR=$LLVM_AR
6578 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006579set dummy llvm-ar; ac_word=$2
6580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6581$as_echo_n "checking for $ac_word... " >&6; }
6582if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6583 $as_echo_n "(cached) " >&6
6584else
6585 case $ac_pt_LLVM_AR in
6586 [\\/]* | ?:[\\/]*)
6587 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6588 ;;
6589 *)
6590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6591for as_dir in ${llvm_path}
6592do
6593 IFS=$as_save_IFS
6594 test -z "$as_dir" && as_dir=.
6595 for ac_exec_ext in '' $ac_executable_extensions; do
6596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6597 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6599 break 2
6600 fi
6601done
6602 done
6603IFS=$as_save_IFS
6604
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006605 ;;
6606esac
6607fi
6608ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6609if test -n "$ac_pt_LLVM_AR"; then
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6611$as_echo "$ac_pt_LLVM_AR" >&6; }
6612else
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6614$as_echo "no" >&6; }
6615fi
6616
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006617 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006618 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006619 else
6620 case $cross_compiling:$ac_tool_warned in
6621yes:)
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6624ac_tool_warned=yes ;;
6625esac
6626 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006627 fi
6628else
6629 LLVM_AR="$ac_cv_path_LLVM_AR"
6630fi
6631
6632
6633 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6634 then
6635 LLVM_AR_FOUND="found"
6636 else
6637 LLVM_AR_FOUND="not-found"
6638 fi
6639 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6640 then
6641 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6642 if test -n "${found_llvm_ar}"
6643 then
6644 LLVM_AR='/usr/bin/xcrun llvm-ar'
6645 LLVM_AR_FOUND=found
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6647$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6648 fi
6649 fi
6650 if test $LLVM_AR_FOUND = not-found
6651 then
6652 LLVM_PROFR_ERR=yes
6653 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6654 else
6655 LLVM_AR_ERR=no
6656 fi
6657 AR="${LLVM_AR}"
6658 case $ac_sys_system in
6659 Darwin*)
6660 # Any changes made here should be reflected in the GCC+Darwin case below
6661 LTOFLAGS="-flto -Wl,-export_dynamic"
6662 ;;
6663 *)
6664 LTOFLAGS="-flto"
6665 ;;
6666 esac
6667 ;;
6668 *gcc*)
6669 case $ac_sys_system in
6670 Darwin*)
6671 LTOFLAGS="-flto -Wl,-export_dynamic"
6672 ;;
6673 *)
6674 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6675 ;;
6676 esac
6677 ;;
6678 esac
6679
6680 if test "$ac_cv_prog_cc_g" = "yes"
6681 then
6682 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6683 # to get debug symbols.
6684 LTOFLAGS="$LTOFLAGS -g"
6685 fi
6686
stratakisf92c7aa2018-12-04 15:54:01 +01006687 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006688 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006689fi
6690
6691# Enable PGO flags.
6692
6693
6694
6695
6696
6697
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006698if test -n "$ac_tool_prefix"; then
6699 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6700set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702$as_echo_n "checking for $ac_word... " >&6; }
6703if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6704 $as_echo_n "(cached) " >&6
6705else
6706 case $LLVM_PROFDATA in
6707 [\\/]* | ?:[\\/]*)
6708 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6709 ;;
6710 *)
6711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6712for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006713do
6714 IFS=$as_save_IFS
6715 test -z "$as_dir" && as_dir=.
6716 for ac_exec_ext in '' $ac_executable_extensions; do
6717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006718 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6720 break 2
6721 fi
6722done
6723 done
6724IFS=$as_save_IFS
6725
Gregory P. Smith799520c2016-09-07 16:10:00 -07006726 ;;
6727esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006728fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006729LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6730if test -n "$LLVM_PROFDATA"; then
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6732$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006733else
6734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6735$as_echo "no" >&6; }
6736fi
6737
6738
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006739fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006740if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006741 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6742 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006743set dummy llvm-profdata; ac_word=$2
6744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6745$as_echo_n "checking for $ac_word... " >&6; }
6746if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6747 $as_echo_n "(cached) " >&6
6748else
6749 case $ac_pt_LLVM_PROFDATA in
6750 [\\/]* | ?:[\\/]*)
6751 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6752 ;;
6753 *)
6754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6755for as_dir in ${llvm_path}
6756do
6757 IFS=$as_save_IFS
6758 test -z "$as_dir" && as_dir=.
6759 for ac_exec_ext in '' $ac_executable_extensions; do
6760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6761 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6763 break 2
6764 fi
6765done
6766 done
6767IFS=$as_save_IFS
6768
Gregory P. Smith799520c2016-09-07 16:10:00 -07006769 ;;
6770esac
6771fi
6772ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6773if test -n "$ac_pt_LLVM_PROFDATA"; then
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6775$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6776else
6777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778$as_echo "no" >&6; }
6779fi
6780
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006781 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006782 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006783 else
6784 case $cross_compiling:$ac_tool_warned in
6785yes:)
6786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6788ac_tool_warned=yes ;;
6789esac
6790 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 fi
6792else
6793 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6794fi
6795
6796
6797if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6798then
6799 LLVM_PROF_FOUND="found"
6800else
6801 LLVM_PROF_FOUND="not-found"
6802fi
6803if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6804then
6805 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6806 if test -n "${found_llvm_profdata}"
6807 then
6808 # llvm-profdata isn't directly in $PATH in some cases.
6809 # https://apple.stackexchange.com/questions/197053/
6810 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6811 LLVM_PROF_FOUND=found
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6813$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6814 fi
6815fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006816LLVM_PROF_ERR=no
6817case $CC in
6818 *clang*)
6819 # Any changes made here should be reflected in the GCC+Darwin case below
6820 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6821 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006822 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006823 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6824 if test $LLVM_PROF_FOUND = not-found
6825 then
6826 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006827 if test "${REQUIRE_PGO}" = "yes"
6828 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006829 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 -07006830 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006831 fi
6832 ;;
6833 *gcc*)
6834 case $ac_sys_system in
6835 Darwin*)
6836 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6837 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006838 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006839 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006840 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006841 then
6842 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006843 if test "${REQUIRE_PGO}" = "yes"
6844 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006845 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 -07006846 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006847 fi
6848 ;;
6849 *)
6850 PGO_PROF_GEN_FLAG="-fprofile-generate"
6851 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6852 LLVM_PROF_MERGER="true"
6853 LLVM_PROF_FILE=""
6854 ;;
6855 esac
6856 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006857 *icc*)
6858 PGO_PROF_GEN_FLAG="-prof-gen"
6859 PGO_PROF_USE_FLAG="-prof-use"
6860 LLVM_PROF_MERGER="true"
6861 LLVM_PROF_FILE=""
6862 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006863esac
6864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6866# merged with this chunk of code?
6867
6868# Optimizer/debugger flags
6869# ------------------------
6870# (The following bit of code is complicated enough - please keep things
6871# indented properly. Just pretend you're editing Python code. ;-)
6872
6873# There are two parallel sets of case statements below, one that checks to
6874# see if OPT was set and one that does BASECFLAGS setting based upon
6875# compiler and platform. BASECFLAGS tweaks need to be made even if the
6876# user set OPT.
6877
Victor Stinner23a683a2019-04-12 21:27:37 +02006878case $CC in
6879 *clang*)
6880 cc_is_clang=1
6881 ;;
6882 *)
6883 if $CC --version 2>&1 | grep -q clang
6884 then
6885 cc_is_clang=1
6886 else
6887 cc_is_clang=
6888 fi
6889esac
6890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891# tweak OPT based on compiler and platform, only if the user didn't set
6892# it on the command line
6893
Victor Stinner9ed34a82017-05-02 22:35:58 +02006894
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006895if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896then
6897 case $GCC in
6898 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6900 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6901 WRAP="-fwrapv"
6902 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006903
Victor Stinner35f3d242017-04-21 12:35:24 +02006904 if test -n "${cc_is_clang}"
6905 then
6906 # Clang also needs -fwrapv
6907 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006908 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6909 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006910 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006911 fi
6912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913 case $ac_cv_prog_cc_g in
6914 yes)
6915 if test "$Py_DEBUG" = 'true' ; then
6916 # Optimization messes up debuggers, so turn it off for
6917 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006918 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006919 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006920 else
Victor Stinner28205b22017-04-21 11:24:34 +02006921 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923 else
Victor Stinner28205b22017-04-21 11:24:34 +02006924 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925 fi
6926 ;;
6927 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006928 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929 ;;
6930 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932 case $ac_sys_system in
6933 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6934 ;;
6935 esac
6936 ;;
6937
6938 *)
6939 OPT="-O"
6940 ;;
6941 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942fi
6943
6944
6945
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006946
stratakiscf10a752018-12-19 18:19:01 +01006947
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006948# The -arch flags for universal builds on OSX
6949UNIVERSAL_ARCH_FLAGS=
6950
6951
6952# tweak BASECFLAGS based on compiler and platform
6953case $GCC in
6954yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006955 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006956
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6958$as_echo_n "checking for -Wextra... " >&6; }
6959 ac_save_cc="$CC"
6960 CC="$CC -Wextra -Werror"
6961 if ${ac_cv_extra_warnings+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963else
6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6965/* end confdefs.h. */
6966
6967
6968int
6969main ()
6970{
6971
6972 ;
6973 return 0;
6974}
6975
6976_ACEOF
6977if ac_fn_c_try_compile "$LINENO"; then :
6978
6979 ac_cv_extra_warnings=yes
6980
6981else
6982
6983 ac_cv_extra_warnings=no
6984
6985fi
6986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6987fi
6988
6989 CC="$ac_save_cc"
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6991$as_echo "$ac_cv_extra_warnings" >&6; }
6992
6993 if test $ac_cv_extra_warnings = yes
6994 then
6995 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6996 fi
6997
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006998 # Python doesn't violate C99 aliasing rules, but older versions of
6999 # GCC produce warnings for legal Python code. Enable
7000 # -fno-strict-aliasing on versions of GCC that support but produce
7001 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
7003$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004 ac_save_cc="$CC"
7005 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007006 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007007 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007009else
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007011/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007012
Matthias Kloseb159a552010-04-25 21:00:44 +00007013
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007014int
7015main ()
7016{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007017
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007018 ;
7019 return 0;
7020}
Matthias Kloseb159a552010-04-25 21:00:44 +00007021
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007023if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007024
7025 CC="$ac_save_cc -fstrict-aliasing"
7026 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007028/* end confdefs.h. */
7029
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007030 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031int
7032main ()
7033{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007034double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035 ;
7036 return 0;
7037}
Matthias Kloseb159a552010-04-25 21:00:44 +00007038
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007040if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007041
7042 ac_cv_no_strict_aliasing=no
7043
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044else
Matthias Kloseb159a552010-04-25 21:00:44 +00007045
7046 ac_cv_no_strict_aliasing=yes
7047
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007048fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007050
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007051else
Matthias Kloseb159a552010-04-25 21:00:44 +00007052
7053 ac_cv_no_strict_aliasing=no
7054
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007057fi
7058
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007059 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007060 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7062$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007063 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064 then
7065 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7066 fi
7067
Zachary Ware5af85642015-12-21 12:09:17 -06007068 # ICC doesn't recognize the option, but only emits a warning
7069 ## XXX does it emit an unused result warning and can it be disabled?
7070 case "$CC" in
7071 *icc*)
7072 ac_cv_disable_unused_result_warning=no
7073 ;;
7074 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7076$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7077 ac_save_cc="$CC"
7078 CC="$CC -Wunused-result -Werror"
7079 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007080 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007081 $as_echo_n "(cached) " >&6
7082else
7083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7084/* end confdefs.h. */
7085
7086
7087int
7088main ()
7089{
7090
7091 ;
7092 return 0;
7093}
7094
7095_ACEOF
7096if ac_fn_c_try_compile "$LINENO"; then :
7097
7098 ac_cv_disable_unused_result_warning=yes
7099
7100else
7101
7102 ac_cv_disable_unused_result_warning=no
7103
7104fi
7105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7106fi
7107
7108 CFLAGS="$save_CFLAGS"
7109 CC="$ac_save_cc"
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7111$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007112 ;;
7113 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007114
7115 if test $ac_cv_disable_unused_result_warning = yes
7116 then
7117 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007118 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7119 fi
7120
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7122$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7123 ac_save_cc="$CC"
7124 CC="$CC -Wunused-parameter -Werror"
7125 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7126 $as_echo_n "(cached) " >&6
7127else
7128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7129/* end confdefs.h. */
7130
7131
7132int
7133main ()
7134{
7135
7136 ;
7137 return 0;
7138}
7139
7140_ACEOF
7141if ac_fn_c_try_compile "$LINENO"; then :
7142
7143 ac_cv_disable_unused_parameter_warning=yes
7144
7145else
7146
7147 ac_cv_disable_unused_parameter_warning=no
7148
7149fi
7150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7151fi
7152
7153 CC="$ac_save_cc"
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7155$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7156
7157 if test $ac_cv_disable_unused_parameter_warning = yes
7158 then
7159 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7160 fi
7161
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7163$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7164 ac_save_cc="$CC"
7165 CC="$CC -Wmissing-field-initializers -Werror"
7166 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7167 $as_echo_n "(cached) " >&6
7168else
7169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170/* end confdefs.h. */
7171
7172
7173int
7174main ()
7175{
7176
7177 ;
7178 return 0;
7179}
7180
7181_ACEOF
7182if ac_fn_c_try_compile "$LINENO"; then :
7183
7184 ac_cv_disable_missing_field_initializers=yes
7185
7186else
7187
7188 ac_cv_disable_missing_field_initializers=no
7189
7190fi
7191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7192fi
7193
7194 CC="$ac_save_cc"
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7196$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7197
7198 if test $ac_cv_disable_missing_field_initializers = yes
7199 then
7200 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007201 fi
7202
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7204$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7205 ac_save_cc="$CC"
7206 CC="$CC -Wsign-compare"
7207 save_CFLAGS="$CFLAGS"
7208 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7209 $as_echo_n "(cached) " >&6
7210else
7211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7212/* end confdefs.h. */
7213
7214
7215int
7216main ()
7217{
7218
7219 ;
7220 return 0;
7221}
7222
7223_ACEOF
7224if ac_fn_c_try_compile "$LINENO"; then :
7225
7226 ac_cv_enable_sign_compare_warning=yes
7227
7228else
7229
7230 ac_cv_enable_sign_compare_warning=no
7231
7232fi
7233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7234fi
7235
7236 CFLAGS="$save_CFLAGS"
7237 CC="$ac_save_cc"
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7239$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7240
7241 if test $ac_cv_enable_sign_compare_warning = yes
7242 then
7243 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7244 fi
7245
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7247$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7248 ac_save_cc="$CC"
7249 CC="$CC -Wunreachable-code"
7250 save_CFLAGS="$CFLAGS"
7251 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7252 $as_echo_n "(cached) " >&6
7253else
7254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7255/* end confdefs.h. */
7256
7257
7258int
7259main ()
7260{
7261
7262 ;
7263 return 0;
7264}
7265
7266_ACEOF
7267if ac_fn_c_try_compile "$LINENO"; then :
7268
7269 ac_cv_enable_unreachable_code_warning=yes
7270
7271else
7272
7273 ac_cv_enable_unreachable_code_warning=no
7274
7275fi
7276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7277fi
7278
7279 CFLAGS="$save_CFLAGS"
7280 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007281
7282 # Don't enable unreachable code warning in debug mode, since it usually
7283 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007284 # Issue #24324: Unfortunately, the unreachable code warning does not work
7285 # correctly on gcc and has been silently removed from the compiler.
7286 # It is supported on clang but on OS X systems gcc may be an alias
7287 # for clang. Try to determine if the compiler is not really gcc and,
7288 # if so, only then enable the warning.
7289 if test $ac_cv_enable_unreachable_code_warning = yes && \
7290 test "$Py_DEBUG" != "true" && \
7291 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007292 then
7293 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007294 else
7295 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007296 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7298$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007299
INADA Naokie3364842018-06-05 20:40:53 +09007300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7301$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7302 ac_save_cc="$CC"
7303 CC="$CC -Werror -Wstrict-prototypes"
7304 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7305 $as_echo_n "(cached) " >&6
7306else
7307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7308/* end confdefs.h. */
7309
7310
7311int
7312main ()
7313{
7314
7315 ;
7316 return 0;
7317}
7318
7319_ACEOF
7320if ac_fn_c_try_compile "$LINENO"; then :
7321
7322 ac_cv_enable_strict_prototypes_warning=yes
7323
7324else
7325
7326 ac_cv_enable_strict_prototypes_warning=no
7327
7328fi
7329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7330fi
7331
7332 CC="$ac_save_cc"
7333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7334$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7335
7336 if test $ac_cv_enable_strict_prototypes_warning = yes
7337 then
7338 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7339 fi
7340
Victor Stinner193ee0a2017-02-06 14:24:00 +01007341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7342$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7343 ac_save_cc="$CC"
7344 CC="$CC -Werror=implicit-function-declaration"
7345 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7346 $as_echo_n "(cached) " >&6
7347else
7348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7349/* end confdefs.h. */
7350
7351
7352int
7353main ()
7354{
7355
7356 ;
7357 return 0;
7358}
7359
7360_ACEOF
7361if ac_fn_c_try_compile "$LINENO"; then :
7362
7363 ac_cv_enable_implicit_function_declaration_error=yes
7364
7365else
7366
7367 ac_cv_enable_implicit_function_declaration_error=no
7368
7369fi
7370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7371fi
7372
7373 CC="$ac_save_cc"
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7375$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7376
7377 if test $ac_cv_enable_implicit_function_declaration_error = yes
7378 then
7379 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7380 fi
7381
Vinay Sajip0b60f642019-10-15 08:26:12 +01007382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5
7383$as_echo_n "checking if we can use visibility in $CC... " >&6; }
7384 ac_save_cc="$CC"
7385 CC="$CC -fvisibility=hidden"
7386 if ${ac_cv_enable_visibility+:} false; then :
7387 $as_echo_n "(cached) " >&6
7388else
7389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7390/* end confdefs.h. */
7391
7392
7393int
7394main ()
7395{
7396
7397 ;
7398 return 0;
7399}
7400
7401_ACEOF
7402if ac_fn_c_try_compile "$LINENO"; then :
7403
7404 ac_cv_enable_visibility=yes
7405
7406else
7407
7408 ac_cv_enable_visibility=no
7409
7410fi
7411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7412fi
7413
7414 CC="$ac_save_cc"
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5
7416$as_echo "$ac_cv_enable_visibility" >&6; }
7417
7418 if test $ac_cv_enable_visibility = yes
7419 then
7420 CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden"
7421 fi
7422
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7424 # support. Without this, treatment of subnormals doesn't follow
7425 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007426 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427 alpha*)
7428 BASECFLAGS="$BASECFLAGS -mieee"
7429 ;;
7430 esac
7431
7432 case $ac_sys_system in
7433 SCO_SV*)
7434 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7435 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007436
Ned Deily87adb6e2013-10-18 21:09:56 -07007437 Darwin*)
7438 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7439 # used to be here, but non-Apple gcc doesn't accept them.
7440 if test "${CC}" = gcc
7441 then
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007444 case "${UNIVERSALSDK}" in
7445 */MacOSX10.4u.sdk)
7446 # Build using 10.4 SDK, force usage of gcc when the
7447 # compiler is gcc, otherwise the user will get very
7448 # confusing error messages when building on OSX 10.6
7449 CC=gcc-4.0
7450 CPP=cpp-4.0
7451 ;;
7452 esac
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007454$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007455 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456
Ned Deily87adb6e2013-10-18 21:09:56 -07007457 if test "${enable_universalsdk}"
7458 then
7459 case "$UNIVERSAL_ARCHS" in
7460 32-bit)
7461 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7462 LIPO_32BIT_FLAGS=""
7463 ARCH_RUN_32BIT=""
7464 ;;
7465 64-bit)
7466 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7467 LIPO_32BIT_FLAGS=""
7468 ARCH_RUN_32BIT="true"
7469 ;;
7470 all)
7471 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7472 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7473 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7474 ;;
7475 intel)
7476 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7477 LIPO_32BIT_FLAGS="-extract i386"
7478 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7479 ;;
7480 intel-32)
7481 UNIVERSAL_ARCH_FLAGS="-arch i386"
7482 LIPO_32BIT_FLAGS=""
7483 ARCH_RUN_32BIT=""
7484 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007485 intel-64)
7486 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7487 LIPO_32BIT_FLAGS=""
7488 ARCH_RUN_32BIT="true"
7489 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007490 3-way)
7491 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7492 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7493 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7494 ;;
7495 *)
7496 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7497 ;;
7498 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499
Ned Deily87adb6e2013-10-18 21:09:56 -07007500 if test "${UNIVERSALSDK}" != "/"
7501 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007502 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7503 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007505 else
7506 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7507 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 fi
7509 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510
Ned Deily87adb6e2013-10-18 21:09:56 -07007511 # Calculate an appropriate deployment target for this build:
7512 # The deployment target value is used explicitly to enable certain
7513 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007514 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007515 # component of the string returned by distutils.get_platform().
7516 #
7517 # Use the value from:
7518 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7519 # 2. the operating system version of the build machine if >= 10.6
7520 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7521 # below to pick either 10.3, 10.4, or 10.5 as the target.
7522 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523
Ned Deily87adb6e2013-10-18 21:09:56 -07007524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7525$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007526 cur_target_major=`sw_vers -productVersion | \
7527 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7528 cur_target_minor=`sw_vers -productVersion | \
7529 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7530 cur_target="${cur_target_major}.${cur_target_minor}"
7531 if test ${cur_target_major} -eq 10 && \
7532 test ${cur_target_minor} -ge 3 && \
7533 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007534 then
Ned Deily36820b62014-06-25 13:44:22 -07007535 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007536 cur_target=10.3
7537 if test ${enable_universalsdk}
7538 then
7539 case "$UNIVERSAL_ARCHS" in
7540 all|3-way|intel|64-bit)
7541 # These configurations were first supported in 10.5
7542 cur_target='10.5'
7543 ;;
7544 esac
7545 else
7546 if test `/usr/bin/arch` = "i386"
7547 then
7548 # 10.4 was the first release to support Intel archs
7549 cur_target="10.4"
7550 fi
7551 fi
7552 fi
7553 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007554
Ned Deily87adb6e2013-10-18 21:09:56 -07007555 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7556 # environment with a value that is the same as what we'll use
7557 # in the Makefile to ensure that we'll get the same compiler
7558 # environment during configure and build time.
7559 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7560 export MACOSX_DEPLOYMENT_TARGET
7561 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7563$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007564
Ned Deily87adb6e2013-10-18 21:09:56 -07007565 # end of Darwin* tests
7566 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567 esac
7568 ;;
7569
7570*)
7571 case $ac_sys_system in
7572 OpenUNIX*|UnixWare*)
7573 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7574 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575 SCO_SV*)
7576 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7577 ;;
7578 esac
7579 ;;
7580esac
7581
Zachary Ware5af85642015-12-21 12:09:17 -06007582# ICC needs -fp-model strict or floats behave badly
7583case "$CC" in
7584*icc*)
7585 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7586 ;;
7587esac
7588
T. Woutersddbfa2c2017-05-23 01:30:49 +02007589if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590 :
7591else
7592 OPT="-DNDEBUG $OPT"
7593fi
7594
7595if test "$ac_arch_flags"
7596then
7597 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7598fi
7599
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600# On some compilers, pthreads are available without further options
7601# (e.g. MacOS X). On some of these systems, the compiler will not
7602# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7603# So we have to see first whether pthreads are available without
7604# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7606$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007607if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611 ac_cv_pthread_is_default=no
7612else
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614/* end confdefs.h. */
7615
Stefan Krah7dba5942012-11-22 22:49:11 +01007616#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617#include <pthread.h>
7618
7619void* routine(void* p){return NULL;}
7620
7621int main(){
7622 pthread_t p;
7623 if(pthread_create(&p,NULL,routine,NULL)!=0)
7624 return 1;
7625 (void)pthread_detach(p);
7626 return 0;
7627}
7628
7629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631
7632 ac_cv_pthread_is_default=yes
7633 ac_cv_kthread=no
7634 ac_cv_pthread=no
7635
7636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641fi
7642
7643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644fi
7645
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7647$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648
7649
7650if test $ac_cv_pthread_is_default = yes
7651then
7652 ac_cv_kpthread=no
7653else
7654# -Kpthread, if available, provides the right #defines
7655# and linker options to make pthread_create available
7656# Some compilers won't report that they do not support -Kpthread,
7657# so we need to run a program to see whether it really made the
7658# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7660$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007661if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663else
7664 ac_save_cc="$CC"
7665CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007666if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667 ac_cv_kpthread=no
7668else
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670/* end confdefs.h. */
7671
Stefan Krah7dba5942012-11-22 22:49:11 +01007672#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673#include <pthread.h>
7674
7675void* routine(void* p){return NULL;}
7676
7677int main(){
7678 pthread_t p;
7679 if(pthread_create(&p,NULL,routine,NULL)!=0)
7680 return 1;
7681 (void)pthread_detach(p);
7682 return 0;
7683}
7684
7685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007686if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687 ac_cv_kpthread=yes
7688else
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 ac_cv_kpthread=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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695CC="$ac_save_cc"
7696fi
7697
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7699$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700fi
7701
7702if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7703then
7704# -Kthread, if available, provides the right #defines
7705# and linker options to make pthread_create available
7706# Some compilers won't report that they do not support -Kthread,
7707# so we need to run a program to see whether it really made the
7708# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7710$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007711if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713else
7714 ac_save_cc="$CC"
7715CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007716if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717 ac_cv_kthread=no
7718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720/* end confdefs.h. */
7721
Stefan Krah7dba5942012-11-22 22:49:11 +01007722#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723#include <pthread.h>
7724
7725void* routine(void* p){return NULL;}
7726
7727int main(){
7728 pthread_t p;
7729 if(pthread_create(&p,NULL,routine,NULL)!=0)
7730 return 1;
7731 (void)pthread_detach(p);
7732 return 0;
7733}
7734
7735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007736if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737 ac_cv_kthread=yes
7738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743fi
7744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745CC="$ac_save_cc"
7746fi
7747
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7749$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750fi
7751
7752if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7753then
7754# -pthread, if available, provides the right #defines
7755# and linker options to make pthread_create available
7756# Some compilers won't report that they do not support -pthread,
7757# so we need to run a program to see whether it really made the
7758# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7760$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007761if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763else
7764 ac_save_cc="$CC"
7765CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007766if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767 ac_cv_pthread=no
7768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770/* end confdefs.h. */
7771
Stefan Krah7dba5942012-11-22 22:49:11 +01007772#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007773#include <pthread.h>
7774
7775void* routine(void* p){return NULL;}
7776
7777int main(){
7778 pthread_t p;
7779 if(pthread_create(&p,NULL,routine,NULL)!=0)
7780 return 1;
7781 (void)pthread_detach(p);
7782 return 0;
7783}
7784
7785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007786if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787 ac_cv_pthread=yes
7788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793fi
7794
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795CC="$ac_save_cc"
7796fi
7797
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7799$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800fi
7801
7802# If we have set a CC compiler flag for thread support then
7803# check if it works for CXX, too.
7804ac_cv_cxx_thread=no
7805if test ! -z "$CXX"
7806then
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7808$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809ac_save_cxx="$CXX"
7810
7811if test "$ac_cv_kpthread" = "yes"
7812then
7813 CXX="$CXX -Kpthread"
7814 ac_cv_cxx_thread=yes
7815elif test "$ac_cv_kthread" = "yes"
7816then
7817 CXX="$CXX -Kthread"
7818 ac_cv_cxx_thread=yes
7819elif test "$ac_cv_pthread" = "yes"
7820then
7821 CXX="$CXX -pthread"
7822 ac_cv_cxx_thread=yes
7823fi
7824
7825if test $ac_cv_cxx_thread = yes
7826then
7827 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7828 $CXX -c conftest.$ac_ext 2>&5
7829 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7830 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7831 then
7832 ac_cv_cxx_thread=yes
7833 else
7834 ac_cv_cxx_thread=no
7835 fi
7836 rm -fr conftest*
7837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7839$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840fi
7841CXX="$ac_save_cxx"
7842
7843
7844# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7846$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007847if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851/* end confdefs.h. */
7852#include <stdlib.h>
7853#include <stdarg.h>
7854#include <string.h>
7855#include <float.h>
7856
7857int
7858main ()
7859{
7860
7861 ;
7862 return 0;
7863}
7864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007865if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866 ac_cv_header_stdc=yes
7867else
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007869fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7871
7872if test $ac_cv_header_stdc = yes; then
7873 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875/* end confdefs.h. */
7876#include <string.h>
7877
7878_ACEOF
7879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 $EGREP "memchr" >/dev/null 2>&1; then :
7881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882else
7883 ac_cv_header_stdc=no
7884fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007885rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886
7887fi
7888
7889if test $ac_cv_header_stdc = yes; then
7890 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007892/* end confdefs.h. */
7893#include <stdlib.h>
7894
7895_ACEOF
7896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $EGREP "free" >/dev/null 2>&1; then :
7898
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007899else
7900 ac_cv_header_stdc=no
7901fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007902rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007903
7904fi
7905
7906if test $ac_cv_header_stdc = yes; then
7907 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007909 :
7910else
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007912/* end confdefs.h. */
7913#include <ctype.h>
7914#include <stdlib.h>
7915#if ((' ' & 0x0FF) == 0x020)
7916# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7917# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7918#else
7919# define ISLOWER(c) \
7920 (('a' <= (c) && (c) <= 'i') \
7921 || ('j' <= (c) && (c) <= 'r') \
7922 || ('s' <= (c) && (c) <= 'z'))
7923# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7924#endif
7925
7926#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7927int
7928main ()
7929{
7930 int i;
7931 for (i = 0; i < 256; i++)
7932 if (XOR (islower (i), ISLOWER (i))
7933 || toupper (i) != TOUPPER (i))
7934 return 2;
7935 return 0;
7936}
7937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938if ac_fn_c_try_run "$LINENO"; then :
7939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007940else
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007945fi
7946
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007947fi
7948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7950$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007951if test $ac_cv_header_stdc = yes; then
7952
Matthias Kloseb9621712010-04-24 17:59:49 +00007953$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007954
7955fi
7956
stratakise768c862018-01-23 16:11:24 +01007957for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007958fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007959ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007960sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007961utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007962poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007963sys/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 +01007964sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007965sys/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 +01007966sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007967sys/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 -07007968libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007969linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Benjamin Peterson5c0c3252019-11-05 21:58:31 -08007970sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007971do :
7972 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7973ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007974if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007976#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007977_ACEOF
7978
7979fi
7980
Guido van Rossum627b2d71993-12-24 10:39:16 +00007981done
7982
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007984for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007985 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7987$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007988if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993#include <sys/types.h>
7994#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007995
Martin v. Löwis11437992002-04-12 09:54:03 +00007996int
7997main ()
7998{
7999if ((DIR *) 0)
8000return 0;
8001 ;
8002 return 0;
8003}
8004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00008007else
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012eval ac_res=\$$as_ac_Header
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8014$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008015if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008017#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008018_ACEOF
8019
8020ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008021fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008022
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023done
8024# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8025if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8027$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030else
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035/* Override any GCC internal prototype to avoid an error.
8036 Use char because int might match the return type of a GCC
8037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008038#ifdef __cplusplus
8039extern "C"
8040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008041char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ;
8047 return 0;
8048}
8049_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050for ac_lib in '' dir; do
8051 if test -z "$ac_lib"; then
8052 ac_res="none required"
8053 else
8054 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060rm -f core conftest.err conftest.$ac_objext \
8061 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008062 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065done
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068else
8069 ac_cv_search_opendir=no
8070fi
8071rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008072LIBS=$ac_func_search_save_LIBS
8073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8075$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008077if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Michael W. Hudson54241132001-12-07 15:38:26 +00008082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8084$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008087else
8088 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008092/* Override any GCC internal prototype to avoid an error.
8093 Use char because int might match the return type of a GCC
8094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008095#ifdef __cplusplus
8096extern "C"
8097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008098char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008099int
8100main ()
8101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008103 ;
8104 return 0;
8105}
8106_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107for ac_lib in '' x; do
8108 if test -z "$ac_lib"; then
8109 ac_res="none required"
8110 else
8111 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008112 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008117rm -f core conftest.err conftest.$ac_objext \
8118 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008119 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008120 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122done
Victor Stinnere0be4232011-10-25 13:06:09 +02008123if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125else
8126 ac_cv_search_opendir=no
8127fi
8128rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008129LIBS=$ac_func_search_save_LIBS
8130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8132$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008134if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008135 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008137fi
8138
8139fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8142$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008143if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008147/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008148#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008149int
8150main ()
8151{
8152return makedev(0, 0);
8153 ;
8154 return 0;
8155}
8156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158 ac_cv_header_sys_types_h_makedev=yes
8159else
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162rm -f core conftest.err conftest.$ac_objext \
8163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008164
8165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8167$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008168
8169if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008170ac_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 +02008171if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008174
8175fi
8176
8177
8178
8179 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 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 +02008181if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008184
8185fi
8186
8187
8188 fi
8189fi
8190
Michael W. Hudson54241132001-12-07 15:38:26 +00008191
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008192# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8193# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8194SAVE_CFLAGS=$CFLAGS
8195CFLAGS="-std=c99 $CFLAGS"
8196for ac_header in bluetooth/bluetooth.h
8197do :
8198 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8199if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8200 cat >>confdefs.h <<_ACEOF
8201#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8202_ACEOF
8203
8204fi
8205
8206done
8207
8208CFLAGS=$SAVE_CFLAGS
8209
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008210# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8211for ac_header in net/if.h
8212do :
8213 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8214#ifdef STDC_HEADERS
8215# include <stdlib.h>
8216# include <stddef.h>
8217#else
8218# ifdef HAVE_STDLIB_H
8219# include <stdlib.h>
8220# endif
8221#endif
8222#ifdef HAVE_SYS_SOCKET_H
8223# include <sys/socket.h>
8224#endif
8225
8226"
Victor Stinnere0be4232011-10-25 13:06:09 +02008227if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008228 cat >>confdefs.h <<_ACEOF
8229#define HAVE_NET_IF_H 1
8230_ACEOF
8231
8232fi
8233
8234done
8235
8236
Martin v. Löwis11017b12006-01-14 18:12:57 +00008237# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008238for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008239do :
8240 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 +00008241#ifdef HAVE_ASM_TYPES_H
8242#include <asm/types.h>
8243#endif
8244#ifdef HAVE_SYS_SOCKET_H
8245#include <sys/socket.h>
8246#endif
8247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248"
Victor Stinnere0be4232011-10-25 13:06:09 +02008249if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008251#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008252_ACEOF
8253
8254fi
8255
8256done
8257
8258
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008259# On Linux, qrtr.h requires asm/types.h
8260for ac_header in linux/qrtr.h
8261do :
8262 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8263#ifdef HAVE_ASM_TYPES_H
8264#include <asm/types.h>
8265#endif
8266#ifdef HAVE_SYS_SOCKET_H
8267#include <sys/socket.h>
8268#endif
8269
8270"
8271if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8272 cat >>confdefs.h <<_ACEOF
8273#define HAVE_LINUX_QRTR_H 1
8274_ACEOF
8275
8276fi
8277
8278done
8279
8280
caaveryeffc12f2017-09-06 18:18:10 -04008281for ac_header in linux/vm_sockets.h
8282do :
8283 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8284#ifdef HAVE_SYS_SOCKET_H
8285#include <sys/socket.h>
8286#endif
8287
8288"
8289if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8290 cat >>confdefs.h <<_ACEOF
8291#define HAVE_LINUX_VM_SOCKETS_H 1
8292_ACEOF
8293
8294fi
8295
8296done
8297
8298
karl ding360371f2020-04-29 15:31:19 -07008299# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8300for 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 +02008301do :
8302 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8303ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8304#ifdef HAVE_SYS_SOCKET_H
8305#include <sys/socket.h>
8306#endif
8307
8308"
8309if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8310 cat >>confdefs.h <<_ACEOF
8311#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8312_ACEOF
8313
8314fi
8315
8316done
8317
8318
Guido van Rossum627b2d71993-12-24 10:39:16 +00008319# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008320was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8322$as_echo_n "checking for clock_t in time.h... " >&6; }
8323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008324/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008325#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008326
8327_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008330 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008331else
Martin v. Löwis11437992002-04-12 09:54:03 +00008332
8333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008335
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008336
Guido van Rossum627b2d71993-12-24 10:39:16 +00008337fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008338rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8341$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8344$as_echo_n "checking for makedev... " >&6; }
8345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008346/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008347
Jesus Cea740f53a2010-04-28 11:35:30 +00008348#if defined(MAJOR_IN_MKDEV)
8349#include <sys/mkdev.h>
8350#elif defined(MAJOR_IN_SYSMACROS)
8351#include <sys/sysmacros.h>
8352#else
8353#include <sys/types.h>
8354#endif
8355
Neal Norwitz11690112002-07-30 01:08:28 +00008356int
8357main ()
8358{
Jesus Cea740f53a2010-04-28 11:35:30 +00008359
8360 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008361 ;
8362 return 0;
8363}
Matthias Kloseb159a552010-04-25 21:00:44 +00008364
Neal Norwitz11690112002-07-30 01:08:28 +00008365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008366if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008367 ac_cv_has_makedev=yes
8368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008371rm -f core conftest.err conftest.$ac_objext \
8372 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8374$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008375if test "$ac_cv_has_makedev" = "yes"; then
8376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008378
8379fi
8380
Christian Heimes985ecdc2013-11-20 11:46:18 +01008381# byte swapping
8382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8383$as_echo_n "checking for le64toh... " >&6; }
8384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8385/* end confdefs.h. */
8386
8387#ifdef HAVE_ENDIAN_H
8388#include <endian.h>
8389#elif defined(HAVE_SYS_ENDIAN_H)
8390#include <sys/endian.h>
8391#endif
8392
8393int
8394main ()
8395{
8396
8397 le64toh(1)
8398 ;
8399 return 0;
8400}
8401
8402_ACEOF
8403if ac_fn_c_try_link "$LINENO"; then :
8404 ac_cv_has_le64toh=yes
8405else
8406 ac_cv_has_le64toh=no
8407fi
8408rm -f core conftest.err conftest.$ac_objext \
8409 conftest$ac_exeext conftest.$ac_ext
8410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8411$as_echo "$ac_cv_has_le64toh" >&6; }
8412if test "$ac_cv_has_le64toh" = "yes"; then
8413
8414$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8415
8416fi
8417
Martin v. Löwis399a6892002-10-04 10:22:02 +00008418use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008419# Don't use largefile support for GNU/Hurd
8420case $ac_sys_system in GNU*)
8421 use_lfs=no
8422esac
8423
Martin v. Löwis399a6892002-10-04 10:22:02 +00008424if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008425# Two defines needed to enable largefile support on various platforms
8426# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008427case $ac_sys_system/$ac_sys_release in
8428AIX*)
8429
8430$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8431
8432 ;;
8433esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008434
Matthias Kloseb9621712010-04-24 17:59:49 +00008435$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
8437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008439
Martin v. Löwis399a6892002-10-04 10:22:02 +00008440fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008441
Guido van Rossum84e7b241996-08-19 21:59:00 +00008442# Add some code to confdefs.h so that the test for off_t works on SCO
8443cat >> confdefs.h <<\EOF
8444#if defined(SCO_DS)
8445#undef _OFF_T
8446#endif
8447EOF
8448
Guido van Rossumef2255b2000-03-10 22:30:29 +00008449# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008450ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008452
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455cat >>confdefs.h <<_ACEOF
8456#define mode_t int
8457_ACEOF
8458
8459fi
8460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008463
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008464else
Martin v. Löwis11437992002-04-12 09:54:03 +00008465
8466cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008468_ACEOF
8469
8470fi
8471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008473if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
8477cat >>confdefs.h <<_ACEOF
8478#define pid_t int
8479_ACEOF
8480
8481fi
8482
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008485#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008486_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008487
Matthias Kloseb9621712010-04-24 17:59:49 +00008488ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008490
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008491else
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
8493cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008495_ACEOF
8496
8497fi
8498
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8500$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008501if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008505/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008506#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
8508_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008511 ac_cv_type_uid_t=yes
8512else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008513 ac_cv_type_uid_t=no
8514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008515rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008516
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8519$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008520if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
8524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008526
8527fi
8528
Mark Dickinson983bc162012-12-02 12:11:38 +00008529
Matthias Kloseb9621712010-04-24 17:59:49 +00008530ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008531if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008534
8535fi
8536
Stefan Krah1919b7e2012-03-21 18:25:23 +01008537ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8538if test "x$ac_cv_type___uint128_t" = xyes; then :
8539
8540$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8541
8542fi
8543
Jack Jansendd19cf82001-12-06 22:36:17 +00008544
Michael W. Hudson54241132001-12-07 15:38:26 +00008545# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008546# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547# The cast to long int works around a bug in the HP C Compiler
8548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8552$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008553if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 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 +00008557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558else
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 if test "$ac_cv_type_int" = yes; then
8560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008562as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008563See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564 else
8565 ac_cv_sizeof_int=0
8566 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8571$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572
8573
8574
Martin v. Löwis11437992002-04-12 09:54:03 +00008575cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008576#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008577_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008578
8579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580# The cast to long int works around a bug in the HP C Compiler
8581# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8582# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8583# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8585$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008586if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 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 +00008590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591else
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 if test "$ac_cv_type_long" = yes; then
8593 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008595as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008596See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597 else
8598 ac_cv_sizeof_long=0
8599 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8604$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605
8606
8607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008609#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008610_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008611
8612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613# The cast to long int works around a bug in the HP C Compiler
8614# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8615# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8616# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8618$as_echo_n "checking size of long long... " >&6; }
8619if ${ac_cv_sizeof_long_long+:} false; then :
8620 $as_echo_n "(cached) " >&6
8621else
8622 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8623
8624else
8625 if test "$ac_cv_type_long_long" = yes; then
8626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8628as_fn_error 77 "cannot compute sizeof (long long)
8629See \`config.log' for more details" "$LINENO" 5; }
8630 else
8631 ac_cv_sizeof_long_long=0
8632 fi
8633fi
8634
8635fi
8636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8637$as_echo "$ac_cv_sizeof_long_long" >&6; }
8638
8639
8640
8641cat >>confdefs.h <<_ACEOF
8642#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8643_ACEOF
8644
8645
8646# The cast to long int works around a bug in the HP C Compiler
8647# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8648# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8649# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8651$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008652if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008654else
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 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 +00008656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657else
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 if test "$ac_cv_type_void_p" = yes; then
8659 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008661as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008662See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663 else
8664 ac_cv_sizeof_void_p=0
8665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8670$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671
8672
8673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008675#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008676_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008677
8678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679# The cast to long int works around a bug in the HP C Compiler
8680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8682# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8684$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008685if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 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 +00008689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690else
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 if test "$ac_cv_type_short" = yes; then
8692 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8693$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008694as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008695See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696 else
8697 ac_cv_sizeof_short=0
8698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8703$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704
8705
8706
Martin v. Löwis11437992002-04-12 09:54:03 +00008707cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008708#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008709_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008710
8711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712# The cast to long int works around a bug in the HP C Compiler
8713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8715# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8717$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008718if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 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 +00008722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723else
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 if test "$ac_cv_type_float" = yes; then
8725 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008727as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008728See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729 else
8730 ac_cv_sizeof_float=0
8731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8736$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737
8738
8739
Martin v. Löwis11437992002-04-12 09:54:03 +00008740cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008741#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008742_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008743
8744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745# The cast to long int works around a bug in the HP C Compiler
8746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8748# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8750$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008751if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 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 +00008755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 if test "$ac_cv_type_double" = yes; then
8758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008760as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008761See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762 else
8763 ac_cv_sizeof_double=0
8764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766
Martin v. Löwis11437992002-04-12 09:54:03 +00008767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8769$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770
8771
8772
Martin v. Löwis11437992002-04-12 09:54:03 +00008773cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008774#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008775_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008776
8777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778# The cast to long int works around a bug in the HP C Compiler
8779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8783$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008784if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008786else
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 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 +00008788
Martin v. Löwis11437992002-04-12 09:54:03 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 if test "$ac_cv_type_fpos_t" = yes; then
8791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008793as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008794See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795 else
8796 ac_cv_sizeof_fpos_t=0
8797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8802$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803
8804
8805
Martin v. Löwis11437992002-04-12 09:54:03 +00008806cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008807#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008808_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008809
Michael W. Hudson54241132001-12-07 15:38:26 +00008810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811# The cast to long int works around a bug in the HP C Compiler
8812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8816$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 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 +00008821
Martin v. Löwis18e16552006-02-15 17:27:45 +00008822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 if test "$ac_cv_type_size_t" = yes; then
8824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008826as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008827See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828 else
8829 ac_cv_sizeof_size_t=0
8830 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832
Martin v. Löwis18e16552006-02-15 17:27:45 +00008833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8835$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836
8837
8838
Martin v. Löwis18e16552006-02-15 17:27:45 +00008839cat >>confdefs.h <<_ACEOF
8840#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8841_ACEOF
8842
8843
Christian Heimes400adb02008-02-01 08:12:03 +00008844# The cast to long int works around a bug in the HP C Compiler
8845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8849$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008850if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 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 +00008854
Christian Heimes400adb02008-02-01 08:12:03 +00008855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 if test "$ac_cv_type_pid_t" = yes; then
8857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008859as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008860See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008861 else
8862 ac_cv_sizeof_pid_t=0
8863 fi
8864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865
Christian Heimes400adb02008-02-01 08:12:03 +00008866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8868$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008869
8870
8871
8872cat >>confdefs.h <<_ACEOF
8873#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8874_ACEOF
8875
8876
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008877# The cast to long int works around a bug in the HP C Compiler
8878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8880# This bug is HP SR number 8606223364.
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8882$as_echo_n "checking size of uintptr_t... " >&6; }
8883if ${ac_cv_sizeof_uintptr_t+:} false; then :
8884 $as_echo_n "(cached) " >&6
8885else
8886 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8887
8888else
8889 if test "$ac_cv_type_uintptr_t" = yes; then
8890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8892as_fn_error 77 "cannot compute sizeof (uintptr_t)
8893See \`config.log' for more details" "$LINENO" 5; }
8894 else
8895 ac_cv_sizeof_uintptr_t=0
8896 fi
8897fi
8898
8899fi
8900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8901$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8902
8903
8904
8905cat >>confdefs.h <<_ACEOF
8906#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8907_ACEOF
8908
8909
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911
Eitan Adler3055c942018-05-15 22:58:09 -07008912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8913$as_echo_n "checking for long double... " >&6; }
8914if ${ac_cv_type_long_double+:} false; then :
8915 $as_echo_n "(cached) " >&6
8916else
8917 if test "$GCC" = yes; then
8918 ac_cv_type_long_double=yes
8919 else
8920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8921/* end confdefs.h. */
8922/* The Stardent Vistra knows sizeof (long double), but does
8923 not support it. */
8924 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008925int
8926main ()
8927{
Eitan Adler3055c942018-05-15 22:58:09 -07008928static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8929 sizeof (double) <= sizeof (long double))];
8930test_array [0] = 0;
8931return test_array [0];
8932
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008933 ;
8934 return 0;
8935}
8936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008937if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008938 ac_cv_type_long_double=yes
8939else
8940 ac_cv_type_long_double=no
8941fi
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8943 fi
8944fi
8945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8946$as_echo "$ac_cv_type_long_double" >&6; }
8947 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008948
Matthias Kloseb9621712010-04-24 17:59:49 +00008949$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008950
Eitan Adler3055c942018-05-15 22:58:09 -07008951 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008953# The cast to long int works around a bug in the HP C Compiler
8954# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8955# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8956# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8958$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008959if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008961else
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 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 +00008963
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008964else
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 if test "$ac_cv_type_long_double" = yes; then
8966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008968as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008969See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008970 else
8971 ac_cv_sizeof_long_double=0
8972 fi
8973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8977$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008978
8979
8980
8981cat >>confdefs.h <<_ACEOF
8982#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8983_ACEOF
8984
8985
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008987# The cast to long int works around a bug in the HP C Compiler
8988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8990# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8992$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008993if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008995else
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 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 +00008997
Thomas Woutersb2137042007-02-01 18:02:27 +00008998else
Matthias Kloseb9621712010-04-24 17:59:49 +00008999 if test "$ac_cv_type__Bool" = yes; then
9000 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009002as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02009003See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 else
9005 ac_cv_sizeof__Bool=0
9006 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00009007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009008
Thomas Woutersb2137042007-02-01 18:02:27 +00009009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
9011$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012
9013
9014
Thomas Woutersb2137042007-02-01 18:02:27 +00009015cat >>confdefs.h <<_ACEOF
9016#define SIZEOF__BOOL $ac_cv_sizeof__Bool
9017_ACEOF
9018
9019
Thomas Woutersb2137042007-02-01 18:02:27 +00009020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021# The cast to long int works around a bug in the HP C Compiler
9022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9024# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9026$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009027if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029else
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031#ifdef HAVE_SYS_TYPES_H
9032#include <sys/types.h>
9033#endif
9034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 if test "$ac_cv_type_off_t" = yes; then
9039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009041as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009042See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043 else
9044 ac_cv_sizeof_off_t=0
9045 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9050$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052
9053
Martin v. Löwis11437992002-04-12 09:54:03 +00009054cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009055#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009057
Michael W. Hudson54241132001-12-07 15:38:26 +00009058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059
Matthias Kloseb9621712010-04-24 17:59:49 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9061$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009062if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009063 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009066
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9068$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009069else
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072fi
9073
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 time_t" >&5
9079$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009080if ${ac_cv_sizeof_time_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 (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009084#ifdef HAVE_SYS_TYPES_H
9085#include <sys/types.h>
9086#endif
9087#ifdef HAVE_TIME_H
9088#include <time.h>
9089#endif
9090
Matthias Kloseb9621712010-04-24 17:59:49 +00009091"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009093else
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 if test "$ac_cv_type_time_t" = yes; then
9095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009097as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009098See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009099 else
9100 ac_cv_sizeof_time_t=0
9101 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009103
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9106$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009111#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009112_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009113
Michael W. Hudson54241132001-12-07 15:38:26 +00009114
9115
Trent Mick635f6fb2000-08-23 21:33:05 +00009116# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009117ac_save_cc="$CC"
9118if test "$ac_cv_kpthread" = "yes"
9119then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009120elif test "$ac_cv_kthread" = "yes"
9121then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009122elif test "$ac_cv_pthread" = "yes"
9123then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009124fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9127$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009128have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009130/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009131
9132 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009133int
9134main ()
9135{
Guido van Rossum12580492000-09-24 16:47:19 +00009136pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ;
9138 return 0;
9139}
Matthias Kloseb159a552010-04-25 21:00:44 +00009140
Martin v. Löwis11437992002-04-12 09:54:03 +00009141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009142if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009143 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9147$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009148if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009150# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9151# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9152# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9154$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009155if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009157else
Matthias Kloseb9621712010-04-24 17:59:49 +00009158 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009159#ifdef HAVE_PTHREAD_H
9160#include <pthread.h>
9161#endif
9162
Matthias Kloseb9621712010-04-24 17:59:49 +00009163"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009165else
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 if test "$ac_cv_type_pthread_t" = yes; then
9167 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009169as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009170See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009171 else
9172 ac_cv_sizeof_pthread_t=0
9173 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009175
Trent Mick635f6fb2000-08-23 21:33:05 +00009176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9178$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009180
9181
Martin v. Löwis11437992002-04-12 09:54:03 +00009182cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009183#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009184_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009186
Trent Mick635f6fb2000-08-23 21:33:05 +00009187fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009188
9189# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9190# This checking will be unnecessary after removing deprecated TLS API.
9191# The cast to long int works around a bug in the HP C Compiler
9192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9194# This bug is HP SR number 8606223364.
9195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9196$as_echo_n "checking size of pthread_key_t... " >&6; }
9197if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9198 $as_echo_n "(cached) " >&6
9199else
9200 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9201"; then :
9202
9203else
9204 if test "$ac_cv_type_pthread_key_t" = yes; then
9205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9207as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9208See \`config.log' for more details" "$LINENO" 5; }
9209 else
9210 ac_cv_sizeof_pthread_key_t=0
9211 fi
9212fi
9213
9214fi
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9216$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9217
9218
9219
9220cat >>confdefs.h <<_ACEOF
9221#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9222_ACEOF
9223
9224
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9226$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9227if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9229/* end confdefs.h. */
9230#include <pthread.h>
9231int
9232main ()
9233{
9234pthread_key_t k; k * 1;
9235 ;
9236 return 0;
9237}
9238_ACEOF
9239if ac_fn_c_try_compile "$LINENO"; then :
9240 ac_pthread_key_t_is_arithmetic_type=yes
9241else
9242 ac_pthread_key_t_is_arithmetic_type=no
9243
9244fi
9245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9247$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9248 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9249
9250$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9251
9252 fi
9253else
9254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9255$as_echo "no" >&6; }
9256fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009257CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009258
Michael W. Hudson54241132001-12-07 15:38:26 +00009259
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009260case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009261 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009262 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9263 ;;
9264 Darwin/*)
9265 OTHER_LIBTOOL_OPT=""
9266 ;;
9267esac
9268
9269
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009270
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009271case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009272 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009273 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9274 if test "${enable_universalsdk}"; then
9275 :
9276 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009277 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009278 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009279 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009280 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009281 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009282 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009283 if test ${gcc_version} '<' 4.0
9284 then
9285 LIBTOOL_CRUFT="-lcc_dynamic"
9286 else
9287 LIBTOOL_CRUFT=""
9288 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009290 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009291else
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009293/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009294
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009295 #include <unistd.h>
9296 int main(int argc, char*argv[])
9297 {
9298 if (sizeof(long) == 4) {
9299 return 0;
9300 } else {
9301 return 1;
9302 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009303 }
9304
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009306if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009307 ac_osx_32bit=yes
9308else
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9312 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009313fi
9314
9315
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009316 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009317 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009318 i386)
9319 MACOSX_DEFAULT_ARCH="i386"
9320 ;;
9321 ppc)
9322 MACOSX_DEFAULT_ARCH="ppc"
9323 ;;
9324 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009325 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009326 ;;
9327 esac
9328 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009329 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009330 i386)
9331 MACOSX_DEFAULT_ARCH="x86_64"
9332 ;;
9333 ppc)
9334 MACOSX_DEFAULT_ARCH="ppc64"
9335 ;;
9336 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009337 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009338 ;;
9339 esac
9340
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009341 fi
9342
9343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009344 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009346esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9348$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009349if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009350then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009351 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009353 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9358$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009359 if test $enable_shared = "yes"
9360 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009361 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 +00009362 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363else
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366fi
9367
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9369$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009370case $ac_sys_system/$ac_sys_release in
9371 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009372
Matthias Kloseb9621712010-04-24 17:59:49 +00009373$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009374
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9376$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009377 ;;
9378 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009381 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009382esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009383
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009385
Michael W. Hudson54241132001-12-07 15:38:26 +00009386
9387
9388
9389
Benjamin Peterson99f03762010-04-11 22:15:28 +00009390
Thomas Wouters477c8d52006-05-27 19:21:47 +00009391
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009392# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9393# -- usually .so, .sl on HP-UX, .dll on Cygwin
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9395$as_echo_n "checking the extension of shared libraries... " >&6; }
9396if test -z "$SHLIB_SUFFIX"; then
9397 case $ac_sys_system in
9398 hp*|HP*)
9399 case `uname -m` in
9400 ia64) SHLIB_SUFFIX=.so;;
9401 *) SHLIB_SUFFIX=.sl;;
9402 esac
9403 ;;
9404 CYGWIN*) SHLIB_SUFFIX=.dll;;
9405 *) SHLIB_SUFFIX=.so;;
9406 esac
9407fi
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9409$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009410
Guido van Rossum0a516c91994-09-12 10:58:40 +00009411# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009412# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009413# (Shared libraries in this instance are shared modules to be loaded into
9414# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9416$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009417if test -z "$LDSHARED"
9418then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009419 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009420 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009421 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009422 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009423 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009425 if test "$GCC" = "yes" ; then
9426 LDSHARED='$(CC) -shared'
9427 LDCXXSHARED='$(CXX) -shared'
9428 else
9429 LDSHARED='$(CC) -G'
9430 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009431 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009432 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009433 if test "$GCC" = "yes" ; then
9434 LDSHARED='$(CC) -shared'
9435 LDCXXSHARED='$(CXX) -shared'
9436 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009437 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009438 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009439 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009440 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009441 LDSHARED='$(CC) -bundle'
9442 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009443 if test "$enable_framework" ; then
9444 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009445 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9446 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009448 else
9449 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009450 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009452 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009453 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009454 LDSHARED='$(CC) -bundle'
9455 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009456 if test "$enable_framework" ; then
9457 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009458 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9459 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009460 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009461 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009462 # No framework, use the Python app as bundle-loader
9463 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009464 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009465 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009466 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009467 Darwin/*)
9468 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9469 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009470
Ned Deily36820b62014-06-25 13:44:22 -07009471 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9472 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9473 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9474 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9475 if test ${dep_target_major} -eq 10 && \
9476 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009477 then
Ned Deily36820b62014-06-25 13:44:22 -07009478 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009479 LDSHARED='$(CC) -bundle'
9480 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009481 if test "$enable_framework" ; then
9482 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009483 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9484 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009485 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009486 else
9487 # No framework, use the Python app as bundle-loader
9488 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9489 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009490 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009491 fi
Ned Deily36820b62014-06-25 13:44:22 -07009492 else
9493 # building for OS X 10.3 and later
9494 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9495 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9496 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009497 fi
9498 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009499 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009500 LDSHARED='$(CC) -shared'
9501 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009502 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009504 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009505 LDSHARED='$(CC) -shared'
9506 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009507 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009508 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009509 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009510 OpenBSD*)
9511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9512 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009513 LDSHARED='$(CC) -shared $(CCSHARED)'
9514 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009515 else
9516 case `uname -r` in
9517 [01].* | 2.[0-7] | 2.[0-7].*)
9518 LDSHARED="ld -Bshareable ${LDFLAGS}"
9519 ;;
9520 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009521 LDSHARED='$(CC) -shared $(CCSHARED)'
9522 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009523 ;;
9524 esac
9525 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009526 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009527 LDSHARED='$(CC) -shared'
9528 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009529 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009530 if test "$GCC" = "yes" ; then
9531 LDSHARED='$(CC) -shared'
9532 LDCXXSHARED='$(CXX) -shared'
9533 else
9534 LDSHARED='$(CC) -G'
9535 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009536 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009537 SCO_SV*)
9538 LDSHARED='$(CC) -Wl,-G,-Bexport'
9539 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9540 CYGWIN*)
9541 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9542 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009543 *) LDSHARED="ld";;
9544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9547$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009548LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009549BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009550# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009551# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9553$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554if test -z "$CCSHARED"
9555then
Guido van Rossum07397971997-04-29 21:49:50 +00009556 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009557 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009558 then CCSHARED="-fPIC";
9559 elif test `uname -p` = sparc;
9560 then CCSHARED="-xcode=pic32";
9561 else CCSHARED="-Kpic";
9562 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009563 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009564 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009565 else CCSHARED="+z";
9566 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009567 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009568 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009569 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009570 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009571 if test "$GCC" = "yes"
9572 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009573 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009574 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009575 SCO_SV*)
9576 if test "$GCC" = "yes"
9577 then CCSHARED="-fPIC"
9578 else CCSHARED="-Kpic -belf"
9579 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009580 VxWorks*)
9581 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009582 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9585$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009586# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009587# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9589$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009590if test -z "$LINKFORSHARED"
9591then
Guido van Rossum07397971997-04-29 21:49:50 +00009592 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009593 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009594 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009595 LINKFORSHARED="-Wl,-E -Wl,+s";;
9596# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009597 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009598 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009599 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009601 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009602
9603 # Issue #18075: the default maximum stack size (8MBytes) is too
9604 # small for the default recursion limit. Increase the stack size
9605 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009606 # Note: This matches the value of THREAD_STACK_SIZE in
9607 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009608 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9609
Jack Jansene578a632001-08-15 01:27:14 +00009610 if test "$enable_framework"
9611 then
Jack Jansenda49e192005-01-07 13:08:22 +00009612 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009613 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009614 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009615 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009616 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009617 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009618 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009619 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9620 then
9621 LINKFORSHARED="-Wl,--export-dynamic"
9622 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009623 SunOS/5*) case $CC in
9624 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009625 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009626 then
9627 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009628 fi;;
9629 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009630 CYGWIN*)
9631 if test $enable_shared = "no"
9632 then
9633 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9634 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009635 QNX*)
9636 # -Wl,-E causes the symbols to be added to the dynamic
9637 # symbol table so that they can be found when a module
9638 # is loaded. -N 2048K causes the stack size to be set
9639 # to 2048 kilobytes so that the stack doesn't overflow
9640 # when running test_compile.py.
9641 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009642 VxWorks*)
9643 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009644 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9647$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009648
Michael W. Hudson54241132001-12-07 15:38:26 +00009649
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009650
Matthias Kloseb9621712010-04-24 17:59:49 +00009651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9652$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009653if test ! "$LIBRARY" = "$LDLIBRARY"
9654then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009655 case $ac_sys_system in
9656 CYGWIN*)
9657 # Cygwin needs CCSHARED when building extension DLLs
9658 # but not when building the interpreter DLL.
9659 CFLAGSFORSHARED='';;
9660 *)
9661 CFLAGSFORSHARED='$(CCSHARED)'
9662 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9665$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009666
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009667# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9668# library (with --enable-shared).
9669# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009670# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9671# if it is not required, since it creates a dependency of the shared library
9672# to LIBS. This, in turn, means that applications linking the shared libpython
9673# don't need to link LIBS explicitly. The default should be only changed
9674# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009675
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9677$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009678case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009679 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009680 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009681esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9683$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009684
9685
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9688$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009689if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009690 $as_echo_n "(cached) " >&6
9691else
9692 ac_check_lib_save_LIBS=$LIBS
9693LIBS="-lsendfile $LIBS"
9694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9695/* end confdefs.h. */
9696
9697/* Override any GCC internal prototype to avoid an error.
9698 Use char because int might match the return type of a GCC
9699 builtin and then its argument prototype would still apply. */
9700#ifdef __cplusplus
9701extern "C"
9702#endif
9703char sendfile ();
9704int
9705main ()
9706{
9707return sendfile ();
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712if ac_fn_c_try_link "$LINENO"; then :
9713 ac_cv_lib_sendfile_sendfile=yes
9714else
9715 ac_cv_lib_sendfile_sendfile=no
9716fi
9717rm -f core conftest.err conftest.$ac_objext \
9718 conftest$ac_exeext conftest.$ac_ext
9719LIBS=$ac_check_lib_save_LIBS
9720fi
9721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9722$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009723if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009724 cat >>confdefs.h <<_ACEOF
9725#define HAVE_LIBSENDFILE 1
9726_ACEOF
9727
9728 LIBS="-lsendfile $LIBS"
9729
9730fi
9731
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9733$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009736else
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009738LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742/* Override any GCC internal prototype to avoid an error.
9743 Use char because int might match the return type of a GCC
9744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009745#ifdef __cplusplus
9746extern "C"
9747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009748char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009749int
9750main ()
9751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ;
9754 return 0;
9755}
9756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009764LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9767$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009768if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 cat >>confdefs.h <<_ACEOF
9770#define HAVE_LIBDL 1
9771_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009773 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009775fi
9776 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9778$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009779if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009781else
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009783LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787/* Override any GCC internal prototype to avoid an error.
9788 Use char because int might match the return type of a GCC
9789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009790#ifdef __cplusplus
9791extern "C"
9792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009793char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794int
9795main ()
9796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ;
9799 return 0;
9800}
9801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807rm -f core conftest.err conftest.$ac_objext \
9808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9812$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009813if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 cat >>confdefs.h <<_ACEOF
9815#define HAVE_LIBDLD 1
9816_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009818 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820fi
9821 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009822
Michael Felt0d3ccb42017-12-30 22:39:20 +01009823# checks for uuid.h location
9824for ac_header in uuid/uuid.h uuid.h
9825do :
9826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9827ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9828if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9829 cat >>confdefs.h <<_ACEOF
9830#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9831_ACEOF
9832
9833fi
9834
9835done
9836
9837
Berker Peksag9a10ff42017-11-08 23:09:16 +03009838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9839$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9841/* end confdefs.h. */
9842#include <uuid/uuid.h>
9843int
9844main ()
9845{
9846
9847#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009848void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009849#endif
9850
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855if ac_fn_c_try_compile "$LINENO"; then :
9856
9857$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9858
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9860$as_echo "yes" >&6; }
9861else
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9863$as_echo "no" >&6; }
9864
9865fi
9866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9867
Michael Felt0d3ccb42017-12-30 22:39:20 +01009868# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009869# FreeBSD and OpenBSD provides support as well
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9871$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9873/* end confdefs.h. */
9874#include <uuid.h>
9875int
9876main ()
9877{
9878
9879#ifndef uuid_create
9880void *x = uuid_create
9881#endif
9882
9883 ;
9884 return 0;
9885}
9886_ACEOF
9887if ac_fn_c_try_compile "$LINENO"; then :
9888
9889$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9890
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9892$as_echo "yes" >&6; }
9893else
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9895$as_echo "no" >&6; }
9896
9897fi
9898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9899
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009900# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9901# stream in big-endian byte-order
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9903$as_echo_n "checking for uuid_enc_be... " >&6; }
9904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9905/* end confdefs.h. */
9906#include <uuid.h>
9907int
9908main ()
9909{
9910
9911#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009912void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009913#endif
9914
9915 ;
9916 return 0;
9917}
9918_ACEOF
9919if ac_fn_c_try_compile "$LINENO"; then :
9920
9921$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9922
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9924$as_echo "yes" >&6; }
9925else
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928
9929fi
9930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009932# 'Real Time' functions on Solaris
9933# posix4 on Solaris 2.6
9934# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009936$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009937if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009939else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009940 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944/* Override any GCC internal prototype to avoid an error.
9945 Use char because int might match the return type of a GCC
9946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009950char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009951int
9952main ()
9953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ;
9956 return 0;
9957}
9958_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959for ac_lib in '' pthread rt posix4; do
9960 if test -z "$ac_lib"; then
9961 ac_res="none required"
9962 else
9963 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009969rm -f core conftest.err conftest.$ac_objext \
9970 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009971 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974done
Victor Stinnere0be4232011-10-25 13:06:09 +02009975if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977else
9978 ac_cv_search_sem_init=no
9979fi
9980rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009981LIBS=$ac_func_search_save_LIBS
9982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9984$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009986if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009988
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009989fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009990
Martin v. Löwis519adae2003-09-20 10:47:47 +00009991
Martin v. Löwis19d17342003-06-14 21:03:05 +00009992# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9994$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009995if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009997else
9998 ac_check_lib_save_LIBS=$LIBS
9999LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010001/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003/* Override any GCC internal prototype to avoid an error.
10004 Use char because int might match the return type of a GCC
10005 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010006#ifdef __cplusplus
10007extern "C"
10008#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000010009char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010010int
10011main ()
10012{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010014 ;
10015 return 0;
10016}
10017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010019 ac_cv_lib_intl_textdomain=yes
10020else
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000010022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010023rm -f core conftest.err conftest.$ac_objext \
10024 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010025LIBS=$ac_check_lib_save_LIBS
10026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
10028$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010029if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +000010030
Matthias Kloseb9621712010-04-24 17:59:49 +000010031$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +000010032
Brett Cannonc6d936e2009-06-07 20:09:53 +000010033 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000010034fi
10035
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010036
10037# checks for system dependent C++ extensions support
10038case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +000010039 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
10040$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
10041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010042/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010043
Georg Brandl59e87bd2011-02-15 19:48:59 +000010044 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010048loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 ;
10050 return 0;
10051}
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Martin v. Löwis11437992002-04-12 09:54:03 +000010053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010054if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010055
Matthias Kloseb159a552010-04-25 21:00:44 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010058
Matthias Kloseb159a552010-04-25 21:00:44 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010061
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010062else
Matthias Kloseb159a552010-04-25 21:00:44 +000010063
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010065$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010066
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010068rm -f core conftest.err conftest.$ac_objext \
Michael Felt39afa2d2019-12-15 15:17:53 +010010069 conftest$ac_exeext conftest.$ac_ext
10070# BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag
10071# of the AIX system used to build/package Python executable. This tag serves
10072# as a baseline for bdist module packages
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5
10074$as_echo_n "checking for the system builddate... " >&6; }
10075 AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }')
10076
10077cat >>confdefs.h <<_ACEOF
10078#define AIX_BUILDDATE $AIX_BUILDDATE
10079_ACEOF
10080
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5
10082$as_echo "$AIX_BUILDDATE" >&6; }
10083 ;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010084 *) ;;
10085esac
10086
Christian Heimes985ecdc2013-11-20 11:46:18 +010010087# check for systems that require aligned memory access
10088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10089$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010090if ${ac_cv_aligned_required+:} false; then :
10091 $as_echo_n "(cached) " >&6
10092else
10093 if test "$cross_compiling" = yes; then :
10094 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010095else
10096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10097/* end confdefs.h. */
10098
10099int main()
10100{
10101 char s[16];
10102 int i, *p1, *p2;
10103 for (i=0; i < 16; i++)
10104 s[i] = i;
10105 p1 = (int*)(s+1);
10106 p2 = (int*)(s+2);
10107 if (*p1 == *p2)
10108 return 1;
10109 return 0;
10110}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010111_ACEOF
10112if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010113 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010114else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010115 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010116fi
10117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10118 conftest.$ac_objext conftest.beam conftest.$ac_ext
10119fi
10120
10121
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010122fi
10123
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10125$as_echo "$ac_cv_aligned_required" >&6; }
10126if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010127
10128$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10129
10130fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010131
10132# str, bytes and memoryview hash algorithm
10133
10134
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10136$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10137
10138# Check whether --with-hash_algorithm was given.
10139if test "${with_hash_algorithm+set}" = set; then :
10140 withval=$with_hash_algorithm;
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10142$as_echo "$withval" >&6; }
10143case "$withval" in
10144 siphash24)
10145 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10146
10147 ;;
10148 fnv)
10149 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10150
10151 ;;
10152 *)
10153 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10154 ;;
10155esac
10156
10157else
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10159$as_echo "default" >&6; }
10160fi
10161
10162
Paul Ganssle62972d92020-05-16 04:20:06 -040010163validate_tzpath() {
10164 # Checks that each element of hte path is an absolute path
10165 if test -z "$1"; then
10166 # Empty string is allowed: it indicates no system TZPATH
10167 return 0
10168 fi
10169
10170 # Bad paths are those that don't start with /
10171 if ( echo $1 | grep -qE '(^|:)([^/]|$)' ); then
10172 as_fn_error $? "--with-tzpath must contain only absolute paths, not $1" "$LINENO" 5
10173 return 1;
10174 fi
10175}
10176
10177TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo"
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5
10179$as_echo_n "checking for --with-tzpath... " >&6; }
10180
10181# Check whether --with-tzpath was given.
10182if test "${with_tzpath+set}" = set; then :
10183 withval=$with_tzpath;
10184case "$withval" in
10185 yes)
10186 as_fn_error $? "--with-tzpath requires a value" "$LINENO" 5
10187 ;;
10188 *)
10189 validate_tzpath "$withval"
10190 TZPATH="$withval"
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5
10192$as_echo "\"$withval\"" >&6; }
10193 ;;
10194esac
10195
10196else
10197 validate_tzpath "$TZPATH"
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5
10199$as_echo "\"$TZPATH\"" >&6; }
10200fi
10201
10202
10203
Charles-François Natalid30b0222014-05-08 23:08:51 +010010204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10205$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10206
10207# Check whether --with-address_sanitizer was given.
10208if test "${with_address_sanitizer+set}" = set; then :
10209 withval=$with_address_sanitizer;
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10211$as_echo "$withval" >&6; }
10212BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10213LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010214# ASan works by controlling memory allocation, our own malloc interferes.
10215with_pymalloc="no"
10216
10217else
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10219$as_echo "no" >&6; }
10220fi
10221
10222
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10224$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10225
10226# Check whether --with-memory_sanitizer was given.
10227if test "${with_memory_sanitizer+set}" = set; then :
10228 withval=$with_memory_sanitizer;
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10230$as_echo "$withval" >&6; }
10231BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10232LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10233# MSan works by controlling memory allocation, our own malloc interferes.
10234with_pymalloc="no"
10235
10236else
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
10239fi
10240
10241
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10243$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10244
10245# Check whether --with-undefined_behavior_sanitizer was given.
10246if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10247 withval=$with_undefined_behavior_sanitizer;
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10249$as_echo "$withval" >&6; }
10250BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10251LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010252
10253else
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255$as_echo "no" >&6; }
10256fi
10257
10258
Guido van Rossum70c7f481998-03-26 18:44:10 +000010259# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10261$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010262if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010266LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270/* Override any GCC internal prototype to avoid an error.
10271 Use char because int might match the return type of a GCC
10272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010273#ifdef __cplusplus
10274extern "C"
10275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010276char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010277int
10278main ()
10279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 ;
10282 return 0;
10283}
10284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010287else
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010290rm -f core conftest.err conftest.$ac_objext \
10291 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010292LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10295$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010296if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010297 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010298fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010299 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10301$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010302if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010304else
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010306LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310/* Override any GCC internal prototype to avoid an error.
10311 Use char because int might match the return type of a GCC
10312 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313#ifdef __cplusplus
10314extern "C"
10315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010316char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010317int
10318main ()
10319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ;
10322 return 0;
10323}
10324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010330rm -f core conftest.err conftest.$ac_objext \
10331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010332LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10335$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010336if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010337 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010338fi
10339 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10342$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010345if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10348$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010349LIBS="$withval $LIBS"
10350
10351else
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354fi
10355
Guido van Rossum7f43da71994-08-01 12:15:30 +000010356
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010357
10358
10359
10360
10361
10362
Victor Stinnerb477d192020-01-22 22:48:16 +010010363
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010364if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10365 if test -n "$ac_tool_prefix"; then
10366 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10367set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10369$as_echo_n "checking for $ac_word... " >&6; }
10370if ${ac_cv_path_PKG_CONFIG+:} false; then :
10371 $as_echo_n "(cached) " >&6
10372else
10373 case $PKG_CONFIG in
10374 [\\/]* | ?:[\\/]*)
10375 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10376 ;;
10377 *)
10378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10379for as_dir in $PATH
10380do
10381 IFS=$as_save_IFS
10382 test -z "$as_dir" && as_dir=.
10383 for ac_exec_ext in '' $ac_executable_extensions; do
10384 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10385 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10387 break 2
10388 fi
10389done
10390 done
10391IFS=$as_save_IFS
10392
10393 ;;
10394esac
10395fi
10396PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10397if test -n "$PKG_CONFIG"; then
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10399$as_echo "$PKG_CONFIG" >&6; }
10400else
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
10403fi
10404
10405
10406fi
10407if test -z "$ac_cv_path_PKG_CONFIG"; then
10408 ac_pt_PKG_CONFIG=$PKG_CONFIG
10409 # Extract the first word of "pkg-config", so it can be a program name with args.
10410set dummy pkg-config; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10414 $as_echo_n "(cached) " >&6
10415else
10416 case $ac_pt_PKG_CONFIG in
10417 [\\/]* | ?:[\\/]*)
10418 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10419 ;;
10420 *)
10421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424 IFS=$as_save_IFS
10425 test -z "$as_dir" && as_dir=.
10426 for ac_exec_ext in '' $ac_executable_extensions; do
10427 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10429 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430 break 2
10431 fi
10432done
10433 done
10434IFS=$as_save_IFS
10435
10436 ;;
10437esac
10438fi
10439ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10440if test -n "$ac_pt_PKG_CONFIG"; then
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10442$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10443else
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448 if test "x$ac_pt_PKG_CONFIG" = x; then
10449 PKG_CONFIG=""
10450 else
10451 case $cross_compiling:$ac_tool_warned in
10452yes:)
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10454$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10455ac_tool_warned=yes ;;
10456esac
10457 PKG_CONFIG=$ac_pt_PKG_CONFIG
10458 fi
10459else
10460 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10461fi
10462
10463fi
10464if test -n "$PKG_CONFIG"; then
10465 _pkg_min_version=0.9.0
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10467$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10468 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10470$as_echo "yes" >&6; }
10471 else
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473$as_echo "no" >&6; }
10474 PKG_CONFIG=""
10475 fi
10476fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010477
10478# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10480$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010481
10482# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010483if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010484 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010485else
10486 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010487fi
10488
10489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10491$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010492
10493# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10495$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010496
10497# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010498if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010499 withval=$with_system_ffi;
10500fi
10501
10502
Zachary Waref40d4dd2016-09-17 01:25:24 -050010503if test "$ac_sys_system" = "Darwin"
10504then
10505 case "$with_system_ffi" in
10506 "")
10507 with_system_ffi="no"
10508 ;;
10509 yes|no)
10510 ;;
10511 *)
10512 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10513 ;;
10514 esac
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10516$as_echo "$with_system_ffi" >&6; }
10517else
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10519$as_echo "yes" >&6; }
10520 if test "$with_system_ffi" != ""
10521 then
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10523$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10524 fi
10525 with_system_ffi="yes"
10526fi
Zachary Ware935043d2016-09-09 17:01:21 -070010527
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010528if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010529 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10530else
10531 LIBFFI_INCLUDEDIR=""
10532fi
10533
10534
Stefan Krah60187b52012-03-23 19:06:27 +010010535# Check for use of the system libmpdec library
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10537$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10538
10539# Check whether --with-system_libmpdec was given.
10540if test "${with_system_libmpdec+set}" = set; then :
10541 withval=$with_system_libmpdec;
10542else
10543 with_system_libmpdec="no"
10544fi
10545
10546
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10548$as_echo "$with_system_libmpdec" >&6; }
10549
Stefan Krah815280e2020-02-29 19:43:42 +010010550# Check whether _decimal should use a coroutine-local or thread-local context
10551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5
10552$as_echo_n "checking for --with-decimal-contextvar... " >&6; }
10553
10554# Check whether --with-decimal_contextvar was given.
10555if test "${with_decimal_contextvar+set}" = set; then :
10556 withval=$with_decimal_contextvar;
10557else
10558 with_decimal_contextvar="yes"
10559fi
10560
10561
10562if test "$with_decimal_contextvar" != "no"
10563then
10564
10565$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h
10566
10567fi
10568
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5
10570$as_echo "$with_decimal_contextvar" >&6; }
10571
Benjamin Peterson076ed002010-10-31 17:11:02 +000010572# Check for support for loadable sqlite extensions
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10574$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10575# Check whether --enable-loadable-sqlite-extensions was given.
10576if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10577 enableval=$enable_loadable_sqlite_extensions;
10578else
10579 enable_loadable_sqlite_extensions="no"
10580fi
10581
10582
10583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10584$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10585
Ned Deilyd819b932013-09-06 01:07:05 -070010586# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10587
10588
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10590$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10591
10592# Check whether --with-tcltk-includes was given.
10593if test "${with_tcltk_includes+set}" = set; then :
10594 withval=$with_tcltk_includes;
10595else
10596 with_tcltk_includes="default"
10597fi
10598
10599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10600$as_echo "$with_tcltk_includes" >&6; }
10601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10602$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10603
10604# Check whether --with-tcltk-libs was given.
10605if test "${with_tcltk_libs+set}" = set; then :
10606 withval=$with_tcltk_libs;
10607else
10608 with_tcltk_libs="default"
10609fi
10610
10611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10612$as_echo "$with_tcltk_libs" >&6; }
10613if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10614then
10615 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10616 then
10617 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10618 fi
10619 TCLTK_INCLUDES=""
10620 TCLTK_LIBS=""
10621else
10622 TCLTK_INCLUDES="$with_tcltk_includes"
10623 TCLTK_LIBS="$with_tcltk_libs"
10624fi
10625
Matthias Klose55708cc2009-04-30 08:06:49 +000010626# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10628$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010629
10630# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010631if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010632 withval=$with_dbmliborder;
10633if test x$with_dbmliborder = xyes
10634then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010635as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010636else
10637 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10638 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10639 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010640 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010641 fi
10642 done
10643fi
10644fi
10645
Matthias Kloseb9621712010-04-24 17:59:49 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10647$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010648
Martin v. Löwis11437992002-04-12 09:54:03 +000010649# Templates for things AC_DEFINEd more than once.
10650# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010651
10652
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010653if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010654then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010655 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010657
10658 posix_threads=yes
Jesús Cea52d1b862019-09-28 03:44:32 +020010659 if test "$ac_sys_system" = "SunOS"; then
10660 CFLAGS="$CFLAGS -D_REENTRANT"
10661 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010662elif test "$ac_cv_kpthread" = "yes"
10663then
10664 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010665 if test "$ac_cv_cxx_thread" = "yes"; then
10666 CXX="$CXX -Kpthread"
10667 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010668 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010669elif test "$ac_cv_kthread" = "yes"
10670then
10671 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010672 if test "$ac_cv_cxx_thread" = "yes"; then
10673 CXX="$CXX -Kthread"
10674 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010675 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676elif test "$ac_cv_pthread" = "yes"
10677then
10678 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010679 if test "$ac_cv_cxx_thread" = "yes"; then
10680 CXX="$CXX -pthread"
10681 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010683else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010684 if test ! -z "$withval" -a -d "$withval"
10685 then LDFLAGS="$LDFLAGS -L$withval"
10686 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010687
10688 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010689 # define _POSIX_THREADS in unistd.h. Some apparently don't
10690 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10692$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010695
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010696#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010697#ifdef _POSIX_THREADS
10698yes
10699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
10701_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010704 unistd_defines_pthreads=yes
10705else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010706 unistd_defines_pthreads=no
10707fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010708rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10711$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010714
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010715 # Just looking for pthread_create in libpthread is not enough:
10716 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10717 # So we really have to include pthread.h, and then link.
10718 _libs=$LIBS
10719 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10721$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010723/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010724
10725#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010726#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010727
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010728void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010729int
10730main ()
10731{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010732
10733pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ;
10735 return 0;
10736}
10737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10741$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010742 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010743
Guido van Rossum02a1c402000-02-25 19:26:31 +000010744else
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010746 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010748if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010749
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010750 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010751
Guido van Rossumad678af1998-10-02 14:42:15 +000010752else
Guido van Rossumad678af1998-10-02 14:42:15 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10755$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010756if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010758else
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010760LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010764/* Override any GCC internal prototype to avoid an error.
10765 Use char because int might match the return type of a GCC
10766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010767#ifdef __cplusplus
10768extern "C"
10769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010770char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010771int
10772main ()
10773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ;
10776 return 0;
10777}
10778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010786LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10789$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010790if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010791
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010792 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010793 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010794
Greg Steinadf63d62000-07-05 10:38:09 +000010795else
Greg Steinadf63d62000-07-05 10:38:09 +000010796
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10798$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010799if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010801else
Martin v. Löwis11437992002-04-12 09:54:03 +000010802 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010803LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807/* Override any GCC internal prototype to avoid an error.
10808 Use char because int might match the return type of a GCC
10809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010810#ifdef __cplusplus
10811extern "C"
10812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010813char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010814int
10815main ()
10816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ;
10819 return 0;
10820}
10821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010824else
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010827rm -f core conftest.err conftest.$ac_objext \
10828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010829LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10832$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010833if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010834
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010835 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010836 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010837
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010838else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10841$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010842if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010844else
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010846LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850/* Override any GCC internal prototype to avoid an error.
10851 Use char because int might match the return type of a GCC
10852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010853#ifdef __cplusplus
10854extern "C"
10855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010856char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010857int
10858main ()
10859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 ;
10862 return 0;
10863}
10864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010865if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010866 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010867else
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870rm -f core conftest.err conftest.$ac_objext \
10871 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010872LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10875$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010876if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010877
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010878 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010879 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010880
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010881else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10884$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010885if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010887else
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010889LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010893/* Override any GCC internal prototype to avoid an error.
10894 Use char because int might match the return type of a GCC
10895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010896#ifdef __cplusplus
10897extern "C"
10898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010899char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010900int
10901main ()
10902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010903return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 ;
10905 return 0;
10906}
10907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010913rm -f core conftest.err conftest.$ac_objext \
10914 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010915LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10918$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010919if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010920
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010921 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010922 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010923
Guido van Rossumb93a8621998-05-07 13:27:32 +000010924else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010925
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010926 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10927
Guido van Rossum2d38f911996-06-26 19:47:01 +000010928fi
10929
Guido van Rossum627b2d71993-12-24 10:39:16 +000010930
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010931fi
10932
Guido van Rossum0be3e491997-05-22 20:33:33 +000010933fi
10934
Guido van Rossum49545951997-12-02 19:28:29 +000010935fi
10936
Guido van Rossumb93a8621998-05-07 13:27:32 +000010937fi
10938
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010940rm -f core conftest.err conftest.$ac_objext \
10941 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10944$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010945if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010947else
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010949LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953/* Override any GCC internal prototype to avoid an error.
10954 Use char because int might match the return type of a GCC
10955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010956#ifdef __cplusplus
10957extern "C"
10958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010959char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 ;
10965 return 0;
10966}
10967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970else
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010973rm -f core conftest.err conftest.$ac_objext \
10974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10978$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010979if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010980
Martin v. Löwis130fb172001-07-19 11:00:41 +000010981 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010982
Guido van Rossum627b2d71993-12-24 10:39:16 +000010983fi
10984
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010985
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010986fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010987
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988if test "$posix_threads" = "yes"; then
10989 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010992
10993 fi
10994
10995 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10996 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010997 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010998$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010999
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011000 ;;
11001 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011003
11004 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020011005 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000011007
11008 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011009 esac
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11012$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011013 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011015else
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011017 ac_cv_pthread_system_supported=no
11018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010011021
11022 #include <stdio.h>
11023 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011024 void *foo(void *parm) {
11025 return NULL;
11026 }
11027 main() {
11028 pthread_attr_t attr;
11029 pthread_t id;
11030 if (pthread_attr_init(&attr)) exit(-1);
11031 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11032 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11033 exit(0);
11034 }
11035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011036if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011037 ac_cv_pthread_system_supported=yes
11038else
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011043fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045
Guido van Rossum627b2d71993-12-24 10:39:16 +000011046fi
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
11049$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011050 if test "$ac_cv_pthread_system_supported" = "yes"; then
11051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011053
11054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 for ac_func in pthread_sigmask
11056do :
11057 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020011058if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011060#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011061_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011062 case $ac_sys_system in
11063 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000011066
11067 ;;
11068 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011069fi
11070done
11071
pdoxe14679c2017-10-05 00:01:56 -070011072 for ac_func in pthread_getcpuclockid
11073do :
11074 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
11075if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
11076 cat >>confdefs.h <<_ACEOF
11077#define HAVE_PTHREAD_GETCPUCLOCKID 1
11078_ACEOF
11079
11080fi
11081done
11082
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011083fi
11084
11085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
11089$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011091if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000011094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096 ipv6=no
11097 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11099$as_echo "yes" >&6; }
11100 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101
11102 ipv6=yes
11103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105else
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011108/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 /* AF_INET6 available check */
11110#include <sys/types.h>
11111#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011112int
11113main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011115int domain = AF_INET6;
11116 ;
11117 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118}
Martin v. Löwis11437992002-04-12 09:54:03 +000011119_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011120if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011121
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11123$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000011125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126else
Matthias Kloseb159a552010-04-25 21:00:44 +000011127
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11129$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000011131
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010011133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011135if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
11137$as_echo_n "checking if RFC2553 API is available... " >&6; }
11138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011139/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011140
11141 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011142#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011143int
11144main ()
11145{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011146struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011147 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 ;
11149 return 0;
11150}
Matthias Kloseb159a552010-04-25 21:00:44 +000011151
Martin v. Löwis11437992002-04-12 09:54:03 +000011152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011153if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011154
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011156$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011157 ipv6=yes
11158
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011159else
Matthias Kloseb159a552010-04-25 21:00:44 +000011160
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011162$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011163 ipv6=no
11164
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011167fi
11168
11169if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011171
11172fi
11173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011174fi
11175
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176
11177ipv6type=unknown
11178ipv6lib=none
11179ipv6trylibc=no
11180
11181if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11183$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011184 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11185 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011186 case $i in
11187 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011189/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011191#include <netinet/in.h>
11192#ifdef IPV6_INRIA_VERSION
11193yes
11194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011195_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011198 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011200rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011201
11202 ;;
11203 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011207#include <netinet/in.h>
11208#ifdef __KAME__
11209yes
11210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011211_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011214 ipv6type=$i;
11215 ipv6lib=inet6
11216 ipv6libdir=/usr/local/v6/lib
11217 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011218fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011219rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011220
11221 ;;
11222 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011224/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011225
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011226#include <features.h>
11227#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11228yes
11229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011230_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011233 ipv6type=$i;
11234 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011235fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011236rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011237
11238 ;;
11239 linux-inet6)
11240 if test -d /usr/inet6; then
11241 ipv6type=$i
11242 ipv6lib=inet6
11243 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011244 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011245 fi
11246 ;;
11247 solaris)
11248 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011249 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011250 ipv6type=$i
11251 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011252 fi
11253 fi
11254 ;;
11255 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011257/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011258
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011259#include <sys/param.h>
11260#ifdef _TOSHIBA_INET6
11261yes
11262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011263_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011266 ipv6type=$i;
11267 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011268 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011269fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011270rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011271
11272 ;;
11273 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011276
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011277#include </usr/local/v6/include/sys/v6config.h>
11278#ifdef __V6D__
11279yes
11280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011281_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011283 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011284 ipv6type=$i;
11285 ipv6lib=v6;
11286 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011287 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011289rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011290
11291 ;;
11292 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011295
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011296#include <sys/param.h>
11297#ifdef _ZETA_MINAMI_INET6
11298yes
11299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011300_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011302 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011303 ipv6type=$i;
11304 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011305 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011306fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011307rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011308
11309 ;;
11310 esac
11311 if test "$ipv6type" != "unknown"; then
11312 break
11313 fi
11314 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11316$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317fi
11318
11319if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11320 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11321 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11322 echo "using lib$ipv6lib"
11323 else
11324 if test $ipv6trylibc = "yes"; then
11325 echo "using libc"
11326 else
11327 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11328 echo "You need to fetch lib$ipv6lib.a from appropriate"
11329 echo 'ipv6 kit and compile beforehand.'
11330 exit 1
11331 fi
11332 fi
11333fi
11334
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11336$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11338/* end confdefs.h. */
11339 /* CAN_RAW_FD_FRAMES available check */
11340#include <linux/can/raw.h>
11341int
11342main ()
11343{
11344int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11345 ;
11346 return 0;
11347}
11348_ACEOF
11349if ac_fn_c_try_compile "$LINENO"; then :
11350
11351
11352$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11353
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11355$as_echo "yes" >&6; }
11356
11357else
11358
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
11361
11362fi
11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364
Zackery Spytz97e0de02020-04-09 06:03:49 -060011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5
11366$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368/* end confdefs.h. */
11369
11370#include <linux/can/raw.h>
11371int
11372main ()
11373{
11374int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;
11375 ;
11376 return 0;
11377}
11378_ACEOF
11379if ac_fn_c_try_compile "$LINENO"; then :
11380
11381
11382$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h
11383
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11385$as_echo "yes" >&6; }
11386
11387else
11388
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
11391
11392fi
11393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11394
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011395# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11397$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011400if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401 withval=$with_doc_strings;
11402fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011403
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011404
11405if test -z "$with_doc_strings"
11406then with_doc_strings="yes"
11407fi
11408if test "$with_doc_strings" != "no"
11409then
11410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011412
11413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11415$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011416
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011417# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11419$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011423 withval=$with_pymalloc;
11424fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011425
Neil Schemenauera35c6882001-02-27 04:45:05 +000011426
Neil Schemenauer16c22972002-03-22 15:34:49 +000011427if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011428then
11429 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011430fi
11431if test "$with_pymalloc" != "no"
11432then
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Matthias Kloseb9621712010-04-24 17:59:49 +000011434$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011435
11436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11438$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011439
Nick Coghlan6ea41862017-06-11 13:16:15 +100011440# Check for --with-c-locale-coercion
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11442$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11443
11444# Check whether --with-c-locale-coercion was given.
11445if test "${with_c_locale_coercion+set}" = set; then :
11446 withval=$with_c_locale_coercion;
11447fi
11448
11449
11450if test -z "$with_c_locale_coercion"
11451then
11452 with_c_locale_coercion="yes"
11453fi
11454if test "$with_c_locale_coercion" != "no"
11455then
11456
11457$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11458
11459fi
11460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11461$as_echo "$with_c_locale_coercion" >&6; }
11462
Benjamin Peterson05159c42009-12-03 03:01:27 +000011463# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11465$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011466
11467# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011469 withval=$with_valgrind;
11470else
11471 with_valgrind=no
11472fi
11473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11475$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011476if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 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 +020011478if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011479
Matthias Kloseb9621712010-04-24 17:59:49 +000011480$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011481
11482else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011483 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011484
11485fi
11486
11487
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011488 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011489fi
11490
Łukasz Langaa785c872016-09-09 17:37:37 -070011491# Check for DTrace support
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11493$as_echo_n "checking for --with-dtrace... " >&6; }
11494
11495# Check whether --with-dtrace was given.
11496if test "${with_dtrace+set}" = set; then :
11497 withval=$with_dtrace;
11498else
11499 with_dtrace=no
11500fi
11501
11502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11503$as_echo "$with_dtrace" >&6; }
11504
11505
11506
11507
11508
11509DTRACE=
Łukasz Langaa785c872016-09-09 17:37:37 -070011510DTRACE_HEADERS=
11511DTRACE_OBJS=
11512
11513if test "$with_dtrace" = "yes"
11514then
11515 # Extract the first word of "dtrace", so it can be a program name with args.
11516set dummy dtrace; ac_word=$2
11517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11518$as_echo_n "checking for $ac_word... " >&6; }
11519if ${ac_cv_path_DTRACE+:} false; then :
11520 $as_echo_n "(cached) " >&6
11521else
11522 case $DTRACE in
11523 [\\/]* | ?:[\\/]*)
11524 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11525 ;;
11526 *)
11527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11528for as_dir in $PATH
11529do
11530 IFS=$as_save_IFS
11531 test -z "$as_dir" && as_dir=.
11532 for ac_exec_ext in '' $ac_executable_extensions; do
11533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11534 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11536 break 2
11537 fi
11538done
11539 done
11540IFS=$as_save_IFS
11541
11542 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11543 ;;
11544esac
11545fi
11546DTRACE=$ac_cv_path_DTRACE
11547if test -n "$DTRACE"; then
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11549$as_echo "$DTRACE" >&6; }
11550else
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553fi
11554
11555
11556 if test "$DTRACE" = "not found"; then
11557 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11558 fi
11559
11560$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11561
11562 DTRACE_HEADERS="Include/pydtrace_probes.h"
11563
11564 # On OS X, DTrace providers do not need to be explicitly compiled and
11565 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11566 # generation flag '-G'. We check for presence of this flag, rather than
11567 # hardcoding support by OS, in the interest of robustness.
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11569$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11570if ${ac_cv_dtrace_link+:} false; then :
11571 $as_echo_n "(cached) " >&6
11572else
11573 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011574 echo 'BEGIN{}' > conftest.d
Petr Viktorin3c97e1e2020-03-11 14:27:42 +010011575 "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
Łukasz Langaa785c872016-09-09 17:37:37 -070011576 ac_cv_dtrace_link=yes
11577
11578fi
11579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11580$as_echo "$ac_cv_dtrace_link" >&6; }
11581 if test "$ac_cv_dtrace_link" = "yes"; then
11582 DTRACE_OBJS="Python/pydtrace.o"
11583 fi
11584fi
11585
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011586# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011587
Guido van Rossum98935bf2001-09-05 19:13:16 +000011588DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011589
Guido van Rossume97ee181999-12-20 21:27:22 +000011590# the dlopen() function means we might want to use dynload_shlib.o. some
11591# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011592for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011593do :
11594 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011598_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011599
Guido van Rossume97ee181999-12-20 21:27:22 +000011600fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011601done
Guido van Rossume97ee181999-12-20 21:27:22 +000011602
Michael W. Hudson54241132001-12-07 15:38:26 +000011603
Guido van Rossume97ee181999-12-20 21:27:22 +000011604# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11605# loading of modules.
11606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11608$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011609if test -z "$DYNLOADFILE"
11610then
11611 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011612 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11613 if test "$ac_cv_func_dlopen" = yes
11614 then DYNLOADFILE="dynload_shlib.o"
11615 else DYNLOADFILE="dynload_aix.o"
11616 fi
11617 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011618 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011619 *)
11620 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11621 # out any dynamic loading
11622 if test "$ac_cv_func_dlopen" = yes
11623 then DYNLOADFILE="dynload_shlib.o"
11624 else DYNLOADFILE="dynload_stub.o"
11625 fi
11626 ;;
11627 esac
11628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11630$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011631if test "$DYNLOADFILE" != "dynload_stub.o"
11632then
Martin v. Löwis11437992002-04-12 09:54:03 +000011633
Matthias Kloseb9621712010-04-24 17:59:49 +000011634$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011635
11636fi
11637
Neil Schemenauer4e425612001-06-19 15:44:15 +000011638# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11639
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11642$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011643if test -z "$MACHDEP_OBJS"
11644then
Jack Jansene578a632001-08-15 01:27:14 +000011645 MACHDEP_OBJS=$extra_machdep_objs
11646else
11647 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011648fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011649if test -z "$MACHDEP_OBJS"; then
11650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11651$as_echo "none" >&6; }
11652else
11653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11654$as_echo "$MACHDEP_OBJS" >&6; }
11655fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011656
Guido van Rossum627b2d71993-12-24 10:39:16 +000011657# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011658for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011659 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11660 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011661 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011662 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011663 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011664 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011665 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011666 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011667 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011668 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011669 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011670 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011671 pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011672 readlink readlinkat readv realpath renameat \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011673 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011674 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011675 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011676 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11677 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011678 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011679 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011680 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Victor Stinnerb8d12622020-01-24 14:05:48 +010011681 truncate uname unlinkat utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011682 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011683do :
11684 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11685ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011686if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011688#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011689_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011690
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011691fi
11692done
11693
Michael W. Hudson54241132001-12-07 15:38:26 +000011694
Benjamin Peterson40caa052018-09-12 15:52:40 -070011695# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11696# links. Some libc implementations have a stub lchmod implementation that always
11697# returns an error.
11698if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011699 for ac_func in lchmod
11700do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011701 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11702if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011703 cat >>confdefs.h <<_ACEOF
11704#define HAVE_LCHMOD 1
11705_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011706
11707fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011708done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011709
11710fi
11711
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011712ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11713 #include <dirent.h>
11714"
11715if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11716
11717$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11718
11719fi
11720
11721
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011722# For some functions, having a definition is not sufficient, since
11723# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11725$as_echo_n "checking for chroot... " >&6; }
11726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011727/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011728#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011729int
11730main ()
11731{
11732void *x=chroot
11733 ;
11734 return 0;
11735}
11736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011740
Matthias Kloseb159a552010-04-25 21:00:44 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011746
11747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11750$as_echo_n "checking for link... " >&6; }
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011752/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011753#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011754int
11755main ()
11756{
11757void *x=link
11758 ;
11759 return 0;
11760}
11761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011762if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011765
Matthias Kloseb159a552010-04-25 21:00:44 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011771
11772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11775$as_echo_n "checking for symlink... " >&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=symlink
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_SYMLINK 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 fchdir" >&5
11800$as_echo_n "checking for fchdir... " >&6; }
11801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011803#include <unistd.h>
11804int
11805main ()
11806{
11807void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +000011813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fsync" >&5
11825$as_echo_n "checking for fsync... " >&6; }
11826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011827/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011828#include <unistd.h>
11829int
11830main ()
11831{
11832void *x=fsync
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öwisa64988c2003-09-20 15:30:20 +000011838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fdatasync" >&5
11850$as_echo_n "checking for fdatasync... " >&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=fdatasync
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_FDATASYNC 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 epoll" >&5
11875$as_echo_n "checking for epoll... " >&6; }
11876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011877/* end confdefs.h. */
11878#include <sys/epoll.h>
11879int
11880main ()
11881{
11882void *x=epoll_create
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öwisc8ad7cc2002-11-11 13:23:45 +000011888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011896
11897fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11900$as_echo_n "checking for epoll_create1... " >&6; }
11901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h. */
11903#include <sys/epoll.h>
11904int
11905main ()
11906{
11907void *x=epoll_create1
11908 ;
11909 return 0;
11910}
11911_ACEOF
11912if ac_fn_c_try_compile "$LINENO"; then :
11913
11914$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11915
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11917$as_echo "yes" >&6; }
11918else
11919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
11921
11922fi
11923rm -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 kqueue" >&5
11925$as_echo_n "checking for kqueue... " >&6; }
11926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011927/* end confdefs.h. */
11928
11929#include <sys/types.h>
11930#include <sys/event.h>
11931
11932int
11933main ()
11934{
11935int x=kqueue()
11936 ;
11937 return 0;
11938}
11939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011943
Matthias Kloseb159a552010-04-25 21:00:44 +000011944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011945$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011949
11950fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11953$as_echo_n "checking for prlimit... " >&6; }
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h. */
11956
11957#include <sys/time.h>
11958#include <sys/resource.h>
11959
11960int
11961main ()
11962{
11963void *x=prlimit
11964 ;
11965 return 0;
11966}
11967_ACEOF
11968if ac_fn_c_try_compile "$LINENO"; then :
11969
11970$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11971
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11973$as_echo "yes" >&6; }
11974else
11975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11976$as_echo "no" >&6; }
11977
11978fi
11979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11980
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11982$as_echo_n "checking for memfd_create... " >&6; }
11983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11984/* end confdefs.h. */
11985
11986#ifdef HAVE_SYS_MMAN_H
11987#include <sys/mman.h>
11988#endif
11989#ifdef HAVE_SYS_MEMFD_H
11990#include <sys/memfd.h>
11991#endif
11992
11993int
11994main ()
11995{
11996void *x=memfd_create
11997 ;
11998 return 0;
11999}
12000_ACEOF
12001if ac_fn_c_try_compile "$LINENO"; then :
12002
12003$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
12004
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12006$as_echo "yes" >&6; }
12007else
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010
12011fi
12012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12013
Martin v. Löwisd5843682002-11-21 20:41:28 +000012014# On some systems (eg. FreeBSD 5), we would find a definition of the
12015# functions ctermid_r, setgroups in the library, but no prototype
12016# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12017# address to avoid compiler warnings and potential miscompilations
12018# because of the missing prototypes.
12019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
12021$as_echo_n "checking for ctermid_r... " >&6; }
12022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012024
Martin v. Löwisd5843682002-11-21 20:41:28 +000012025#include <stdio.h>
12026
Martin v. Löwisd5843682002-11-21 20:41:28 +000012027int
12028main ()
12029{
12030void* p = ctermid_r
12031 ;
12032 return 0;
12033}
12034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036
Matthias Kloseb9621712010-04-24 17:59:49 +000012037$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012038
Matthias Kloseb159a552010-04-25 21:00:44 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012044
12045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12047
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
12049$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012050if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012051 $as_echo_n "(cached) " >&6
12052else
12053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012054/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012055#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012056int
12057main ()
12058{
12059void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012060
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012061 ;
12062 return 0;
12063}
12064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012066 ac_cv_flock_decl=yes
12067else
12068 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012069
12070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000012072
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012073fi
12074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
12075$as_echo "$ac_cv_flock_decl" >&6; }
12076if test "x${ac_cv_flock_decl}" = xyes; then
12077 for ac_func in flock
12078do :
12079 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020012080if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012081 cat >>confdefs.h <<_ACEOF
12082#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000012083_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012084
Antoine Pitroua3000072010-09-07 14:52:42 +000012085else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000012087$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012088if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000012089 $as_echo_n "(cached) " >&6
12090else
12091 ac_check_lib_save_LIBS=$LIBS
12092LIBS="-lbsd $LIBS"
12093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12094/* end confdefs.h. */
12095
12096/* Override any GCC internal prototype to avoid an error.
12097 Use char because int might match the return type of a GCC
12098 builtin and then its argument prototype would still apply. */
12099#ifdef __cplusplus
12100extern "C"
12101#endif
12102char flock ();
12103int
12104main ()
12105{
12106return flock ();
12107 ;
12108 return 0;
12109}
12110_ACEOF
12111if ac_fn_c_try_link "$LINENO"; then :
12112 ac_cv_lib_bsd_flock=yes
12113else
12114 ac_cv_lib_bsd_flock=no
12115fi
12116rm -f core conftest.err conftest.$ac_objext \
12117 conftest$ac_exeext conftest.$ac_ext
12118LIBS=$ac_check_lib_save_LIBS
12119fi
12120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
12121$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012122if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012123 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000012124
12125
12126$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
12127
12128
12129fi
12130
12131
12132fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000012133done
12134
Antoine Pitroua3000072010-09-07 14:52:42 +000012135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
12138$as_echo_n "checking for getpagesize... " >&6; }
12139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012141
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012142#include <unistd.h>
12143
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012144int
12145main ()
12146{
12147void* p = getpagesize
12148 ;
12149 return 0;
12150}
12151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012153
Matthias Kloseb9621712010-04-24 17:59:49 +000012154$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012155
Matthias Kloseb159a552010-04-25 21:00:44 +000012156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012157$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012158else
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12160$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012161
12162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012164
Victor Stinner984890f2011-11-24 13:53:38 +010012165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
12166$as_echo_n "checking for broken unsetenv... " >&6; }
12167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168/* end confdefs.h. */
12169
12170#include <stdlib.h>
12171
12172int
12173main ()
12174{
12175int res = unsetenv("DUMMY")
12176 ;
12177 return 0;
12178}
12179_ACEOF
12180if ac_fn_c_try_compile "$LINENO"; then :
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
12183else
12184
12185$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12186
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12188$as_echo "yes" >&6; }
12189
12190fi
12191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12192
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012193for ac_prog in true
12194do
12195 # Extract the first word of "$ac_prog", so it can be a program name with args.
12196set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12198$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012199if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012200 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012201else
12202 if test -n "$TRUE"; then
12203 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12204else
12205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12206for as_dir in $PATH
12207do
12208 IFS=$as_save_IFS
12209 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012211 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012212 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 $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 +000012214 break 2
12215 fi
12216done
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012219
12220fi
12221fi
12222TRUE=$ac_cv_prog_TRUE
12223if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12225$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12228$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012229fi
12230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012232 test -n "$TRUE" && break
12233done
12234test -n "$TRUE" || TRUE="/bin/true"
12235
12236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12238$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012241else
12242 ac_check_lib_save_LIBS=$LIBS
12243LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012245/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247/* Override any GCC internal prototype to avoid an error.
12248 Use char because int might match the return type of a GCC
12249 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012250#ifdef __cplusplus
12251extern "C"
12252#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012253char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012254int
12255main ()
12256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012258 ;
12259 return 0;
12260}
12261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012263 ac_cv_lib_c_inet_aton=yes
12264else
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012267rm -f core conftest.err conftest.$ac_objext \
12268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012269LIBS=$ac_check_lib_save_LIBS
12270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12272$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012273if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012274 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12277$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012280else
12281 ac_check_lib_save_LIBS=$LIBS
12282LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286/* Override any GCC internal prototype to avoid an error.
12287 Use char because int might match the return type of a GCC
12288 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012289#ifdef __cplusplus
12290extern "C"
12291#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012292char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012293int
12294main ()
12295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012297 ;
12298 return 0;
12299}
12300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012302 ac_cv_lib_resolv_inet_aton=yes
12303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012308LIBS=$ac_check_lib_save_LIBS
12309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12311$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012313 cat >>confdefs.h <<_ACEOF
12314#define HAVE_LIBRESOLV 1
12315_ACEOF
12316
12317 LIBS="-lresolv $LIBS"
12318
12319fi
12320
12321
12322fi
12323
12324
Christian Heimesd0764e22007-12-04 15:00:33 +000012325# On Tru64, chflags seems to be present, but calling it will
12326# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12328$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012329if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012333 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012334else
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012336/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012337
Christian Heimesd0764e22007-12-04 15:00:33 +000012338#include <sys/stat.h>
12339#include <unistd.h>
12340int main(int argc, char*argv[])
12341{
12342 if(chflags(argv[0], 0) != 0)
12343 return 1;
12344 return 0;
12345}
Ned Deily3eb67d52011-06-28 00:00:28 -070012346
Christian Heimesd0764e22007-12-04 15:00:33 +000012347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012348if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012349 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012350else
Matthias Kloseb9621712010-04-24 17:59:49 +000012351 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12354 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012355fi
12356
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012357
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12360$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012361if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012363if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012364 ac_cv_have_chflags="yes"
12365else
12366 ac_cv_have_chflags="no"
12367fi
12368
12369fi
12370if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012373
12374fi
12375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12377$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012378if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012382 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012383else
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012385/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012386
Christian Heimesd0764e22007-12-04 15:00:33 +000012387#include <sys/stat.h>
12388#include <unistd.h>
12389int main(int argc, char*argv[])
12390{
12391 if(lchflags(argv[0], 0) != 0)
12392 return 1;
12393 return 0;
12394}
Ned Deily3eb67d52011-06-28 00:00:28 -070012395
Christian Heimesd0764e22007-12-04 15:00:33 +000012396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012397if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012398 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12403 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012404fi
12405
12406
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12409$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012410if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012412if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012413 ac_cv_have_lchflags="yes"
12414else
12415 ac_cv_have_lchflags="no"
12416fi
12417
12418fi
12419if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012422
12423fi
12424
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012425case $ac_sys_system/$ac_sys_release in
12426Darwin/*)
12427 _CUR_CFLAGS="${CFLAGS}"
12428 _CUR_LDFLAGS="${LDFLAGS}"
12429 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12430 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12431 ;;
12432esac
12433
Matthias Kloseb9621712010-04-24 17:59:49 +000012434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12435$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012436if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012438else
12439 ac_check_lib_save_LIBS=$LIBS
12440LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012442/* end confdefs.h. */
12443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444/* Override any GCC internal prototype to avoid an error.
12445 Use char because int might match the return type of a GCC
12446 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012447#ifdef __cplusplus
12448extern "C"
12449#endif
12450char inflateCopy ();
12451int
12452main ()
12453{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012455 ;
12456 return 0;
12457}
12458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012460 ac_cv_lib_z_inflateCopy=yes
12461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012466LIBS=$ac_check_lib_save_LIBS
12467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12469$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012473
12474fi
12475
12476
12477case $ac_sys_system/$ac_sys_release in
12478Darwin/*)
12479 CFLAGS="${_CUR_CFLAGS}"
12480 LDFLAGS="${_CUR_LDFLAGS}"
12481 ;;
12482esac
12483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12485$as_echo_n "checking for hstrerror... " >&6; }
12486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012487/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012488
Martin v. Löwise9416172003-05-03 10:12:45 +000012489#include <netdb.h>
12490
Martin v. Löwise9416172003-05-03 10:12:45 +000012491int
12492main ()
12493{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012494void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012500
Matthias Kloseb9621712010-04-24 17:59:49 +000012501$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012502
Matthias Kloseb159a552010-04-25 21:00:44 +000012503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012504$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012508
12509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510rm -f core conftest.err conftest.$ac_objext \
12511 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12514$as_echo_n "checking for inet_aton... " >&6; }
12515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012516/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012517
Martin v. Löwis86d66262006-02-17 08:40:11 +000012518#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012519#include <sys/socket.h>
12520#include <netinet/in.h>
12521#include <arpa/inet.h>
12522
Martin v. Löwise9416172003-05-03 10:12:45 +000012523int
12524main ()
12525{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012526void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012534
Matthias Kloseb159a552010-04-25 21:00:44 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012536$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012540
12541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542rm -f core conftest.err conftest.$ac_objext \
12543 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12546$as_echo_n "checking for inet_pton... " >&6; }
12547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012549
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012550#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012551#include <sys/socket.h>
12552#include <netinet/in.h>
12553#include <arpa/inet.h>
12554
Martin v. Löwise9416172003-05-03 10:12:45 +000012555int
12556main ()
12557{
12558void* p = inet_pton
12559 ;
12560 return 0;
12561}
12562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012566
Matthias Kloseb159a552010-04-25 21:00:44 +000012567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012568$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012569else
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12571$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012572
12573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012575
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012576# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12578$as_echo_n "checking for setgroups... " >&6; }
12579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012580/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012581
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012582#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012583#ifdef HAVE_GRP_H
12584#include <grp.h>
12585#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012586
Martin v. Löwisd5843682002-11-21 20:41:28 +000012587int
12588main ()
12589{
12590void* p = setgroups
12591 ;
12592 return 0;
12593}
12594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012598
Matthias Kloseb159a552010-04-25 21:00:44 +000012599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012600$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012601else
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012604
12605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012608# check for openpty and forkpty
12609
12610for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012611do :
12612 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012613if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012615#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012616_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012617
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012618else
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12620$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012621if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012623else
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012625LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629/* Override any GCC internal prototype to avoid an error.
12630 Use char because int might match the return type of a GCC
12631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012632#ifdef __cplusplus
12633extern "C"
12634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012635char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012636int
12637main ()
12638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 ;
12641 return 0;
12642}
12643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012646else
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012649rm -f core conftest.err conftest.$ac_objext \
12650 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012651LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12654$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012655if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012657 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012658else
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12660$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012661if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012663else
12664 ac_check_lib_save_LIBS=$LIBS
12665LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012667/* end confdefs.h. */
12668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669/* Override any GCC internal prototype to avoid an error.
12670 Use char because int might match the return type of a GCC
12671 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012672#ifdef __cplusplus
12673extern "C"
12674#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012675char openpty ();
12676int
12677main ()
12678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012680 ;
12681 return 0;
12682}
12683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012685 ac_cv_lib_bsd_openpty=yes
12686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012689rm -f core conftest.err conftest.$ac_objext \
12690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012691LIBS=$ac_check_lib_save_LIBS
12692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12694$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012695if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012697 LIBS="$LIBS -lbsd"
12698fi
12699
12700
12701fi
12702
Fred Drake8cef4cf2000-06-28 16:40:38 +000012703
12704fi
12705done
12706
12707for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012708do :
12709 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012710if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012712#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012713_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012714
Fred Drake8cef4cf2000-06-28 16:40:38 +000012715else
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12717$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012718if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012720else
Martin v. Löwis11437992002-04-12 09:54:03 +000012721 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012722LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726/* Override any GCC internal prototype to avoid an error.
12727 Use char because int might match the return type of a GCC
12728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012729#ifdef __cplusplus
12730extern "C"
12731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012732char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012733int
12734main ()
12735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012736return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ;
12738 return 0;
12739}
12740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012743else
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012746rm -f core conftest.err conftest.$ac_objext \
12747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012748LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12751$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012752if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012754 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12757$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012758if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012760else
12761 ac_check_lib_save_LIBS=$LIBS
12762LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012764/* end confdefs.h. */
12765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766/* Override any GCC internal prototype to avoid an error.
12767 Use char because int might match the return type of a GCC
12768 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012769#ifdef __cplusplus
12770extern "C"
12771#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012772char forkpty ();
12773int
12774main ()
12775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012777 ;
12778 return 0;
12779}
12780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012782 ac_cv_lib_bsd_forkpty=yes
12783else
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012786rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012788LIBS=$ac_check_lib_save_LIBS
12789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12791$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012792if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012794 LIBS="$LIBS -lbsd"
12795fi
12796
12797
12798fi
12799
Fred Drake8cef4cf2000-06-28 16:40:38 +000012800
12801fi
12802done
12803
Jack Jansendd19cf82001-12-06 22:36:17 +000012804
Michael W. Hudson54241132001-12-07 15:38:26 +000012805# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012806for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012807do :
12808 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12809ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012810if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012812#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012813_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012815fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012816done
12817
Michael W. Hudson54241132001-12-07 15:38:26 +000012818
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012819ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012820if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012821 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012822
Martin v. Löwis1142de32002-03-29 16:28:31 +000012823else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012825 *" dup2.$ac_objext "* ) ;;
12826 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012828esac
12829
Martin v. Löwis1142de32002-03-29 16:28:31 +000012830fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012831
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012832ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012833if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012834 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12835
12836else
12837 case " $LIBOBJS " in
12838 *" strdup.$ac_objext "* ) ;;
12839 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12840 ;;
12841esac
12842
12843fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012844
12845
12846for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012847do :
12848 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012849if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012851#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012854/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012856int
12857main ()
12858{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 ;
12861 return 0;
12862}
12863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012864if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012867
Guido van Rossum627b2d71993-12-24 10:39:16 +000012868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012870
Guido van Rossum627b2d71993-12-24 10:39:16 +000012871fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012872done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012873
Jack Jansen150753c2003-03-29 22:07:47 +000012874for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012875do :
12876 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012877if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012878 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012879#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012882/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012883#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012884int
12885main ()
12886{
12887setpgrp(0,0);
12888 ;
12889 return 0;
12890}
12891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012892if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012895
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012898
12899fi
12900done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012901
Michael W. Hudson54241132001-12-07 15:38:26 +000012902
Gregory P. Smith387512c2018-12-30 15:42:32 -080012903# We search for both crypt and crypt_r as one or the other may be defined
12904# This gets us our -lcrypt in LIBS when required on the target platform.
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12906$as_echo_n "checking for library containing crypt... " >&6; }
12907if ${ac_cv_search_crypt+:} false; then :
12908 $as_echo_n "(cached) " >&6
12909else
12910 ac_func_search_save_LIBS=$LIBS
12911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12912/* end confdefs.h. */
12913
12914/* Override any GCC internal prototype to avoid an error.
12915 Use char because int might match the return type of a GCC
12916 builtin and then its argument prototype would still apply. */
12917#ifdef __cplusplus
12918extern "C"
12919#endif
12920char crypt ();
12921int
12922main ()
12923{
12924return crypt ();
12925 ;
12926 return 0;
12927}
12928_ACEOF
12929for ac_lib in '' crypt; do
12930 if test -z "$ac_lib"; then
12931 ac_res="none required"
12932 else
12933 ac_res=-l$ac_lib
12934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12935 fi
12936 if ac_fn_c_try_link "$LINENO"; then :
12937 ac_cv_search_crypt=$ac_res
12938fi
12939rm -f core conftest.err conftest.$ac_objext \
12940 conftest$ac_exeext
12941 if ${ac_cv_search_crypt+:} false; then :
12942 break
12943fi
12944done
12945if ${ac_cv_search_crypt+:} false; then :
12946
12947else
12948 ac_cv_search_crypt=no
12949fi
12950rm conftest.$ac_ext
12951LIBS=$ac_func_search_save_LIBS
12952fi
12953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12954$as_echo "$ac_cv_search_crypt" >&6; }
12955ac_res=$ac_cv_search_crypt
12956if test "$ac_res" != no; then :
12957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12958
12959fi
12960
12961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12962$as_echo_n "checking for library containing crypt_r... " >&6; }
12963if ${ac_cv_search_crypt_r+:} false; then :
12964 $as_echo_n "(cached) " >&6
12965else
12966 ac_func_search_save_LIBS=$LIBS
12967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12968/* end confdefs.h. */
12969
12970/* Override any GCC internal prototype to avoid an error.
12971 Use char because int might match the return type of a GCC
12972 builtin and then its argument prototype would still apply. */
12973#ifdef __cplusplus
12974extern "C"
12975#endif
12976char crypt_r ();
12977int
12978main ()
12979{
12980return crypt_r ();
12981 ;
12982 return 0;
12983}
12984_ACEOF
12985for ac_lib in '' crypt; do
12986 if test -z "$ac_lib"; then
12987 ac_res="none required"
12988 else
12989 ac_res=-l$ac_lib
12990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12991 fi
12992 if ac_fn_c_try_link "$LINENO"; then :
12993 ac_cv_search_crypt_r=$ac_res
12994fi
12995rm -f core conftest.err conftest.$ac_objext \
12996 conftest$ac_exeext
12997 if ${ac_cv_search_crypt_r+:} false; then :
12998 break
12999fi
13000done
13001if ${ac_cv_search_crypt_r+:} false; then :
13002
13003else
13004 ac_cv_search_crypt_r=no
13005fi
13006rm conftest.$ac_ext
13007LIBS=$ac_func_search_save_LIBS
13008fi
13009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
13010$as_echo "$ac_cv_search_crypt_r" >&6; }
13011ac_res=$ac_cv_search_crypt_r
13012if test "$ac_res" != no; then :
13013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13014
13015fi
13016
13017
13018ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
13019if test "x$ac_cv_func_crypt_r" = xyes; then :
13020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13021/* end confdefs.h. */
13022
13023#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
13024#include <crypt.h>
13025
13026int
13027main ()
13028{
13029
13030struct crypt_data d;
13031char *r = crypt_r("", "", &d);
13032
13033 ;
13034 return 0;
13035}
13036_ACEOF
13037if ac_fn_c_try_compile "$LINENO"; then :
13038
13039$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
13040
13041fi
13042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13043
13044fi
13045
13046
Victor Stinnere0be4232011-10-25 13:06:09 +020013047for ac_func in clock_gettime
13048do :
13049 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13050if test "x$ac_cv_func_clock_gettime" = xyes; then :
13051 cat >>confdefs.h <<_ACEOF
13052#define HAVE_CLOCK_GETTIME 1
13053_ACEOF
13054
13055else
13056
13057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
13058$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
13059if ${ac_cv_lib_rt_clock_gettime+:} false; then :
13060 $as_echo_n "(cached) " >&6
13061else
13062 ac_check_lib_save_LIBS=$LIBS
13063LIBS="-lrt $LIBS"
13064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13065/* end confdefs.h. */
13066
13067/* Override any GCC internal prototype to avoid an error.
13068 Use char because int might match the return type of a GCC
13069 builtin and then its argument prototype would still apply. */
13070#ifdef __cplusplus
13071extern "C"
13072#endif
13073char clock_gettime ();
13074int
13075main ()
13076{
13077return clock_gettime ();
13078 ;
13079 return 0;
13080}
13081_ACEOF
13082if ac_fn_c_try_link "$LINENO"; then :
13083 ac_cv_lib_rt_clock_gettime=yes
13084else
13085 ac_cv_lib_rt_clock_gettime=no
13086fi
13087rm -f core conftest.err conftest.$ac_objext \
13088 conftest$ac_exeext conftest.$ac_ext
13089LIBS=$ac_check_lib_save_LIBS
13090fi
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
13092$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
13093if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
13094
Victor Stinner7efb8332014-08-29 15:41:08 +020013095 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020013096 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
13097
13098
13099$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
13100
13101
13102fi
13103
13104
13105fi
13106done
13107
13108
13109for ac_func in clock_getres
13110do :
13111 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
13112if test "x$ac_cv_func_clock_getres" = xyes; then :
13113 cat >>confdefs.h <<_ACEOF
13114#define HAVE_CLOCK_GETRES 1
13115_ACEOF
13116
13117else
13118
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
13120$as_echo_n "checking for clock_getres in -lrt... " >&6; }
13121if ${ac_cv_lib_rt_clock_getres+:} false; then :
13122 $as_echo_n "(cached) " >&6
13123else
13124 ac_check_lib_save_LIBS=$LIBS
13125LIBS="-lrt $LIBS"
13126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13127/* end confdefs.h. */
13128
13129/* Override any GCC internal prototype to avoid an error.
13130 Use char because int might match the return type of a GCC
13131 builtin and then its argument prototype would still apply. */
13132#ifdef __cplusplus
13133extern "C"
13134#endif
13135char clock_getres ();
13136int
13137main ()
13138{
13139return clock_getres ();
13140 ;
13141 return 0;
13142}
13143_ACEOF
13144if ac_fn_c_try_link "$LINENO"; then :
13145 ac_cv_lib_rt_clock_getres=yes
13146else
13147 ac_cv_lib_rt_clock_getres=no
13148fi
13149rm -f core conftest.err conftest.$ac_objext \
13150 conftest$ac_exeext conftest.$ac_ext
13151LIBS=$ac_check_lib_save_LIBS
13152fi
13153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13154$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13155if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13156
13157 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13158
13159
13160fi
13161
13162
13163fi
13164done
13165
13166
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013167for ac_func in clock_settime
13168do :
13169 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13170if test "x$ac_cv_func_clock_settime" = xyes; then :
13171 cat >>confdefs.h <<_ACEOF
13172#define HAVE_CLOCK_SETTIME 1
13173_ACEOF
13174
13175else
13176
13177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13178$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13179if ${ac_cv_lib_rt_clock_settime+:} false; then :
13180 $as_echo_n "(cached) " >&6
13181else
13182 ac_check_lib_save_LIBS=$LIBS
13183LIBS="-lrt $LIBS"
13184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13185/* end confdefs.h. */
13186
13187/* Override any GCC internal prototype to avoid an error.
13188 Use char because int might match the return type of a GCC
13189 builtin and then its argument prototype would still apply. */
13190#ifdef __cplusplus
13191extern "C"
13192#endif
13193char clock_settime ();
13194int
13195main ()
13196{
13197return clock_settime ();
13198 ;
13199 return 0;
13200}
13201_ACEOF
13202if ac_fn_c_try_link "$LINENO"; then :
13203 ac_cv_lib_rt_clock_settime=yes
13204else
13205 ac_cv_lib_rt_clock_settime=no
13206fi
13207rm -f core conftest.err conftest.$ac_objext \
13208 conftest$ac_exeext conftest.$ac_ext
13209LIBS=$ac_check_lib_save_LIBS
13210fi
13211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13212$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13213if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13214
13215 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13216
13217
13218fi
13219
13220
13221fi
13222done
13223
13224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13226$as_echo_n "checking for major... " >&6; }
13227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013228/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013229
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013230#if defined(MAJOR_IN_MKDEV)
13231#include <sys/mkdev.h>
13232#elif defined(MAJOR_IN_SYSMACROS)
13233#include <sys/sysmacros.h>
13234#else
13235#include <sys/types.h>
13236#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013237
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013238int
13239main ()
13240{
13241
13242 makedev(major(0),minor(0));
13243
13244 ;
13245 return 0;
13246}
13247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013249
13250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13254$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013255
13256else
Skip Montanaro6dead952003-09-25 14:50:04 +000013257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13259$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013260
13261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013262rm -f core conftest.err conftest.$ac_objext \
13263 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013264
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013265# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013266# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13268$as_echo_n "checking for getaddrinfo... " >&6; }
13269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013270/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013271
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013272#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013273#include <sys/socket.h>
13274#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013275#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276
Martin v. Löwis11437992002-04-12 09:54:03 +000013277int
13278main ()
13279{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013280getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 ;
13282 return 0;
13283}
13284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013285if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013286 have_getaddrinfo=yes
13287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013290rm -f core conftest.err conftest.$ac_objext \
13291 conftest$ac_exeext conftest.$ac_ext
13292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13293$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294if test $have_getaddrinfo = yes
13295then
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13297$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013298 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013302
13303if test "${enable_ipv6+set}" = set; then
13304 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13305else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013306 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013307fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311
Stefan Krah19c21392012-11-22 23:47:32 +010013312#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313#include <sys/types.h>
13314#include <netdb.h>
13315#include <string.h>
13316#include <sys/socket.h>
13317#include <netinet/in.h>
13318
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013319int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013320{
13321 int passive, gaierr, inet4 = 0, inet6 = 0;
13322 struct addrinfo hints, *ai, *aitop;
13323 char straddr[INET6_ADDRSTRLEN], strport[16];
13324
13325 for (passive = 0; passive <= 1; passive++) {
13326 memset(&hints, 0, sizeof(hints));
13327 hints.ai_family = AF_UNSPEC;
13328 hints.ai_flags = passive ? AI_PASSIVE : 0;
13329 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013330 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013331 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13332 (void)gai_strerror(gaierr);
13333 goto bad;
13334 }
13335 for (ai = aitop; ai; ai = ai->ai_next) {
13336 if (ai->ai_addr == NULL ||
13337 ai->ai_addrlen == 0 ||
13338 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13339 straddr, sizeof(straddr), strport, sizeof(strport),
13340 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13341 goto bad;
13342 }
13343 switch (ai->ai_family) {
13344 case AF_INET:
13345 if (strcmp(strport, "54321") != 0) {
13346 goto bad;
13347 }
13348 if (passive) {
13349 if (strcmp(straddr, "0.0.0.0") != 0) {
13350 goto bad;
13351 }
13352 } else {
13353 if (strcmp(straddr, "127.0.0.1") != 0) {
13354 goto bad;
13355 }
13356 }
13357 inet4++;
13358 break;
13359 case AF_INET6:
13360 if (strcmp(strport, "54321") != 0) {
13361 goto bad;
13362 }
13363 if (passive) {
13364 if (strcmp(straddr, "::") != 0) {
13365 goto bad;
13366 }
13367 } else {
13368 if (strcmp(straddr, "::1") != 0) {
13369 goto bad;
13370 }
13371 }
13372 inet6++;
13373 break;
13374 case AF_UNSPEC:
13375 goto bad;
13376 break;
13377 default:
13378 /* another family support? */
13379 break;
13380 }
13381 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013382 freeaddrinfo(aitop);
13383 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013384 }
13385
13386 if (!(inet4 == 0 || inet4 == 2))
13387 goto bad;
13388 if (!(inet6 == 0 || inet6 == 2))
13389 goto bad;
13390
13391 if (aitop)
13392 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013394
13395 bad:
13396 if (aitop)
13397 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013398 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013399}
13400
Martin v. Löwis11437992002-04-12 09:54:03 +000013401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013402if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013403 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13408 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013411fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013412
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13416$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13417
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013418if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013419then
13420 if test $ipv6 = yes
13421 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013422 echo 'Fatal: You must get working getaddrinfo() function.'
13423 echo ' or you can specify "--disable-ipv6"'.
13424 exit 1
13425 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013426else
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013429
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013430fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013431
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013432for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013433do :
13434 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013435if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013437#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013438_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013439
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013440fi
13441done
13442
Michael W. Hudson54241132001-12-07 15:38:26 +000013443
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13446$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013447if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452#include <sys/types.h>
13453#include <sys/time.h>
13454#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456int
13457main ()
13458{
13459if ((struct tm *) 0)
13460return 0;
13461 ;
13462 return 0;
13463}
13464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013466 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13473$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013474if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477
13478fi
13479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13481$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013482if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487#include <sys/types.h>
13488#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Martin v. Löwis11437992002-04-12 09:54:03 +000013490int
13491main ()
13492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493struct tm tm;
13494 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013501 ac_cv_struct_tm=time.h
13502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13508$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013509if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512
13513fi
13514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515ac_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 +000013516#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518"
Victor Stinnere0be4232011-10-25 13:06:09 +020013519if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
13521cat >>confdefs.h <<_ACEOF
13522#define HAVE_STRUCT_TM_TM_ZONE 1
13523_ACEOF
13524
13525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013526fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13534"
Victor Stinnere0be4232011-10-25 13:06:09 +020013535if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539fi
13540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543_ACEOF
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13546$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013547if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013552#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553#if !HAVE_DECL_TZNAME
13554extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557int
13558main ()
13559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ;
13562 return 0;
13563}
13564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013565if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013566 ac_cv_var_tzname=yes
13567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013570rm -f core conftest.err conftest.$ac_objext \
13571 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13574$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013575 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579 fi
13580fi
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582ac_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 +020013583if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
13585cat >>confdefs.h <<_ACEOF
13586#define HAVE_STRUCT_STAT_ST_RDEV 1
13587_ACEOF
13588
13589
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013590fi
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592ac_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 +020013593if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595cat >>confdefs.h <<_ACEOF
13596#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13597_ACEOF
13598
13599
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013600fi
13601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602ac_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 +020013603if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013604
13605cat >>confdefs.h <<_ACEOF
13606#define HAVE_STRUCT_STAT_ST_FLAGS 1
13607_ACEOF
13608
13609
13610fi
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612ac_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 +020013613if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013614
13615cat >>confdefs.h <<_ACEOF
13616#define HAVE_STRUCT_STAT_ST_GEN 1
13617_ACEOF
13618
13619
13620fi
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622ac_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 +020013623if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013624
13625cat >>confdefs.h <<_ACEOF
13626#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13627_ACEOF
13628
13629
13630fi
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632ac_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 +020013633if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013634
Martin v. Löwis11437992002-04-12 09:54:03 +000013635cat >>confdefs.h <<_ACEOF
13636#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13637_ACEOF
13638
13639
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013640fi
13641
Stefan Krah267b6392016-04-26 01:09:18 +020013642ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13643 #include <sys/types.h>
13644 #include <pwd.h>
13645
13646"
13647if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13648
13649cat >>confdefs.h <<_ACEOF
13650#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13651_ACEOF
13652
13653
13654fi
13655ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13656 #include <sys/types.h>
13657 #include <pwd.h>
13658
13659"
13660if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13661
13662cat >>confdefs.h <<_ACEOF
13663#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13664_ACEOF
13665
13666
13667fi
13668
Zachary Ware6a6967e2016-10-01 00:47:27 -050013669# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13670ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13671"
13672if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13673
13674cat >>confdefs.h <<_ACEOF
13675#define HAVE_SIGINFO_T_SI_BAND 1
13676_ACEOF
13677
13678
13679fi
13680
Michael W. Hudson54241132001-12-07 15:38:26 +000013681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13683$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013684if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686else
Matthias Kloseb159a552010-04-25 21:00:44 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013689/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013690#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013691int
13692main ()
13693{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ;
13696 return 0;
13697}
13698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013700 ac_cv_header_time_altzone=yes
13701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706fi
13707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13709$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013710if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713
13714fi
13715
Guido van Rossumda88dad1995-01-26 00:46:29 +000013716was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13718$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013720/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013721
13722#include <sys/types.h>
13723#include <sys/select.h>
13724#include <sys/time.h>
13725
Martin v. Löwis11437992002-04-12 09:54:03 +000013726int
13727main ()
13728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729;
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 ;
13731 return 0;
13732}
13733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
13736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013739 was_it_defined=yes
13740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13744$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13747$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013748if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013752/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013753#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013754int
13755main ()
13756{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013757struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 ;
13759 return 0;
13760}
13761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013762if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013763 ac_cv_struct_addrinfo=yes
13764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13768fi
13769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13771$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013772if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013775
13776fi
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13779$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013780if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013782else
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013784/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013785
13786# include <sys/types.h>
13787# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013788int
13789main ()
13790{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013791struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 ;
13793 return 0;
13794}
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013797 ac_cv_struct_sockaddr_storage=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13802fi
13803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13805$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013806if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013809
13810fi
13811
Christian Heimesdffa3942016-09-05 23:54:41 +020013812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13813$as_echo_n "checking for sockaddr_alg... " >&6; }
13814if ${ac_cv_struct_sockaddr_alg+:} false; then :
13815 $as_echo_n "(cached) " >&6
13816else
13817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13818/* end confdefs.h. */
13819
13820# include <sys/types.h>
13821# include <sys/socket.h>
13822# include <linux/if_alg.h>
13823int
13824main ()
13825{
13826struct sockaddr_alg s
13827 ;
13828 return 0;
13829}
13830_ACEOF
13831if ac_fn_c_try_compile "$LINENO"; then :
13832 ac_cv_struct_sockaddr_alg=yes
13833else
13834 ac_cv_struct_sockaddr_alg=no
13835fi
13836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13837fi
13838
13839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13840$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13841if test $ac_cv_struct_sockaddr_alg = yes; then
13842
13843$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13844
13845fi
13846
Guido van Rossum627b2d71993-12-24 10:39:16 +000013847# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13850$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013851if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013853else
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013856$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013857int
13858main ()
13859{
13860static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013861test_array [0] = 0;
13862return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
13864 ;
13865 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013866}
Martin v. Löwis11437992002-04-12 09:54:03 +000013867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013868if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013869 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013870else
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13876$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013879
13880fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13883$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013884if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013886else
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013888/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013889
Martin v. Löwis11437992002-04-12 09:54:03 +000013890int
13891main ()
13892{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013893
Martin v. Löwis11437992002-04-12 09:54:03 +000013894#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013895 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013897 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899 char const *const *pcpcc;
13900 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 /* NEC SVR4.0.2 mips cc rejects this. */
13902 struct point {int x, y;};
13903 static struct point const zero = {0,0};
13904 /* AIX XL C 1.02.0.0 rejects this.
13905 It does not let you subtract one const X* pointer from another in
13906 an arm of an if-expression whose if-part is not a constant
13907 expression */
13908 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 ++pcpcc;
13912 ppc = (char**) pcpcc;
13913 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013914 { /* SCO 3.2v4 cc rejects this sort of thing. */
13915 char tx;
13916 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013918
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013920 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 }
13922 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13923 int x[] = {25, 17};
13924 const int *foo = &x[0];
13925 ++foo;
13926 }
13927 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13928 typedef const int *iptr;
13929 iptr p = 0;
13930 ++p;
13931 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013932 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013934 struct s { int j; const int *ap[3]; } bx;
13935 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 }
13937 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13938 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013942#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013943
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 ;
13945 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013946}
Martin v. Löwis11437992002-04-12 09:54:03 +000013947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013948if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013949 ac_cv_c_const=yes
13950else
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13956$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013957if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960
13961fi
13962
Michael W. Hudson54241132001-12-07 15:38:26 +000013963
Guido van Rossumda88dad1995-01-26 00:46:29 +000013964works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13966$as_echo_n "checking for working signed char... " >&6; }
13967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013968/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970int
13971main ()
13972{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013973signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 ;
13975 return 0;
13976}
13977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013978if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013979 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013980else
Skip Montanaro6dead952003-09-25 14:50:04 +000013981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013983
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013984
Guido van Rossum7f43da71994-08-01 12:15:30 +000013985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13988$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013989
Guido van Rossumda88dad1995-01-26 00:46:29 +000013990have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13992$as_echo_n "checking for prototypes... " >&6; }
13993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013994/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013995int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013996int
13997main ()
13998{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013999return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 ;
14001 return 0;
14002}
14003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
Matthias Kloseb159a552010-04-25 21:00:44 +000014008 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
14012$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014013
Guido van Rossumda88dad1995-01-26 00:46:29 +000014014works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
14016$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
14017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014018/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000014019
14020#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014021int foo(int x, ...) {
14022 va_list va;
14023 va_start(va, x);
14024 va_arg(va, int);
14025 va_arg(va, char *);
14026 va_arg(va, double);
14027 return 0;
14028}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030int
14031main ()
14032{
Guido van Rossum90eea071996-08-30 20:58:57 +000014033return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 ;
14035 return 0;
14036}
14037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014039
14040
Matthias Kloseb9621712010-04-24 17:59:49 +000014041$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014043 works=yes
14044
Guido van Rossum627b2d71993-12-24 10:39:16 +000014045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
14048$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014049
Martin v. Löwisd6320502004-08-12 13:45:08 +000014050# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
14052$as_echo_n "checking for socketpair... " >&6; }
14053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014054/* end confdefs.h. */
14055
14056#include <sys/types.h>
14057#include <sys/socket.h>
14058
14059int
14060main ()
14061{
14062void *x=socketpair
14063 ;
14064 return 0;
14065}
14066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014067if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000014070
Matthias Kloseb159a552010-04-25 21:00:44 +000014071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014072$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14075$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000014076
14077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000014079
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014080# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
14082$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
14083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014084/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014085#include <sys/types.h>
14086#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014087int
14088main ()
14089{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014090struct sockaddr x;
14091x.sa_len = 0;
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 :
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14098$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014101
14102else
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14104$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014105
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014108
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020014113if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
14118$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014119 OLD_CFLAGS=$CFLAGS
14120 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014123
14124# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Martin v. Löwis11437992002-04-12 09:54:03 +000014126int
14127main ()
14128{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014129
14130 char *name;
14131 struct hostent *he, *res;
14132 char buffer[2048];
14133 int buflen = 2048;
14134 int h_errnop;
14135
14136 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014137
14138 ;
14139 return 0;
14140}
14141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014145
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14150$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014151
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014152else
Skip Montanaro6dead952003-09-25 14:50:04 +000014153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14155$as_echo "no" >&6; }
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14157$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014159/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014160
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014161# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014162
Martin v. Löwis11437992002-04-12 09:54:03 +000014163int
14164main ()
14165{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014166
14167 char *name;
14168 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014169 char buffer[2048];
14170 int buflen = 2048;
14171 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014172
Matthias Kloseb159a552010-04-25 21:00:44 +000014173 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
14175 ;
14176 return 0;
14177}
14178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014182
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Matthias Kloseb159a552010-04-25 21:00:44 +000014184$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14187$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014188
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014189else
Skip Montanaro6dead952003-09-25 14:50:04 +000014190
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14192$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14194$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14196/* end confdefs.h. */
14197
14198# include <netdb.h>
14199
14200int
14201main ()
14202{
14203
14204 char *name;
14205 struct hostent *he;
14206 struct hostent_data data;
14207
14208 (void) gethostbyname_r(name, he, &data);
14209
14210 ;
14211 return 0;
14212}
14213_ACEOF
14214if ac_fn_c_try_compile "$LINENO"; then :
14215
14216 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14217
14218
14219$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14220
14221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14222$as_echo "yes" >&6; }
14223
14224else
14225
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14227$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014231
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014237 CFLAGS=$OLD_CFLAGS
14238
14239else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 for ac_func in gethostbyname
14242do :
14243 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014244if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014245 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014246#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014247_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014248
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014249fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014250done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014251
Michael W. Hudson54241132001-12-07 15:38:26 +000014252
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014253fi
14254
Michael W. Hudson54241132001-12-07 15:38:26 +000014255
14256
14257
14258
14259
14260
Guido van Rossum627b2d71993-12-24 10:39:16 +000014261# checks for system services
14262# (none yet)
14263
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014264# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014265ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014267
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14270$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014271if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273else
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014275LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279/* Override any GCC internal prototype to avoid an error.
14280 Use char because int might match the return type of a GCC
14281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014282#ifdef __cplusplus
14283extern "C"
14284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014285char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014286int
14287main ()
14288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 ;
14291 return 0;
14292}
14293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014294if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014296else
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014299rm -f core conftest.err conftest.$ac_objext \
14300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014301LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14304$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014305if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 cat >>confdefs.h <<_ACEOF
14307#define HAVE_LIBIEEE 1
14308_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014309
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014310 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014311
Guido van Rossum627b2d71993-12-24 10:39:16 +000014312fi
14313
Michael W. Hudson54241132001-12-07 15:38:26 +000014314
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014315fi
14316
Michael W. Hudson54241132001-12-07 15:38:26 +000014317
Guido van Rossum7f43da71994-08-01 12:15:30 +000014318# check for --with-libm=...
14319
Guido van Rossum563e7081996-09-10 18:20:48 +000014320case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014321Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014322*) LIBM=-lm
14323esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14325$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014328if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014330if test "$withval" = no
14331then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14333$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014334elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014335then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14337$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014338else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014339fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014340else
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14342$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343fi
14344
Guido van Rossum7f43da71994-08-01 12:15:30 +000014345
14346# check for --with-libc=...
14347
Matthias Kloseb9621712010-04-24 17:59:49 +000014348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14349$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014352if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014354if test "$withval" = no
14355then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14357$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014358elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014359then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14361$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014362else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014363fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014364else
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14366$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367fi
14368
Guido van Rossum7f43da71994-08-01 12:15:30 +000014369
Stefan Krah1919b7e2012-03-21 18:25:23 +010014370# **************************************
14371# * Check for gcc x64 inline assembler *
14372# **************************************
14373
14374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14375$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377/* end confdefs.h. */
14378
14379int
14380main ()
14381{
14382
14383 __asm__ __volatile__ ("movq %rcx, %rax");
14384
14385 ;
14386 return 0;
14387}
14388_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014389if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014390 have_gcc_asm_for_x64=yes
14391else
14392 have_gcc_asm_for_x64=no
14393fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014394rm -f core conftest.err conftest.$ac_objext \
14395 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14397$as_echo "$have_gcc_asm_for_x64" >&6; }
14398if test "$have_gcc_asm_for_x64" = yes
14399then
14400
14401$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14402
14403fi
14404
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014405# **************************************************
14406# * Check for various properties of floating point *
14407# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014408
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14410$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14411if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014413else
14414
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014415
14416ax_cv_c_float_words_bigendian=unknown
14417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014418/* end confdefs.h. */
14419
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014420
14421double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14422
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014423
14424_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014425if ac_fn_c_try_compile "$LINENO"; then :
14426
14427
Arnon Yaari5dd83602020-04-01 18:19:09 +030014428if $GREP noonsees conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014429 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014430fi
Arnon Yaari5dd83602020-04-01 18:19:09 +030014431if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014432 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14433 ax_cv_c_float_words_bigendian=no
14434 else
14435 ax_cv_c_float_words_bigendian=unknown
14436 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014437fi
14438
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014439
14440fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014442fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14444$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014445
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014446case $ax_cv_c_float_words_bigendian in
14447 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014448
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014449$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14450 ;;
14451 no)
14452 ;;
14453 *)
14454 as_fn_error $? "
14455
14456Unknown float word ordering. You need to manually preset
14457ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14458
14459 " "$LINENO" 5 ;;
14460esac
14461
14462
14463if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014464then
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014467
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014468elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014469then
14470
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014471$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14472
14473else
14474 # Some ARM platforms use a mixed-endian representation for doubles.
14475 # While Python doesn't currently have full support for these platforms
14476 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14477 # conversions work.
14478 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14479 # or little, then it must be this?
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014482
14483fi
14484
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014485# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014486# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014487# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014488# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014489# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014490# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014491
14492# This inline assembler syntax may also work for suncc and icc,
14493# so we try it on all platforms.
14494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14496$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014498/* end confdefs.h. */
14499
14500int
14501main ()
14502{
14503
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014504 unsigned short cw;
14505 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14506 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014507
14508 ;
14509 return 0;
14510}
14511_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014512if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014513 have_gcc_asm_for_x87=yes
14514else
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014516fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014517rm -f core conftest.err conftest.$ac_objext \
14518 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14520$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014521if test "$have_gcc_asm_for_x87" = yes
14522then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014525
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14529$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14531/* end confdefs.h. */
14532
14533int
14534main ()
14535{
14536
14537 unsigned int fpcr;
14538 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14539 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14540
14541 ;
14542 return 0;
14543}
14544_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014545if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014546 have_gcc_asm_for_mc68881=yes
14547else
14548 have_gcc_asm_for_mc68881=no
14549fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014550rm -f core conftest.err conftest.$ac_objext \
14551 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14553$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14554if test "$have_gcc_asm_for_mc68881" = yes
14555then
14556
14557$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14558
14559fi
14560
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014561# Detect whether system arithmetic is subject to x87-style double
14562# rounding issues. The result of this test has little meaning on non
14563# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14564# mode is round-to-nearest and double rounding issues are present, and
14565# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14567$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014568# $BASECFLAGS may affect the result
14569ac_save_cc="$CC"
14570CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014572 ac_cv_x87_double_rounding=no
14573else
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014575/* end confdefs.h. */
14576
14577#include <stdlib.h>
14578#include <math.h>
14579int main() {
14580 volatile double x, y, z;
14581 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14582 x = 0.99999999999999989; /* 1-2**-53 */
14583 y = 1./x;
14584 if (y != 1.)
14585 exit(0);
14586 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14587 x = 1e16;
14588 y = 2.99999;
14589 z = x + y;
14590 if (z != 1e16+4.)
14591 exit(0);
14592 /* both tests show evidence of double rounding */
14593 exit(1);
14594}
14595
14596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014598 ac_cv_x87_double_rounding=no
14599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014604fi
14605
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014606CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14608$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014609if test "$ac_cv_x87_double_rounding" = yes
14610then
14611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014613
14614fi
14615
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014616# ************************************
14617# * Check for mathematical functions *
14618# ************************************
14619
14620LIBS_SAVE=$LIBS
14621LIBS="$LIBS $LIBM"
14622
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014623for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14624do :
14625 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14626ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014627if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014628 cat >>confdefs.h <<_ACEOF
14629#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14630_ACEOF
14631
14632fi
14633done
14634
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014635for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014636do :
14637 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14638ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014639if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014640 cat >>confdefs.h <<_ACEOF
14641#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14642_ACEOF
14643
14644fi
14645done
14646
14647ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14648"
Victor Stinnere0be4232011-10-25 13:06:09 +020014649if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014650 ac_have_decl=1
14651else
14652 ac_have_decl=0
14653fi
14654
14655cat >>confdefs.h <<_ACEOF
14656#define HAVE_DECL_ISINF $ac_have_decl
14657_ACEOF
14658ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14659"
Victor Stinnere0be4232011-10-25 13:06:09 +020014660if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014661 ac_have_decl=1
14662else
14663 ac_have_decl=0
14664fi
14665
14666cat >>confdefs.h <<_ACEOF
14667#define HAVE_DECL_ISNAN $ac_have_decl
14668_ACEOF
14669ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14670"
Victor Stinnere0be4232011-10-25 13:06:09 +020014671if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014672 ac_have_decl=1
14673else
14674 ac_have_decl=0
14675fi
14676
14677cat >>confdefs.h <<_ACEOF
14678#define HAVE_DECL_ISFINITE $ac_have_decl
14679_ACEOF
14680
14681
Mark Dickinsona614f042009-11-28 12:48:43 +000014682# For multiprocessing module, check that sem_open
14683# actually works. For FreeBSD versions <= 7.2,
14684# the kernel module that provides POSIX semaphores
14685# isn't loaded by default, so an attempt to call
14686# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14688$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014689if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014691else
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014693 ac_cv_posix_semaphores_enabled=yes
14694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014696/* end confdefs.h. */
14697
14698#include <unistd.h>
14699#include <fcntl.h>
14700#include <stdio.h>
14701#include <semaphore.h>
14702#include <sys/stat.h>
14703
14704int main(void) {
14705 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14706 if (a == SEM_FAILED) {
14707 perror("sem_open");
14708 return 1;
14709 }
14710 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014711 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014712 return 0;
14713}
14714
14715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014717 ac_cv_posix_semaphores_enabled=yes
14718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014723fi
14724
14725
Mark Dickinsona614f042009-11-28 12:48:43 +000014726fi
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14729$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014730if test $ac_cv_posix_semaphores_enabled = no
14731then
14732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014734
14735fi
14736
Mark Dickinson10683072009-04-18 21:18:19 +000014737# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14739$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014740if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014741 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014742else
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014744 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014747/* end confdefs.h. */
14748
14749#include <unistd.h>
14750#include <fcntl.h>
14751#include <stdio.h>
14752#include <semaphore.h>
14753#include <sys/stat.h>
14754
14755int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014756 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014757 int count;
14758 int res;
14759 if(a==SEM_FAILED){
14760 perror("sem_open");
14761 return 1;
14762
14763 }
14764 res = sem_getvalue(a, &count);
14765 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014766 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014767 return res==-1 ? 1 : 0;
14768}
14769
Mark Dickinson10683072009-04-18 21:18:19 +000014770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014771if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014772 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014773else
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014778fi
14779
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014781fi
14782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14784$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014785if test $ac_cv_broken_sem_getvalue = yes
14786then
14787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014789
14790fi
14791
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014792ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14793"
14794if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14795 ac_have_decl=1
14796else
14797 ac_have_decl=0
14798fi
14799
14800cat >>confdefs.h <<_ACEOF
14801#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14802_ACEOF
14803ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14804"
14805if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14806 ac_have_decl=1
14807else
14808 ac_have_decl=0
14809fi
14810
14811cat >>confdefs.h <<_ACEOF
14812#define HAVE_DECL_RTLD_NOW $ac_have_decl
14813_ACEOF
14814ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14815"
14816if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14817 ac_have_decl=1
14818else
14819 ac_have_decl=0
14820fi
14821
14822cat >>confdefs.h <<_ACEOF
14823#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14824_ACEOF
14825ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14826"
14827if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14828 ac_have_decl=1
14829else
14830 ac_have_decl=0
14831fi
14832
14833cat >>confdefs.h <<_ACEOF
14834#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14835_ACEOF
14836ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14837"
14838if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14839 ac_have_decl=1
14840else
14841 ac_have_decl=0
14842fi
14843
14844cat >>confdefs.h <<_ACEOF
14845#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14846_ACEOF
14847ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14848"
14849if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14850 ac_have_decl=1
14851else
14852 ac_have_decl=0
14853fi
14854
14855cat >>confdefs.h <<_ACEOF
14856#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14857_ACEOF
14858ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14859"
14860if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14861 ac_have_decl=1
14862else
14863 ac_have_decl=0
14864fi
14865
14866cat >>confdefs.h <<_ACEOF
14867#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14868_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014869ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14870"
14871if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14872 ac_have_decl=1
14873else
14874 ac_have_decl=0
14875fi
14876
14877cat >>confdefs.h <<_ACEOF
14878#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14879_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014880
14881
Mark Dickinsonbd792642009-03-18 20:06:12 +000014882# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14884$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014885# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014886if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014887 enableval=$enable_big_digits; case $enable_big_digits in
14888yes)
14889 enable_big_digits=30 ;;
14890no)
14891 enable_big_digits=15 ;;
1489215|30)
14893 ;;
14894*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014895 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 +000014896esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14898$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014899
14900cat >>confdefs.h <<_ACEOF
14901#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14902_ACEOF
14903
14904
14905else
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14907$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014908fi
14909
14910
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014912ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014913if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014914
14915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014917
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014918 wchar_h="yes"
14919
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920else
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014922
14923fi
14924
Michael W. Hudson54241132001-12-07 15:38:26 +000014925
Martin v. Löwis11437992002-04-12 09:54:03 +000014926
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014927# determine wchar_t size
14928if test "$wchar_h" = yes
14929then
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14935$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014936if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014938else
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14940"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Martin v. Löwis11437992002-04-12 09:54:03 +000014942else
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 if test "$ac_cv_type_wchar_t" = yes; then
14944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014946as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014947See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948 else
14949 ac_cv_sizeof_wchar_t=0
14950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014952
Martin v. Löwis11437992002-04-12 09:54:03 +000014953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14955$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956
14957
14958
Martin v. Löwis11437992002-04-12 09:54:03 +000014959cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014960#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014961_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014962
Michael W. Hudson54241132001-12-07 15:38:26 +000014963
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014964fi
14965
Matthias Kloseb9621712010-04-24 17:59:49 +000014966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14967$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014968have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014971
14972#include <tcl.h>
14973#if TCL_UTF_MAX != 6
14974# error "NOT UCS4_TCL"
14975#endif
14976int
14977main ()
14978{
14979
14980 ;
14981 return 0;
14982}
14983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014985
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014988
14989 have_ucs4_tcl=yes
14990
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14994$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014995
Skip Montanaro6dead952003-09-25 14:50:04 +000014996# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014997if test "$wchar_h" = yes
14998then
14999 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
15001$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015002 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015004else
15005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015007 ac_cv_wchar_t_signed=yes
15008else
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015010/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015011
15012 #include <wchar.h>
15013 int main()
15014 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015015 /* Success: exit code 0 */
15016 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015017 }
15018
15019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015020if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015021 ac_cv_wchar_t_signed=yes
15022else
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015027fi
15028
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015029fi
15030
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15032$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033fi
15034
Michael Osipov3738fad2018-08-24 18:17:19 +020015035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15036$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015037# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015038if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015039 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015040then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015041
Matthias Kloseb9621712010-04-24 17:59:49 +000015042$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015043
Michael Osipov3738fad2018-08-24 18:17:19 +020015044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15045$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015046else
Michael Osipov3738fad2018-08-24 18:17:19 +020015047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15048$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015049fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015050
15051# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15053$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015054if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015056else
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 ac_cv_c_bigendian=unknown
15058 # See if we're dealing with a universal compiler.
15059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15060/* end confdefs.h. */
15061#ifndef __APPLE_CC__
15062 not a universal capable compiler
15063 #endif
15064 typedef int dummy;
15065
Skip Montanaro6dead952003-09-25 14:50:04 +000015066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015067if ac_fn_c_try_compile "$LINENO"; then :
15068
15069 # Check for potential -arch flags. It is not universal unless
15070 # there are at least two -arch flags with different values.
15071 ac_arch=
15072 ac_prev=
15073 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15074 if test -n "$ac_prev"; then
15075 case $ac_word in
15076 i?86 | x86_64 | ppc | ppc64)
15077 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15078 ac_arch=$ac_word
15079 else
15080 ac_cv_c_bigendian=universal
15081 break
15082 fi
15083 ;;
15084 esac
15085 ac_prev=
15086 elif test "x$ac_word" = "x-arch"; then
15087 ac_prev=arch
15088 fi
15089 done
15090fi
15091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15092 if test $ac_cv_c_bigendian = unknown; then
15093 # See if sys/param.h defines the BYTE_ORDER macro.
15094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015095/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015098
Martin v. Löwis11437992002-04-12 09:54:03 +000015099int
15100main ()
15101{
Matthias Kloseb9621712010-04-24 17:59:49 +000015102#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15103 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15104 && LITTLE_ENDIAN)
15105 bogus endian macros
15106 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015107
15108 ;
15109 return 0;
15110}
15111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015112if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015113 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015115/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015116#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015117 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015118
Martin v. Löwis11437992002-04-12 09:54:03 +000015119int
15120main ()
15121{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 not big endian
15124 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015125
15126 ;
15127 return 0;
15128}
15129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015130if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131 ac_cv_c_bigendian=yes
15132else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015136fi
15137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15138 fi
15139 if test $ac_cv_c_bigendian = unknown; then
15140 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015142/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015143#include <limits.h>
15144
Martin v. Löwis11437992002-04-12 09:54:03 +000015145int
15146main ()
15147{
Matthias Kloseb9621712010-04-24 17:59:49 +000015148#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15149 bogus endian macros
15150 #endif
15151
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ;
15153 return 0;
15154}
15155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015156if ac_fn_c_try_compile "$LINENO"; then :
15157 # It does; now see whether it defined to _BIG_ENDIAN or not.
15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15159/* end confdefs.h. */
15160#include <limits.h>
15161
15162int
15163main ()
15164{
15165#ifndef _BIG_ENDIAN
15166 not big endian
15167 #endif
15168
15169 ;
15170 return 0;
15171}
15172_ACEOF
15173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015175else
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15179fi
15180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15181 fi
15182 if test $ac_cv_c_bigendian = unknown; then
15183 # Compile a test program.
15184 if test "$cross_compiling" = yes; then :
15185 # Try to guess by grepping values from an object file.
15186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15187/* end confdefs.h. */
15188short int ascii_mm[] =
15189 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15190 short int ascii_ii[] =
15191 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15192 int use_ascii (int i) {
15193 return ascii_mm[i] + ascii_ii[i];
15194 }
15195 short int ebcdic_ii[] =
15196 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15197 short int ebcdic_mm[] =
15198 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15199 int use_ebcdic (int i) {
15200 return ebcdic_mm[i] + ebcdic_ii[i];
15201 }
15202 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204int
15205main ()
15206{
15207return use_ascii (foo) == use_ebcdic (foo);
15208 ;
15209 return 0;
15210}
15211_ACEOF
15212if ac_fn_c_try_compile "$LINENO"; then :
15213 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15214 ac_cv_c_bigendian=yes
15215 fi
15216 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15217 if test "$ac_cv_c_bigendian" = unknown; then
15218 ac_cv_c_bigendian=no
15219 else
15220 # finding both strings is unlikely to happen, but who knows?
15221 ac_cv_c_bigendian=unknown
15222 fi
15223 fi
15224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015226else
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015228/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015230int
15231main ()
15232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 /* Are we little or big endian? From Harbison&Steele. */
15235 union
15236 {
15237 long int l;
15238 char c[sizeof (long int)];
15239 } u;
15240 u.l = 1;
15241 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242
15243 ;
15244 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015245}
Martin v. Löwis11437992002-04-12 09:54:03 +000015246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015247if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015248 ac_cv_c_bigendian=no
15249else
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15259$as_echo "$ac_cv_c_bigendian" >&6; }
15260 case $ac_cv_c_bigendian in #(
15261 yes)
15262 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15263;; #(
15264 no)
15265 ;; #(
15266 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 ;; #(
15271 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015272 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015273 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015274 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015275
Michael W. Hudson54241132001-12-07 15:38:26 +000015276
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015277# ABI version string for Python extension modules. This appears between the
15278# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15279# from the following attributes which affect the ABI of this Python build (in
15280# this order):
15281#
15282# * The Python implementation (always 'cpython-' for us)
15283# * The major and minor version numbers
15284# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015285#
15286# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015287# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15288# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015289#
15290# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15291# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015292
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15294$as_echo_n "checking ABIFLAGS... " >&6; }
15295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15296$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15298$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015299SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15301$as_echo "$SOABI" >&6; }
15302
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015303# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15304if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015305 # Similar to SOABI but remove "d" flag from ABIFLAGS
15306
15307 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15308
15309cat >>confdefs.h <<_ACEOF
15310#define ALT_SOABI "${ALT_SOABI}"
15311_ACEOF
15312
15313fi
15314
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015315
15316case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015317 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015318 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15319 *)
15320 EXT_SUFFIX=${SHLIB_SUFFIX};;
15321esac
15322
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15324$as_echo_n "checking LDVERSION... " >&6; }
15325LDVERSION='$(VERSION)$(ABIFLAGS)'
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15327$as_echo "$LDVERSION" >&6; }
15328
E. M. Brayc994c8f2019-05-24 17:33:47 +020015329# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015330
E. M. Brayb1fc4172019-05-24 18:39:39 +020015331if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015332 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015333else
15334 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015335fi
15336
doko@python.org87421192013-01-26 11:39:31 +010015337
Victor Stinner51ae31e2020-06-09 15:32:43 +020015338
15339BINLIBDEST='$(LIBDIR)/python$(VERSION)'
15340
15341
15342# Check for --with-platlibdir
Victor Stinner8510f432020-03-10 09:53:09 +010015343# /usr/$LIDIRNAME/python$VERSION
15344
15345PLATLIBDIR="lib"
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5
15347$as_echo_n "checking for --with-platlibdir... " >&6; }
15348
15349# Check whether --with-platlibdir was given.
15350if test "${with_platlibdir+set}" = set; then :
15351 withval=$with_platlibdir;
15352# ignore 3 options:
15353# --with-platlibdir
15354# --with-platlibdir=
15355# --without-platlibdir
15356if test -n "$withval" -a "$withval" != yes -a "$withval" != no
15357then
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15359$as_echo "yes" >&6; }
15360 PLATLIBDIR="$withval"
Victor Stinner51ae31e2020-06-09 15:32:43 +020015361 BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)'
doko@ubuntu.com55532312016-06-14 08:55:19 +020015362else
Victor Stinner8510f432020-03-10 09:53:09 +010015363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15364$as_echo "no" >&6; }
15365fi
15366else
15367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15368$as_echo "no" >&6; }
15369fi
15370
15371
15372
15373
15374if test x$PLATFORM_TRIPLET = x; then
15375 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
15376else
15377 LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
doko@ubuntu.com55532312016-06-14 08:55:19 +020015378fi
doko@python.org87421192013-01-26 11:39:31 +010015379
15380
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015381# Check whether right shifting a negative integer extends the sign bit
15382# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15384$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015385if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015387else
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015390 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015391else
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015393/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015394
15395int main()
15396{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015397 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015398}
15399
Martin v. Löwis11437992002-04-12 09:54:03 +000015400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015401if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015402 ac_cv_rshift_extends_sign=yes
15403else
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015408fi
15409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015410fi
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15413$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015414if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015415then
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015418
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015419fi
15420
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015421# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15423$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015424if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015430#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015431int
15432main ()
15433{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015434
15435 FILE *f = fopen("/dev/null", "r");
15436 flockfile(f);
15437 getc_unlocked(f);
15438 funlockfile(f);
15439
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ;
15441 return 0;
15442}
15443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015444if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015445 ac_cv_have_getc_unlocked=yes
15446else
Matthias Kloseb9621712010-04-24 17:59:49 +000015447 ac_cv_have_getc_unlocked=no
15448fi
15449rm -f core conftest.err conftest.$ac_objext \
15450 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15454$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015455if test "$ac_cv_have_getc_unlocked" = yes
15456then
Martin v. Löwis11437992002-04-12 09:54:03 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015459
15460fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015461
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015462# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015463# save the value of LIBS so we don't actually link Python with readline
15464LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015465
Gregory P. Smith18820942008-09-07 06:24:49 +000015466# On some systems we need to link readline to a termcap compatible
15467# library. NOTE: Keep the precedence of listed libraries synchronised
15468# with setup.py.
15469py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15471$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015472for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015473 if test -z "$py_libtermcap"; then
15474 READLINE_LIBS="-lreadline"
15475 else
15476 READLINE_LIBS="-lreadline -l$py_libtermcap"
15477 fi
15478 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015480/* end confdefs.h. */
15481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482/* Override any GCC internal prototype to avoid an error.
15483 Use char because int might match the return type of a GCC
15484 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015485#ifdef __cplusplus
15486extern "C"
15487#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015488char readline ();
15489int
15490main ()
15491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015493 ;
15494 return 0;
15495}
15496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015497if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015498 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015500rm -f core conftest.err conftest.$ac_objext \
15501 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015502 if test $py_cv_lib_readline = yes; then
15503 break
15504 fi
15505done
15506# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15507#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015508if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15510$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015511else
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15513$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015516
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015517fi
15518
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015519# check for readline 2.2
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 Rossumfaf5e4d2002-12-30 16:25:41 +000015522#include <readline/readline.h>
15523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015524if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015525 have_readline=yes
15526else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015527 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015528
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015529fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015530rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015531if test $have_readline = yes
15532then
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015534/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015535#include <readline/readline.h>
15536
15537_ACEOF
15538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015542
15543fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015544rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015547/* end confdefs.h. */
15548#include <readline/readline.h>
15549
15550_ACEOF
15551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015555
15556fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015557rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015558
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015559fi
15560
Martin v. Löwis0daad592001-09-30 21:09:59 +000015561# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15563$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015564if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015566else
Martin v. Löwis11437992002-04-12 09:54:03 +000015567 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015568LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572/* Override any GCC internal prototype to avoid an error.
15573 Use char because int might match the return type of a GCC
15574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015575#ifdef __cplusplus
15576extern "C"
15577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015578char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015579int
15580main ()
15581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 ;
15584 return 0;
15585}
15586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015592rm -f core conftest.err conftest.$ac_objext \
15593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015594LIBS=$ac_check_lib_save_LIBS
15595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15597$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015598if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015601
Martin v. Löwis0daad592001-09-30 21:09:59 +000015602fi
15603
Michael W. Hudson54241132001-12-07 15:38:26 +000015604
Thomas Wouters89d996e2007-09-08 17:39:28 +000015605# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15607$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015608if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015610else
15611 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015612LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015614/* end confdefs.h. */
15615
15616/* Override any GCC internal prototype to avoid an error.
15617 Use char because int might match the return type of a GCC
15618 builtin and then its argument prototype would still apply. */
15619#ifdef __cplusplus
15620extern "C"
15621#endif
15622char rl_completion_display_matches_hook ();
15623int
15624main ()
15625{
15626return rl_completion_display_matches_hook ();
15627 ;
15628 return 0;
15629}
15630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015631if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015632 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15633else
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015636rm -f core conftest.err conftest.$ac_objext \
15637 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015638LIBS=$ac_check_lib_save_LIBS
15639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15641$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015642if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015645
15646fi
15647
15648
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015649# also in 4.0, but not in editline
15650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15651$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15652if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15653 $as_echo_n "(cached) " >&6
15654else
15655 ac_check_lib_save_LIBS=$LIBS
15656LIBS="-lreadline $READLINE_LIBS $LIBS"
15657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15658/* end confdefs.h. */
15659
15660/* Override any GCC internal prototype to avoid an error.
15661 Use char because int might match the return type of a GCC
15662 builtin and then its argument prototype would still apply. */
15663#ifdef __cplusplus
15664extern "C"
15665#endif
15666char rl_resize_terminal ();
15667int
15668main ()
15669{
15670return rl_resize_terminal ();
15671 ;
15672 return 0;
15673}
15674_ACEOF
15675if ac_fn_c_try_link "$LINENO"; then :
15676 ac_cv_lib_readline_rl_resize_terminal=yes
15677else
15678 ac_cv_lib_readline_rl_resize_terminal=no
15679fi
15680rm -f core conftest.err conftest.$ac_objext \
15681 conftest$ac_exeext conftest.$ac_ext
15682LIBS=$ac_check_lib_save_LIBS
15683fi
15684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15685$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15686if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15687
15688$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15689
15690fi
15691
15692
Martin v. Löwis0daad592001-09-30 21:09:59 +000015693# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15695$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015696if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015698else
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015700LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015704/* Override any GCC internal prototype to avoid an error.
15705 Use char because int might match the return type of a GCC
15706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015707#ifdef __cplusplus
15708extern "C"
15709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015710char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015711int
15712main ()
15713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 ;
15716 return 0;
15717}
15718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015721else
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015724rm -f core conftest.err conftest.$ac_objext \
15725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015726LIBS=$ac_check_lib_save_LIBS
15727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15729$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015730if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015731
Matthias Kloseb9621712010-04-24 17:59:49 +000015732$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015733
Guido van Rossum353ae582001-07-10 16:45:32 +000015734fi
15735
Jack Jansendd19cf82001-12-06 22:36:17 +000015736
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015737# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015739/* end confdefs.h. */
15740#include <readline/readline.h>
15741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015742if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015743 have_readline=yes
15744else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015745 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015746
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015747fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015748rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015749if test $have_readline = yes
15750then
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015752/* end confdefs.h. */
15753#include <readline/readline.h>
15754
15755_ACEOF
15756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015760
15761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015762rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015763
15764fi
15765
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15767$as_echo_n "checking for append_history in -lreadline... " >&6; }
15768if ${ac_cv_lib_readline_append_history+:} false; then :
15769 $as_echo_n "(cached) " >&6
15770else
15771 ac_check_lib_save_LIBS=$LIBS
15772LIBS="-lreadline $READLINE_LIBS $LIBS"
15773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15774/* end confdefs.h. */
15775
15776/* Override any GCC internal prototype to avoid an error.
15777 Use char because int might match the return type of a GCC
15778 builtin and then its argument prototype would still apply. */
15779#ifdef __cplusplus
15780extern "C"
15781#endif
15782char append_history ();
15783int
15784main ()
15785{
15786return append_history ();
15787 ;
15788 return 0;
15789}
15790_ACEOF
15791if ac_fn_c_try_link "$LINENO"; then :
15792 ac_cv_lib_readline_append_history=yes
15793else
15794 ac_cv_lib_readline_append_history=no
15795fi
15796rm -f core conftest.err conftest.$ac_objext \
15797 conftest$ac_exeext conftest.$ac_ext
15798LIBS=$ac_check_lib_save_LIBS
15799fi
15800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15801$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15802if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15803
15804$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15805
15806fi
15807
15808
Martin v. Löwis82bca632006-02-10 20:49:30 +000015809# End of readline checks: restore LIBS
15810LIBS=$LIBS_no_readline
15811
Matthias Kloseb9621712010-04-24 17:59:49 +000015812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15813$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015814if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015816else
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015819 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015820else
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015822/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015823
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015824#include <stdlib.h>
15825#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015826int main()
15827{
15828 int val1 = nice(1);
15829 if (val1 != -1 && val1 == nice(2))
15830 exit(0);
15831 exit(1);
15832}
15833
Martin v. Löwis11437992002-04-12 09:54:03 +000015834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015835if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015836 ac_cv_broken_nice=yes
15837else
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015842fi
15843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844fi
15845
Matthias Kloseb9621712010-04-24 17:59:49 +000015846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15847$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015848if test "$ac_cv_broken_nice" = yes
15849then
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015852
15853fi
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15856$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015857if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015858 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015859else
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015861 ac_cv_broken_poll=no
15862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015864/* end confdefs.h. */
15865
15866#include <poll.h>
15867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015868int main()
15869{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015870 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015871 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015872
15873 close (42);
15874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015875 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015876 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015877 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015878 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015879 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015880 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015881 return 1;
15882}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015883
15884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015885if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015886 ac_cv_broken_poll=yes
15887else
Matthias Kloseb9621712010-04-24 17:59:49 +000015888 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015894fi
15895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15897$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015898if test "$ac_cv_broken_poll" = yes
15899then
15900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015902
15903fi
15904
Martin v. Löwis1d459062005-03-14 21:23:33 +000015905# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15907$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015908if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015910else
15911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015913 ac_cv_working_tzset=no
15914else
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015916/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015917
15918#include <stdlib.h>
15919#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015920#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015921
15922#if HAVE_TZNAME
15923extern char *tzname[];
15924#endif
15925
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015926int main()
15927{
Brett Cannon18367812003-09-19 00:59:16 +000015928 /* Note that we need to ensure that not only does tzset(3)
15929 do 'something' with localtime, but it works as documented
15930 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015931 This includes making sure that tzname is set properly if
15932 tm->tm_zone does not exist since it is the alternative way
15933 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015934
15935 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015936 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015937 */
15938
Martin v. Löwis1d459062005-03-14 21:23:33 +000015939 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015940 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15941
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015942 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015943 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015944 if (localtime(&groundhogday)->tm_hour != 0)
15945 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015946#if HAVE_TZNAME
15947 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15948 if (strcmp(tzname[0], "UTC") ||
15949 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15950 exit(1);
15951#endif
Brett Cannon18367812003-09-19 00:59:16 +000015952
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015953 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015954 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015955 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015956 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015957#if HAVE_TZNAME
15958 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15959 exit(1);
15960#endif
Brett Cannon18367812003-09-19 00:59:16 +000015961
15962 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15963 tzset();
15964 if (localtime(&groundhogday)->tm_hour != 11)
15965 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015966#if HAVE_TZNAME
15967 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15968 exit(1);
15969#endif
15970
15971#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015972 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15973 exit(1);
15974 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15975 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015976#endif
Brett Cannon18367812003-09-19 00:59:16 +000015977
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015978 exit(0);
15979}
15980
15981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015982if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015983 ac_cv_working_tzset=yes
15984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015989fi
15990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015991fi
15992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15994$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015995if test "$ac_cv_working_tzset" = yes
15996then
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015999
16000fi
16001
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016002# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
16004$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016005if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016006 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016007else
Matthias Kloseb9621712010-04-24 17:59:49 +000016008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016009/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016010#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016011int
16012main ()
16013{
16014
16015struct stat st;
16016st.st_mtim.tv_nsec = 1;
16017
16018 ;
16019 return 0;
16020}
16021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016022if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016023 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016024else
Matthias Kloseb9621712010-04-24 17:59:49 +000016025 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16028fi
16029
Matthias Kloseb9621712010-04-24 17:59:49 +000016030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
16031$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016032if test "$ac_cv_stat_tv_nsec" = yes
16033then
16034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016036
16037fi
16038
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016039# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000016040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
16041$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016042if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016043 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016044else
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016046/* end confdefs.h. */
16047#include <sys/stat.h>
16048int
16049main ()
16050{
16051
16052struct stat st;
16053st.st_mtimespec.tv_nsec = 1;
16054
16055 ;
16056 return 0;
16057}
16058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016060 ac_cv_stat_tv_nsec2=yes
16061else
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16065fi
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
16068$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016069if test "$ac_cv_stat_tv_nsec2" = yes
16070then
16071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000016073
16074fi
16075
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016076# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016077ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010016078if test "$cross_compiling" = no; then
16079 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
16080fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016081
16082for ac_header in curses.h ncurses.h
16083do :
16084 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16085ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16086if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16087 cat >>confdefs.h <<_ACEOF
16088#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16089_ACEOF
16090
16091fi
16092
16093done
16094
16095
16096# On Solaris, term.h requires curses.h
16097for ac_header in term.h
16098do :
16099 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16100#ifdef HAVE_CURSES_H
16101#include <curses.h>
16102#endif
16103
16104"
16105if test "x$ac_cv_header_term_h" = xyes; then :
16106 cat >>confdefs.h <<_ACEOF
16107#define HAVE_TERM_H 1
16108_ACEOF
16109
16110fi
16111
16112done
16113
16114
Jack Jansen666b1e72001-10-31 12:11:48 +000016115# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16117$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016118if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016120else
Matthias Kloseb9621712010-04-24 17:59:49 +000016121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016122/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016123#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016124int
16125main ()
16126{
Jack Jansen666b1e72001-10-31 12:11:48 +000016127
16128 int rtn;
16129 rtn = mvwdelch(0,0,0);
16130
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 ;
16132 return 0;
16133}
16134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016135if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016136 ac_cv_mvwdelch_is_expression=yes
16137else
Matthias Kloseb9621712010-04-24 17:59:49 +000016138 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16141fi
16142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16144$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016145
16146if test "$ac_cv_mvwdelch_is_expression" = yes
16147then
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
Matthias Kloseb9621712010-04-24 17:59:49 +000016149$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016150
16151fi
16152
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016153# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16154# structs since version 5.7. If the macro is defined as zero before including
16155# [n]curses.h, ncurses will expose fields of the structs regardless of the
16156# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16158$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016159if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016160 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016161else
Matthias Kloseb9621712010-04-24 17:59:49 +000016162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016163/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016164
16165 #define NCURSES_OPAQUE 0
16166 #include <curses.h>
16167
Martin v. Löwis11437992002-04-12 09:54:03 +000016168int
16169main ()
16170{
Jack Jansen666b1e72001-10-31 12:11:48 +000016171
16172 WINDOW *w;
16173 w->_flags = 0;
16174
Martin v. Löwis11437992002-04-12 09:54:03 +000016175 ;
16176 return 0;
16177}
16178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016179if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016180 ac_cv_window_has_flags=yes
16181else
Matthias Kloseb9621712010-04-24 17:59:49 +000016182 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16185fi
16186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16188$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016189
Jack Jansen666b1e72001-10-31 12:11:48 +000016190
16191if test "$ac_cv_window_has_flags" = yes
16192then
Martin v. Löwis11437992002-04-12 09:54:03 +000016193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016195
16196fi
16197
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16199$as_echo_n "checking for is_pad... " >&6; }
16200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201/* end confdefs.h. */
16202#include <curses.h>
16203int
16204main ()
16205{
16206
16207#ifndef is_pad
16208void *x=is_pad
16209#endif
16210
16211 ;
16212 return 0;
16213}
16214_ACEOF
16215if ac_fn_c_try_compile "$LINENO"; then :
16216
16217$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16218
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16220$as_echo "yes" >&6; }
16221else
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16223$as_echo "no" >&6; }
16224
16225fi
16226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16227
Matthias Kloseb9621712010-04-24 17:59:49 +000016228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16229$as_echo_n "checking for is_term_resized... " >&6; }
16230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016231/* end confdefs.h. */
16232#include <curses.h>
16233int
16234main ()
16235{
16236void *x=is_term_resized
16237 ;
16238 return 0;
16239}
16240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016242
Matthias Kloseb9621712010-04-24 17:59:49 +000016243$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016244
Matthias Kloseb159a552010-04-25 21:00:44 +000016245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016246$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016247else
Matthias Kloseb9621712010-04-24 17:59:49 +000016248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16249$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016250
16251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16253
Matthias Kloseb9621712010-04-24 17:59:49 +000016254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16255$as_echo_n "checking for resize_term... " >&6; }
16256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016257/* end confdefs.h. */
16258#include <curses.h>
16259int
16260main ()
16261{
16262void *x=resize_term
16263 ;
16264 return 0;
16265}
16266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016268
Matthias Kloseb9621712010-04-24 17:59:49 +000016269$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016270
Matthias Kloseb159a552010-04-25 21:00:44 +000016271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016272$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016273else
Matthias Kloseb9621712010-04-24 17:59:49 +000016274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16275$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016276
16277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16279
Matthias Kloseb9621712010-04-24 17:59:49 +000016280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16281$as_echo_n "checking for resizeterm... " >&6; }
16282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016283/* end confdefs.h. */
16284#include <curses.h>
16285int
16286main ()
16287{
16288void *x=resizeterm
16289 ;
16290 return 0;
16291}
16292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016293if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016294
Matthias Kloseb9621712010-04-24 17:59:49 +000016295$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016296
Matthias Kloseb159a552010-04-25 21:00:44 +000016297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016298$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016299else
Matthias Kloseb9621712010-04-24 17:59:49 +000016300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16301$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016302
16303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016305
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16307$as_echo_n "checking for immedok... " >&6; }
16308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16309/* end confdefs.h. */
16310#include <curses.h>
16311int
16312main ()
16313{
16314
16315#ifndef immedok
16316void *x=immedok
16317#endif
16318
16319 ;
16320 return 0;
16321}
16322_ACEOF
16323if ac_fn_c_try_compile "$LINENO"; then :
16324
16325$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16326
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16328$as_echo "yes" >&6; }
16329else
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16331$as_echo "no" >&6; }
16332
16333fi
16334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16335
16336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16337$as_echo_n "checking for syncok... " >&6; }
16338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h. */
16340#include <curses.h>
16341int
16342main ()
16343{
16344
16345#ifndef syncok
16346void *x=syncok
16347#endif
16348
16349 ;
16350 return 0;
16351}
16352_ACEOF
16353if ac_fn_c_try_compile "$LINENO"; then :
16354
16355$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16356
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16358$as_echo "yes" >&6; }
16359else
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16361$as_echo "no" >&6; }
16362
16363fi
16364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16365
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16367$as_echo_n "checking for wchgat... " >&6; }
16368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16369/* end confdefs.h. */
16370#include <curses.h>
16371int
16372main ()
16373{
16374
16375#ifndef wchgat
16376void *x=wchgat
16377#endif
16378
16379 ;
16380 return 0;
16381}
16382_ACEOF
16383if ac_fn_c_try_compile "$LINENO"; then :
16384
16385$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16386
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16388$as_echo "yes" >&6; }
16389else
16390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16391$as_echo "no" >&6; }
16392
16393fi
16394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16395
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16397$as_echo_n "checking for filter... " >&6; }
16398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399/* end confdefs.h. */
16400#include <curses.h>
16401int
16402main ()
16403{
16404
16405#ifndef filter
16406void *x=filter
16407#endif
16408
16409 ;
16410 return 0;
16411}
16412_ACEOF
16413if ac_fn_c_try_compile "$LINENO"; then :
16414
16415$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16416
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16418$as_echo "yes" >&6; }
16419else
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16421$as_echo "no" >&6; }
16422
16423fi
16424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16425
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16427$as_echo_n "checking for has_key... " >&6; }
16428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16429/* end confdefs.h. */
16430#include <curses.h>
16431int
16432main ()
16433{
16434
16435#ifndef has_key
16436void *x=has_key
16437#endif
16438
16439 ;
16440 return 0;
16441}
16442_ACEOF
16443if ac_fn_c_try_compile "$LINENO"; then :
16444
16445$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16446
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16448$as_echo "yes" >&6; }
16449else
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16451$as_echo "no" >&6; }
16452
16453fi
16454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16455
16456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16457$as_echo_n "checking for typeahead... " >&6; }
16458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16459/* end confdefs.h. */
16460#include <curses.h>
16461int
16462main ()
16463{
16464
16465#ifndef typeahead
16466void *x=typeahead
16467#endif
16468
16469 ;
16470 return 0;
16471}
16472_ACEOF
16473if ac_fn_c_try_compile "$LINENO"; then :
16474
16475$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16476
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16478$as_echo "yes" >&6; }
16479else
16480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16481$as_echo "no" >&6; }
16482
16483fi
16484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16485
16486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16487$as_echo_n "checking for use_env... " >&6; }
16488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489/* end confdefs.h. */
16490#include <curses.h>
16491int
16492main ()
16493{
16494
16495#ifndef use_env
16496void *x=use_env
16497#endif
16498
16499 ;
16500 return 0;
16501}
16502_ACEOF
16503if ac_fn_c_try_compile "$LINENO"; then :
16504
16505$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16506
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16508$as_echo "yes" >&6; }
16509else
16510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16511$as_echo "no" >&6; }
16512
16513fi
16514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016515# last curses configure check
16516CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16519$as_echo "$as_me: checking for device files" >&6;}
16520
16521if test "x$cross_compiling" = xyes; then
16522 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16524$as_echo_n "checking for /dev/ptmx... " >&6; }
16525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16526$as_echo "not set" >&6; }
16527 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16528 fi
16529 if test "${ac_cv_file__dev_ptc+set}" != set; then
16530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16531$as_echo_n "checking for /dev/ptc... " >&6; }
16532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16533$as_echo "not set" >&6; }
16534 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16535 fi
16536fi
16537
Matthias Kloseb9621712010-04-24 17:59:49 +000016538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16539$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016540if ${ac_cv_file__dev_ptmx+:} false; then :
16541 $as_echo_n "(cached) " >&6
16542else
16543 test "$cross_compiling" = yes &&
16544 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16545if test -r "/dev/ptmx"; then
16546 ac_cv_file__dev_ptmx=yes
16547else
16548 ac_cv_file__dev_ptmx=no
16549fi
16550fi
16551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16552$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16553if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016554
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016555fi
16556
16557if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016558
Matthias Kloseb9621712010-04-24 17:59:49 +000016559$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016560
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16563$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016564if ${ac_cv_file__dev_ptc+:} false; then :
16565 $as_echo_n "(cached) " >&6
16566else
16567 test "$cross_compiling" = yes &&
16568 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16569if test -r "/dev/ptc"; then
16570 ac_cv_file__dev_ptc=yes
16571else
16572 ac_cv_file__dev_ptc=no
16573fi
16574fi
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16576$as_echo "$ac_cv_file__dev_ptc" >&6; }
16577if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016578
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016579fi
16580
16581if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016582
Matthias Kloseb9621712010-04-24 17:59:49 +000016583$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016584
Neal Norwitz865400f2003-03-21 01:42:58 +000016585fi
16586
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016587if test $ac_sys_system = Darwin
16588then
16589 LIBS="$LIBS -framework CoreFoundation"
16590fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016591
Matthias Kloseb9621712010-04-24 17:59:49 +000016592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16593$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016594if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016595 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016596else
Matthias Kloseb9621712010-04-24 17:59:49 +000016597 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016598 ac_cv_have_size_t_format="cross -- assuming yes"
16599
Thomas Wouters477c8d52006-05-27 19:21:47 +000016600else
Matthias Kloseb9621712010-04-24 17:59:49 +000016601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016602/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016603
Thomas Wouters477c8d52006-05-27 19:21:47 +000016604#include <stdio.h>
16605#include <stddef.h>
16606#include <string.h>
16607
Christian Heimes2c181612007-12-17 20:04:13 +000016608#ifdef HAVE_SYS_TYPES_H
16609#include <sys/types.h>
16610#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016611
16612#ifdef HAVE_SSIZE_T
16613typedef ssize_t Py_ssize_t;
16614#elif SIZEOF_VOID_P == SIZEOF_LONG
16615typedef long Py_ssize_t;
16616#else
16617typedef int Py_ssize_t;
16618#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016619
Christian Heimes2c181612007-12-17 20:04:13 +000016620int main()
16621{
16622 char buffer[256];
16623
Thomas Wouters477c8d52006-05-27 19:21:47 +000016624 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16625 return 1;
16626
Thomas Wouters89f507f2006-12-13 04:49:30 +000016627 if (strcmp(buffer, "123"))
16628 return 1;
16629
16630 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16631 return 1;
16632
16633 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016634 return 1;
16635
16636 return 0;
16637}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016638
Thomas Wouters477c8d52006-05-27 19:21:47 +000016639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016640if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016641 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016642else
Matthias Kloseb9621712010-04-24 17:59:49 +000016643 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16646 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016647fi
16648
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16651$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016652if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016653
Matthias Kloseb9621712010-04-24 17:59:49 +000016654$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016655
16656fi
16657
Matthias Kloseb9621712010-04-24 17:59:49 +000016658ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016659#ifdef HAVE_SYS_TYPES_H
16660#include <sys/types.h>
16661#endif
16662#ifdef HAVE_SYS_SOCKET_H
16663#include <sys/socket.h>
16664#endif
16665
Matthias Kloseb9621712010-04-24 17:59:49 +000016666"
Victor Stinnere0be4232011-10-25 13:06:09 +020016667if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016668
Martin v. Löwis11437992002-04-12 09:54:03 +000016669else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016670
Matthias Kloseb9621712010-04-24 17:59:49 +000016671$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016672
16673fi
16674
Michael W. Hudson54241132001-12-07 15:38:26 +000016675
Matthias Kloseb9621712010-04-24 17:59:49 +000016676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16677$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016678if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016679 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016680else
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016682 ac_cv_broken_mbstowcs=no
16683else
Matthias Kloseb9621712010-04-24 17:59:49 +000016684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016685/* end confdefs.h. */
16686
Stefan Krah19c21392012-11-22 23:47:32 +010016687#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016688#include<stdlib.h>
16689int main() {
16690 size_t len = -1;
16691 const char *str = "text";
16692 len = mbstowcs(NULL, str, 0);
16693 return (len != 4);
16694}
16695
16696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016697if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016698 ac_cv_broken_mbstowcs=no
16699else
Matthias Kloseb9621712010-04-24 17:59:49 +000016700 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016704fi
16705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016706fi
16707
Matthias Kloseb9621712010-04-24 17:59:49 +000016708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16709$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016710if test "$ac_cv_broken_mbstowcs" = yes
16711then
16712
Matthias Kloseb9621712010-04-24 17:59:49 +000016713$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016714
16715fi
16716
Antoine Pitroub52ec782009-01-25 16:34:23 +000016717# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16719$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016720
16721# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016722if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016723 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016724if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016725then
16726
Matthias Kloseb9621712010-04-24 17:59:49 +000016727$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016728
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16730$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016731fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016732if test "$withval" = no
16733then
16734
16735$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16736
Matthias Kloseb9621712010-04-24 17:59:49 +000016737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16738$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016739fi
16740
Antoine Pitrou042b1282010-08-13 21:15:58 +000016741else
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16743$as_echo "no value specified" >&6; }
16744fi
16745
Antoine Pitroub52ec782009-01-25 16:34:23 +000016746
Matthias Kloseb17289e2012-03-15 19:51:34 +010016747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16748$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16749if ${ac_cv_computed_gotos+:} false; then :
16750 $as_echo_n "(cached) " >&6
16751else
16752 if test "$cross_compiling" = yes; then :
16753 if test "${with_computed_gotos+set}" = set; then
16754 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16755 else
16756 ac_cv_computed_gotos=no
16757 fi
16758else
16759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16760/* end confdefs.h. */
16761
16762int main(int argc, char **argv)
16763{
16764 static void *targets[1] = { &&LABEL1 };
16765 goto LABEL2;
16766LABEL1:
16767 return 0;
16768LABEL2:
16769 goto *targets[0];
16770 return 1;
16771}
16772
16773_ACEOF
16774if ac_fn_c_try_run "$LINENO"; then :
16775 ac_cv_computed_gotos=yes
16776else
16777 ac_cv_computed_gotos=no
16778fi
16779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16780 conftest.$ac_objext conftest.beam conftest.$ac_ext
16781fi
16782
16783fi
16784
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16786$as_echo "$ac_cv_computed_gotos" >&6; }
16787case "$ac_cv_computed_gotos" in yes*)
16788
16789$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16790
16791esac
16792
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016793case $ac_sys_system in
16794AIX*)
16795
16796$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16797 ;;
16798esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016799
Michael W. Hudson54241132001-12-07 15:38:26 +000016800
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016801
16802
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016803for h in `(cd $srcdir;echo Python/thread_*.h)`
16804do
16805 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16806done
16807
Michael W. Hudson54241132001-12-07 15:38:26 +000016808
Pablo Galindoa25f3c42020-04-23 01:38:11 +010016809SRCDIRS="Parser Parser/pegen Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16811$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016812for dir in $SRCDIRS; do
16813 if test ! -d $dir; then
16814 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016815 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016816done
Matthias Kloseb9621712010-04-24 17:59:49 +000016817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16818$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016819
Stefan Krah1919b7e2012-03-21 18:25:23 +010016820# Availability of -O2:
16821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16822$as_echo_n "checking for -O2... " >&6; }
16823saved_cflags="$CFLAGS"
16824CFLAGS="-O2"
16825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16826/* end confdefs.h. */
16827
16828int
16829main ()
16830{
16831
16832
16833 ;
16834 return 0;
16835}
16836_ACEOF
16837if ac_fn_c_try_compile "$LINENO"; then :
16838 have_O2=yes
16839else
16840 have_O2=no
16841fi
16842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16844$as_echo "$have_O2" >&6; }
16845CFLAGS="$saved_cflags"
16846
16847# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16848# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16850$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16851saved_cflags="$CFLAGS"
16852CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16853if test "$have_O2" = no; then
16854 CFLAGS=""
16855fi
16856if test "$cross_compiling" = yes; then :
16857 have_glibc_memmove_bug=undefined
16858else
16859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16860/* end confdefs.h. */
16861
16862#include <stdio.h>
16863#include <stdlib.h>
16864#include <string.h>
16865void foo(void *p, void *q) { memmove(p, q, 19); }
16866int main() {
16867 char a[32] = "123456789000000000";
16868 foo(&a[9], a);
16869 if (strcmp(a, "123456789123456789000000000") != 0)
16870 return 1;
16871 foo(a, &a[9]);
16872 if (strcmp(a, "123456789000000000") != 0)
16873 return 1;
16874 return 0;
16875}
16876
16877_ACEOF
16878if ac_fn_c_try_run "$LINENO"; then :
16879 have_glibc_memmove_bug=no
16880else
16881 have_glibc_memmove_bug=yes
16882fi
16883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16884 conftest.$ac_objext conftest.beam conftest.$ac_ext
16885fi
16886
16887CFLAGS="$saved_cflags"
16888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16889$as_echo "$have_glibc_memmove_bug" >&6; }
16890if test "$have_glibc_memmove_bug" = yes; then
16891
16892$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16893
16894fi
16895
16896if test "$have_gcc_asm_for_x87" = yes; then
16897 # Some versions of gcc miscompile inline asm:
16898 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16899 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16900 case $CC in
16901 *gcc*)
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16903$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16904 saved_cflags="$CFLAGS"
16905 CFLAGS="-O2"
16906 if test "$cross_compiling" = yes; then :
16907 have_ipa_pure_const_bug=undefined
16908else
16909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16910/* end confdefs.h. */
16911
16912 __attribute__((noinline)) int
16913 foo(int *p) {
16914 int r;
16915 asm ( "movl \$6, (%1)\n\t"
16916 "xorl %0, %0\n\t"
16917 : "=r" (r) : "r" (p) : "memory"
16918 );
16919 return r;
16920 }
16921 int main() {
16922 int p = 8;
16923 if ((foo(&p) ? : p) != 6)
16924 return 1;
16925 return 0;
16926 }
16927
16928_ACEOF
16929if ac_fn_c_try_run "$LINENO"; then :
16930 have_ipa_pure_const_bug=no
16931else
16932 have_ipa_pure_const_bug=yes
16933fi
16934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16935 conftest.$ac_objext conftest.beam conftest.$ac_ext
16936fi
16937
16938 CFLAGS="$saved_cflags"
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16940$as_echo "$have_ipa_pure_const_bug" >&6; }
16941 if test "$have_ipa_pure_const_bug" = yes; then
16942
16943$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16944
16945 fi
16946 ;;
16947 esac
16948fi
16949
Victor Stinner4f5366e2015-01-09 02:13:19 +010016950# Check for stdatomic.h
16951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16952$as_echo_n "checking for stdatomic.h... " >&6; }
16953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16954/* end confdefs.h. */
16955
16956
16957 #include <stdatomic.h>
Victor Stinner028f7342019-10-22 21:53:50 +020016958 atomic_int int_var;
16959 atomic_uintptr_t uintptr_var;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016960 int main() {
Victor Stinner028f7342019-10-22 21:53:50 +020016961 atomic_store_explicit(&int_var, 5, memory_order_relaxed);
16962 atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed);
16963 int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016964 return 0;
16965 }
16966
16967
16968_ACEOF
16969if ac_fn_c_try_link "$LINENO"; then :
16970 have_stdatomic_h=yes
16971else
16972 have_stdatomic_h=no
16973fi
16974rm -f core conftest.err conftest.$ac_objext \
16975 conftest$ac_exeext conftest.$ac_ext
16976
16977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16978$as_echo "$have_stdatomic_h" >&6; }
16979
16980if test "$have_stdatomic_h" = yes; then
16981
16982$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16983
16984fi
16985
16986# Check for GCC >= 4.7 __atomic builtins
16987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16988$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16990/* end confdefs.h. */
16991
16992
16993 volatile int val = 1;
16994 int main() {
16995 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16996 return 0;
16997 }
16998
16999
17000_ACEOF
17001if ac_fn_c_try_link "$LINENO"; then :
17002 have_builtin_atomic=yes
17003else
17004 have_builtin_atomic=no
17005fi
17006rm -f core conftest.err conftest.$ac_objext \
17007 conftest$ac_exeext conftest.$ac_ext
17008
17009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
17010$as_echo "$have_builtin_atomic" >&6; }
17011
17012if test "$have_builtin_atomic" = yes; then
17013
17014$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
17015
17016fi
17017
Ned Deily322f5ba2013-11-21 23:01:59 -080017018# ensurepip option
17019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
17020$as_echo_n "checking for ensurepip... " >&6; }
17021
17022# Check whether --with-ensurepip was given.
17023if test "${with_ensurepip+set}" = set; then :
17024 withval=$with_ensurepip;
17025else
17026 with_ensurepip=upgrade
17027fi
17028
17029case $with_ensurepip in #(
17030 yes|upgrade) :
17031 ENSUREPIP=upgrade ;; #(
17032 install) :
17033 ENSUREPIP=install ;; #(
17034 no) :
17035 ENSUREPIP=no ;; #(
17036 *) :
17037 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
17038esac
17039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
17040$as_echo "$ENSUREPIP" >&6; }
17041
17042
Victor Stinner35a97c02015-03-08 02:59:09 +010017043# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
17044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
17045$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
17046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17047/* end confdefs.h. */
17048
17049
17050 #include <dirent.h>
17051
17052 int main() {
17053 struct dirent entry;
17054 return entry.d_type == DT_UNKNOWN;
17055 }
17056
17057
17058_ACEOF
17059if ac_fn_c_try_link "$LINENO"; then :
17060 have_dirent_d_type=yes
17061else
17062 have_dirent_d_type=no
17063fi
17064rm -f core conftest.err conftest.$ac_objext \
17065 conftest$ac_exeext conftest.$ac_ext
17066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
17067$as_echo "$have_dirent_d_type" >&6; }
17068
17069if test "$have_dirent_d_type" = yes; then
17070
17071$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
17072
17073fi
17074
Victor Stinner9eb57c52015-03-19 22:21:49 +010017075# check if the Linux getrandom() syscall is available
17076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
17077$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
17078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17079/* end confdefs.h. */
17080
17081
Victor Stinner1b80b242016-04-12 22:34:58 +020017082 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017083 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017084 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017085
17086 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017087 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017088 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017089 const int flags = GRND_NONBLOCK;
17090 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017091 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017092 return 0;
17093 }
17094
17095
17096_ACEOF
17097if ac_fn_c_try_link "$LINENO"; then :
17098 have_getrandom_syscall=yes
17099else
17100 have_getrandom_syscall=no
17101fi
17102rm -f core conftest.err conftest.$ac_objext \
17103 conftest$ac_exeext conftest.$ac_ext
17104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17105$as_echo "$have_getrandom_syscall" >&6; }
17106
17107if test "$have_getrandom_syscall" = yes; then
17108
17109$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17110
17111fi
17112
Victor Stinner3abf44e2015-09-18 15:38:37 +020017113# check if the getrandom() function is available
17114# the test was written for the Solaris function of <sys/random.h>
17115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17116$as_echo_n "checking for the getrandom() function... " >&6; }
17117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17118/* end confdefs.h. */
17119
17120
17121 #include <sys/random.h>
17122
17123 int main() {
17124 char buffer[1];
17125 const size_t buflen = sizeof(buffer);
17126 const int flags = 0;
17127 /* ignore the result, Python checks for ENOSYS at runtime */
17128 (void)getrandom(buffer, buflen, flags);
17129 return 0;
17130 }
17131
17132
17133_ACEOF
17134if ac_fn_c_try_link "$LINENO"; then :
17135 have_getrandom=yes
17136else
17137 have_getrandom=no
17138fi
17139rm -f core conftest.err conftest.$ac_objext \
17140 conftest$ac_exeext conftest.$ac_ext
17141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17142$as_echo "$have_getrandom" >&6; }
17143
17144if test "$have_getrandom" = yes; then
17145
17146$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17147
17148fi
17149
Neil Schemenauer5741c452019-02-08 10:48:46 -080017150# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
17151# shm_* may only be available if linking against librt
17152save_LIBS="$LIBS"
17153save_includes_default="$ac_includes_default"
17154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
17155$as_echo_n "checking for library containing shm_open... " >&6; }
17156if ${ac_cv_search_shm_open+:} false; then :
17157 $as_echo_n "(cached) " >&6
17158else
17159 ac_func_search_save_LIBS=$LIBS
17160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17161/* end confdefs.h. */
17162
17163/* Override any GCC internal prototype to avoid an error.
17164 Use char because int might match the return type of a GCC
17165 builtin and then its argument prototype would still apply. */
17166#ifdef __cplusplus
17167extern "C"
17168#endif
17169char shm_open ();
17170int
17171main ()
17172{
17173return shm_open ();
17174 ;
17175 return 0;
17176}
17177_ACEOF
17178for ac_lib in '' rt; do
17179 if test -z "$ac_lib"; then
17180 ac_res="none required"
17181 else
17182 ac_res=-l$ac_lib
17183 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17184 fi
17185 if ac_fn_c_try_link "$LINENO"; then :
17186 ac_cv_search_shm_open=$ac_res
17187fi
17188rm -f core conftest.err conftest.$ac_objext \
17189 conftest$ac_exeext
17190 if ${ac_cv_search_shm_open+:} false; then :
17191 break
17192fi
17193done
17194if ${ac_cv_search_shm_open+:} false; then :
17195
17196else
17197 ac_cv_search_shm_open=no
17198fi
17199rm conftest.$ac_ext
17200LIBS=$ac_func_search_save_LIBS
17201fi
17202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17203$as_echo "$ac_cv_search_shm_open" >&6; }
17204ac_res=$ac_cv_search_shm_open
17205if test "$ac_res" != no; then :
17206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17207
17208fi
17209
17210if test "$ac_cv_search_shm_open" = "-lrt"; then
17211
17212$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17213
17214fi
17215for ac_header in sys/mman.h
17216do :
17217 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17218if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17219 cat >>confdefs.h <<_ACEOF
17220#define HAVE_SYS_MMAN_H 1
17221_ACEOF
17222
17223fi
17224
17225done
17226
17227# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17228ac_includes_default="\
17229${ac_includes_default}
17230#ifndef __cplusplus
17231# ifdef HAVE_SYS_MMAN_H
17232# include <sys/mman.h>
17233# endif
17234#endif
17235"
17236for ac_func in shm_open shm_unlink
17237do :
17238 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17239ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17240if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17241 cat >>confdefs.h <<_ACEOF
17242#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17243_ACEOF
17244
17245fi
17246done
17247
17248# we don't want to link with librt always, restore LIBS
17249LIBS="$save_LIBS"
17250ac_includes_default="$save_includes_default"
17251
Christian Heimesff5be6e2018-01-20 13:19:21 +010017252# Check for usable OpenSSL
17253
17254 found=false
17255
17256# Check whether --with-openssl was given.
17257if test "${with_openssl+set}" = set; then :
17258 withval=$with_openssl;
17259 case "$withval" in
17260 "" | y | ye | yes | n | no)
17261 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17262 ;;
17263 *) ssldirs="$withval"
17264 ;;
17265 esac
17266
17267else
17268
17269 # if pkg-config is installed and openssl has installed a .pc file,
17270 # then use that information and don't search ssldirs
17271 if test -n "$ac_tool_prefix"; then
17272 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17273set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17275$as_echo_n "checking for $ac_word... " >&6; }
17276if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17277 $as_echo_n "(cached) " >&6
17278else
17279 if test -n "$PKG_CONFIG"; then
17280 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17281else
17282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17283for as_dir in $PATH
17284do
17285 IFS=$as_save_IFS
17286 test -z "$as_dir" && as_dir=.
17287 for ac_exec_ext in '' $ac_executable_extensions; do
17288 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17289 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17290 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17291 break 2
17292 fi
17293done
17294 done
17295IFS=$as_save_IFS
17296
17297fi
17298fi
17299PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17300if test -n "$PKG_CONFIG"; then
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17302$as_echo "$PKG_CONFIG" >&6; }
17303else
17304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17305$as_echo "no" >&6; }
17306fi
17307
17308
17309fi
17310if test -z "$ac_cv_prog_PKG_CONFIG"; then
17311 ac_ct_PKG_CONFIG=$PKG_CONFIG
17312 # Extract the first word of "pkg-config", so it can be a program name with args.
17313set dummy pkg-config; ac_word=$2
17314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17315$as_echo_n "checking for $ac_word... " >&6; }
17316if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17317 $as_echo_n "(cached) " >&6
17318else
17319 if test -n "$ac_ct_PKG_CONFIG"; then
17320 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17321else
17322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17323for as_dir in $PATH
17324do
17325 IFS=$as_save_IFS
17326 test -z "$as_dir" && as_dir=.
17327 for ac_exec_ext in '' $ac_executable_extensions; do
17328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17329 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17331 break 2
17332 fi
17333done
17334 done
17335IFS=$as_save_IFS
17336
17337fi
17338fi
17339ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17340if test -n "$ac_ct_PKG_CONFIG"; then
17341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17342$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17343else
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17345$as_echo "no" >&6; }
17346fi
17347
17348 if test "x$ac_ct_PKG_CONFIG" = x; then
17349 PKG_CONFIG=""
17350 else
17351 case $cross_compiling:$ac_tool_warned in
17352yes:)
17353{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17354$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17355ac_tool_warned=yes ;;
17356esac
17357 PKG_CONFIG=$ac_ct_PKG_CONFIG
17358 fi
17359else
17360 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17361fi
17362
17363 if test x"$PKG_CONFIG" != x""; then
17364 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17365 if test $? = 0; then
17366 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17367 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17368 found=true
17369 fi
17370 fi
17371
17372 # no such luck; use some default ssldirs
17373 if ! $found; then
17374 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17375 fi
17376
17377
17378fi
17379
17380
17381
17382 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17383 # an 'openssl' subdirectory
17384
17385 if ! $found; then
17386 OPENSSL_INCLUDES=
17387 for ssldir in $ssldirs; do
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17389$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17390 if test -f "$ssldir/include/openssl/ssl.h"; then
17391 OPENSSL_INCLUDES="-I$ssldir/include"
17392 OPENSSL_LDFLAGS="-L$ssldir/lib"
17393 OPENSSL_LIBS="-lssl -lcrypto"
17394 found=true
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17396$as_echo "yes" >&6; }
17397 break
17398 else
17399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17400$as_echo "no" >&6; }
17401 fi
17402 done
17403
17404 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17405 # it will just work!
17406 fi
17407
17408 # try the preprocessor and linker with our new flags,
17409 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17410
17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17412$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17413 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17414 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17415
17416 save_LIBS="$LIBS"
17417 save_LDFLAGS="$LDFLAGS"
17418 save_CPPFLAGS="$CPPFLAGS"
17419 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17420 LIBS="$OPENSSL_LIBS $LIBS"
17421 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17423/* end confdefs.h. */
17424#include <openssl/ssl.h>
17425int
17426main ()
17427{
17428SSL_new(NULL)
17429 ;
17430 return 0;
17431}
17432_ACEOF
17433if ac_fn_c_try_link "$LINENO"; then :
17434
17435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17436$as_echo "yes" >&6; }
17437 have_openssl=yes
17438
17439else
17440
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17442$as_echo "no" >&6; }
17443 have_openssl=no
17444
17445fi
17446rm -f core conftest.err conftest.$ac_objext \
17447 conftest$ac_exeext conftest.$ac_ext
17448 CPPFLAGS="$save_CPPFLAGS"
17449 LDFLAGS="$save_LDFLAGS"
17450 LIBS="$save_LIBS"
17451
17452
17453
17454
17455
17456
17457if test "$have_openssl" = yes; then
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17459$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17460
17461 save_LIBS="$LIBS"
17462 save_LDFLAGS="$LDFLAGS"
17463 save_CPPFLAGS="$CPPFLAGS"
17464 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17465 LIBS="$OPENSSL_LIBS $LIBS"
17466 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17467
17468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17469/* end confdefs.h. */
17470
17471 #include <openssl/x509_vfy.h>
17472
17473int
17474main ()
17475{
17476
17477 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17478 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17479 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17480 X509_VERIFY_PARAM_set_hostflags(p, 0);
17481
17482 ;
17483 return 0;
17484}
17485
17486_ACEOF
17487if ac_fn_c_try_link "$LINENO"; then :
17488
17489 ac_cv_has_x509_verify_param_set1_host=yes
17490
17491else
17492
17493 ac_cv_has_x509_verify_param_set1_host=no
17494
17495fi
17496rm -f core conftest.err conftest.$ac_objext \
17497 conftest$ac_exeext conftest.$ac_ext
17498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17499$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17500 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17501
17502$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17503
17504 fi
17505
17506 CPPFLAGS="$save_CPPFLAGS"
17507 LDFLAGS="$save_LDFLAGS"
17508 LIBS="$save_LIBS"
17509fi
17510
Christian Heimes892d66e2018-01-29 14:10:18 +010017511# ssl module default cipher suite string
17512
17513
17514
17515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17516$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17517
17518# Check whether --with-ssl-default-suites was given.
17519if test "${with_ssl_default_suites+set}" = set; then :
17520 withval=$with_ssl_default_suites;
17521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17522$as_echo "$withval" >&6; }
17523case "$withval" in
17524 python)
17525 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17526
17527 ;;
17528 openssl)
17529 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17530
17531 ;;
17532 *)
17533 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17534
17535 cat >>confdefs.h <<_ACEOF
17536#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17537_ACEOF
17538
17539 ;;
17540esac
17541
17542else
17543
17544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17545$as_echo "python" >&6; }
17546$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17547
17548
17549fi
17550
17551
Christian Heimes9b60e552020-05-15 23:54:53 +020017552# builtin hash modules
17553default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2"
17554
17555$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h
17556
17557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5
17558$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; }
17559
17560# Check whether --with-builtin-hashlib-hashes was given.
17561if test "${with_builtin_hashlib_hashes+set}" = set; then :
17562 withval=$with_builtin_hashlib_hashes;
17563case "$withval" in
17564 yes)
17565 withval=$default_hashlib_hashes
17566 ;;
17567 no)
17568 withval=""
17569 ;;
17570esac
17571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17572$as_echo "$withval" >&6; }
17573cat >>confdefs.h <<_ACEOF
17574#define PY_BUILTIN_HASHLIB_HASHES "$withval"
17575_ACEOF
17576
17577
17578else
17579
17580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5
17581$as_echo "$default_hashlib_hashes" >&6; };
17582cat >>confdefs.h <<_ACEOF
17583#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes"
17584_ACEOF
17585
17586
17587fi
17588
17589
Victor Stinnerc5fa3642020-05-05 16:41:11 +020017590# --with-experimental-isolated-subinterpreters
17591
17592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5
17593$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; }
17594
17595# Check whether --with-experimental-isolated-subinterpreters was given.
17596if test "${with_experimental_isolated_subinterpreters+set}" = set; then :
17597 withval=$with_experimental_isolated_subinterpreters;
17598if test "$withval" != no
17599then
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17601$as_echo "yes" >&6; };
17602 $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h
17603
17604else
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17606$as_echo "no" >&6; };
17607fi
17608else
17609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17610$as_echo "no" >&6; }
17611fi
17612
17613
Christian Heimes892d66e2018-01-29 14:10:18 +010017614
Guido van Rossum627b2d71993-12-24 10:39:16 +000017615# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017616ac_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 +000017617
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017618ac_config_files="$ac_config_files Modules/ld_so_aix"
17619
Martin v. Löwis11437992002-04-12 09:54:03 +000017620cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017621# This file is a shell script that caches the results of configure
17622# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017623# scripts and configure runs, see configure's option --config-cache.
17624# It is not useful on other systems. If it contains results you don't
17625# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017626#
Martin v. Löwis11437992002-04-12 09:54:03 +000017627# config.status only pays attention to the cache file if you give it
17628# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017629#
Skip Montanaro6dead952003-09-25 14:50:04 +000017630# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017631# loading this file, other *unset* `ac_cv_foo' will be assigned the
17632# following values.
17633
17634_ACEOF
17635
Guido van Rossumf78abae1997-01-21 22:02:36 +000017636# The following way of writing the cache mishandles newlines in values,
17637# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017639# Ultrix sh set writes to stderr and can't be redirected directly,
17640# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641(
17642 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17643 eval ac_val=\$$ac_var
17644 case $ac_val in #(
17645 *${as_nl}*)
17646 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017647 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17648$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649 esac
17650 case $ac_var in #(
17651 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017652 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17653 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 esac ;;
17655 esac
17656 done
17657
Martin v. Löwis11437992002-04-12 09:54:03 +000017658 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17660 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017661 # `set' does not quote correctly, so add quotes: double-quote
17662 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017664 "s/'/'\\\\''/g;
17665 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017667 *)
17668 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017670 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 esac |
17672 sort
17673) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17679 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17681 :end' >>confcache
17682if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17683 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017684 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017685 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17686$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017687 if test ! -f "$cache_file" || test -h "$cache_file"; then
17688 cat confcache >"$cache_file"
17689 else
17690 case $cache_file in #(
17691 */* | ?:*)
17692 mv -f confcache "$cache_file"$$ &&
17693 mv -f "$cache_file"$$ "$cache_file" ;; #(
17694 *)
17695 mv -f confcache "$cache_file" ;;
17696 esac
17697 fi
17698 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017699 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017700 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17701$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017702 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017703fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017704rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017705
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017706test "x$prefix" = xNONE && prefix=$ac_default_prefix
17707# Let make expand exec_prefix.
17708test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017709
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017710DEFS=-DHAVE_CONFIG_H
17711
Skip Montanaro6dead952003-09-25 14:50:04 +000017712ac_libobjs=
17713ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017714U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017715for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17716 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17720 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17722 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017723done
17724LIBOBJS=$ac_libobjs
17725
17726LTLIBOBJS=$ac_ltlibobjs
17727
17728
Martin v. Löwis11437992002-04-12 09:54:03 +000017729
Matthias Kloseb9621712010-04-24 17:59:49 +000017730
Victor Stinnere0be4232011-10-25 13:06:09 +020017731: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017732ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017733ac_clean_files_save=$ac_clean_files
17734ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017735{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17736$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17737as_write_fail=0
17738cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017739#! $SHELL
17740# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017741# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017742# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017743# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017744
Martin v. Löwis11437992002-04-12 09:54:03 +000017745debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017746ac_cs_recheck=false
17747ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017748
Matthias Kloseb9621712010-04-24 17:59:49 +000017749SHELL=\${CONFIG_SHELL-$SHELL}
17750export SHELL
17751_ASEOF
17752cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17753## -------------------- ##
17754## M4sh Initialization. ##
17755## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757# Be more Bourne compatible
17758DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017759if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 emulate sh
17761 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017763 # is contrary to our usage. Disable this feature.
17764 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017766else
Matthias Kloseb9621712010-04-24 17:59:49 +000017767 case `(set -o) 2>/dev/null` in #(
17768 *posix*) :
17769 set -o posix ;; #(
17770 *) :
17771 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017773fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017774
17775
Matthias Kloseb9621712010-04-24 17:59:49 +000017776as_nl='
17777'
17778export as_nl
17779# Printing a long string crashes Solaris 7 /usr/bin/printf.
17780as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17781as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17782as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17783# Prefer a ksh shell builtin over an external printf program on Solaris,
17784# but without wasting forks for bash or zsh.
17785if test -z "$BASH_VERSION$ZSH_VERSION" \
17786 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17787 as_echo='print -r --'
17788 as_echo_n='print -rn --'
17789elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17790 as_echo='printf %s\n'
17791 as_echo_n='printf %s'
17792else
17793 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17794 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17795 as_echo_n='/usr/ucb/echo -n'
17796 else
17797 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17798 as_echo_n_body='eval
17799 arg=$1;
17800 case $arg in #(
17801 *"$as_nl"*)
17802 expr "X$arg" : "X\\(.*\\)$as_nl";
17803 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17804 esac;
17805 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17806 '
17807 export as_echo_n_body
17808 as_echo_n='sh -c $as_echo_n_body as_echo'
17809 fi
17810 export as_echo_body
17811 as_echo='sh -c $as_echo_body as_echo'
17812fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017813
17814# The user is always right.
17815if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017816 PATH_SEPARATOR=:
17817 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17818 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17819 PATH_SEPARATOR=';'
17820 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823
17824# IFS
17825# We need space, tab and new line, in precisely that order. Quoting is
17826# there to prevent editors from complaining about space-tab.
17827# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17828# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829IFS=" "" $as_nl"
17830
17831# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017832as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017833case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834 *[\\/]* ) as_myself=$0 ;;
17835 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017836for as_dir in $PATH
17837do
17838 IFS=$as_save_IFS
17839 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017840 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844 ;;
17845esac
17846# We did not find ourselves, most probably we were run as `sh COMMAND'
17847# in which case we are not to be found in the path.
17848if test "x$as_myself" = x; then
17849 as_myself=$0
17850fi
17851if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017852 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17853 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854fi
17855
Matthias Kloseb9621712010-04-24 17:59:49 +000017856# Unset variables that we do not need and which cause bugs (e.g. in
17857# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17858# suppresses any "Segmentation fault" message there. '((' could
17859# trigger a bug in pdksh 5.2.14.
17860for as_var in BASH_ENV ENV MAIL MAILPATH
17861do eval test x\${$as_var+set} = xset \
17862 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863done
17864PS1='$ '
17865PS2='> '
17866PS4='+ '
17867
17868# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017869LC_ALL=C
17870export LC_ALL
17871LANGUAGE=C
17872export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873
Matthias Kloseb9621712010-04-24 17:59:49 +000017874# CDPATH.
17875(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17876
17877
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017878# as_fn_error STATUS ERROR [LINENO LOG_FD]
17879# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017880# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17881# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017882# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017883as_fn_error ()
17884{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017885 as_status=$1; test $as_status -eq 0 && as_status=1
17886 if test "$4"; then
17887 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17888 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017889 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017890 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017891 as_fn_exit $as_status
17892} # as_fn_error
17893
17894
17895# as_fn_set_status STATUS
17896# -----------------------
17897# Set $? to STATUS, without forking.
17898as_fn_set_status ()
17899{
17900 return $1
17901} # as_fn_set_status
17902
17903# as_fn_exit STATUS
17904# -----------------
17905# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17906as_fn_exit ()
17907{
17908 set +e
17909 as_fn_set_status $1
17910 exit $1
17911} # as_fn_exit
17912
17913# as_fn_unset VAR
17914# ---------------
17915# Portably unset VAR.
17916as_fn_unset ()
17917{
17918 { eval $1=; unset $1;}
17919}
17920as_unset=as_fn_unset
17921# as_fn_append VAR VALUE
17922# ----------------------
17923# Append the text in VALUE to the end of the definition contained in VAR. Take
17924# advantage of any shell optimizations that allow amortized linear growth over
17925# repeated appends, instead of the typical quadratic growth present in naive
17926# implementations.
17927if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17928 eval 'as_fn_append ()
17929 {
17930 eval $1+=\$2
17931 }'
17932else
17933 as_fn_append ()
17934 {
17935 eval $1=\$$1\$2
17936 }
17937fi # as_fn_append
17938
17939# as_fn_arith ARG...
17940# ------------------
17941# Perform arithmetic evaluation on the ARGs, and store the result in the
17942# global $as_val. Take advantage of shells that can avoid forks. The arguments
17943# must be portable across $(()) and expr.
17944if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17945 eval 'as_fn_arith ()
17946 {
17947 as_val=$(( $* ))
17948 }'
17949else
17950 as_fn_arith ()
17951 {
17952 as_val=`expr "$@" || test $? -eq 1`
17953 }
17954fi # as_fn_arith
17955
17956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957if expr a : '\(a\)' >/dev/null 2>&1 &&
17958 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17959 as_expr=expr
17960else
17961 as_expr=false
17962fi
17963
17964if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17965 as_basename=basename
17966else
17967 as_basename=false
17968fi
17969
Matthias Kloseb9621712010-04-24 17:59:49 +000017970if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17971 as_dirname=dirname
17972else
17973 as_dirname=false
17974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017976as_me=`$as_basename -- "$0" ||
17977$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17978 X"$0" : 'X\(//\)$' \| \
17979 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017980$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 sed '/^.*\/\([^/][^/]*\)\/*$/{
17982 s//\1/
17983 q
17984 }
17985 /^X\/\(\/\/\)$/{
17986 s//\1/
17987 q
17988 }
17989 /^X\/\(\/\).*/{
17990 s//\1/
17991 q
17992 }
17993 s/.*/./; q'`
17994
Matthias Kloseb9621712010-04-24 17:59:49 +000017995# Avoid depending upon Character Ranges.
17996as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17997as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17998as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17999as_cr_digits='0123456789'
18000as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001
18002ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000018003case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018005 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000018007 xy) ECHO_C='\c';;
18008 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
18009 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010 esac;;
18011*)
18012 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000018013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018014
Martin v. Löwis11437992002-04-12 09:54:03 +000018015rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016if test -d conf$$.dir; then
18017 rm -f conf$$.dir/conf$$.file
18018else
18019 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000018020 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018022if (echo >conf$$.file) 2>/dev/null; then
18023 if ln -s conf$$.file conf$$ 2>/dev/null; then
18024 as_ln_s='ln -s'
18025 # ... but there are two gotchas:
18026 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18027 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018028 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000018029 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018030 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018031 elif ln conf$$.file conf$$ 2>/dev/null; then
18032 as_ln_s=ln
18033 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018034 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000018035 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018036else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018037 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000018038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18040rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000018041
Matthias Kloseb9621712010-04-24 17:59:49 +000018042
18043# as_fn_mkdir_p
18044# -------------
18045# Create "$as_dir" as a directory, including parents if necessary.
18046as_fn_mkdir_p ()
18047{
18048
18049 case $as_dir in #(
18050 -*) as_dir=./$as_dir;;
18051 esac
18052 test -d "$as_dir" || eval $as_mkdir_p || {
18053 as_dirs=
18054 while :; do
18055 case $as_dir in #(
18056 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18057 *) as_qdir=$as_dir;;
18058 esac
18059 as_dirs="'$as_qdir' $as_dirs"
18060 as_dir=`$as_dirname -- "$as_dir" ||
18061$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18062 X"$as_dir" : 'X\(//\)[^/]' \| \
18063 X"$as_dir" : 'X\(//\)$' \| \
18064 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18065$as_echo X"$as_dir" |
18066 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18067 s//\1/
18068 q
18069 }
18070 /^X\(\/\/\)[^/].*/{
18071 s//\1/
18072 q
18073 }
18074 /^X\(\/\/\)$/{
18075 s//\1/
18076 q
18077 }
18078 /^X\(\/\).*/{
18079 s//\1/
18080 q
18081 }
18082 s/.*/./; q'`
18083 test -d "$as_dir" && break
18084 done
18085 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018086 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000018087
18088
18089} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000018090if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018091 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000018092else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018093 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000018094 as_mkdir_p=false
18095fi
18096
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018097
18098# as_fn_executable_p FILE
18099# -----------------------
18100# Test if FILE is an executable regular file.
18101as_fn_executable_p ()
18102{
18103 test -f "$1" && test -x "$1"
18104} # as_fn_executable_p
18105as_test_x='test -x'
18106as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018107
18108# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018109as_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 +000018110
18111# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000018112as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018113
18114
Martin v. Löwis11437992002-04-12 09:54:03 +000018115exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000018116## ----------------------------------- ##
18117## Main body of $CONFIG_STATUS script. ##
18118## ----------------------------------- ##
18119_ASEOF
18120test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018121
Matthias Kloseb9621712010-04-24 17:59:49 +000018122cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18123# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000018124# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125# values after options handling.
18126ac_log="
Pablo Galindod4fe0982020-05-19 03:33:01 +010018127This file was extended by python $as_me 3.10, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018128generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018129
18130 CONFIG_FILES = $CONFIG_FILES
18131 CONFIG_HEADERS = $CONFIG_HEADERS
18132 CONFIG_LINKS = $CONFIG_LINKS
18133 CONFIG_COMMANDS = $CONFIG_COMMANDS
18134 $ $0 $@
18135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136on `(hostname || uname -n) 2>/dev/null | sed 1q`
18137"
18138
Martin v. Löwis11437992002-04-12 09:54:03 +000018139_ACEOF
18140
Matthias Kloseb9621712010-04-24 17:59:49 +000018141case $ac_config_files in *"
18142"*) set x $ac_config_files; shift; ac_config_files=$*;;
18143esac
18144
18145case $ac_config_headers in *"
18146"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18147esac
18148
18149
18150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018151# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010018152config_files="$ac_config_files"
18153config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000018154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018155_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018156
Matthias Kloseb9621712010-04-24 17:59:49 +000018157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018158ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000018159\`$as_me' instantiates files and other configuration actions
18160from templates according to the current configuration. Unless the files
18161and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000018162
Matthias Kloseb9621712010-04-24 17:59:49 +000018163Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000018164
18165 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000018167 --config print configuration, then exit
18168 -q, --quiet, --silent
18169 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018170 -d, --debug don't remove temporary files
18171 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000018172 --file=FILE[:TEMPLATE]
18173 instantiate the configuration file FILE
18174 --header=FILE[:TEMPLATE]
18175 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
18177Configuration files:
18178$config_files
18179
18180Configuration headers:
18181$config_headers
18182
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070018183Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018186cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18187ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000018188ac_cs_version="\\
Pablo Galindod4fe0982020-05-19 03:33:01 +010018189python config.status 3.10
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018190configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000018191 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000018192
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018193Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018194This config.status script is free software; the Free Software Foundation
18195gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196
18197ac_pwd='$ac_pwd'
18198srcdir='$srcdir'
18199INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010018200MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000018201test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000018202_ACEOF
18203
Matthias Kloseb9621712010-04-24 17:59:49 +000018204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18205# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000018206ac_need_defaults=:
18207while test $# != 0
18208do
18209 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018210 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18212 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018213 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018215 --*=)
18216 ac_option=`expr "X$1" : 'X\([^=]*\)='`
18217 ac_optarg=
18218 ac_shift=:
18219 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000018221 ac_option=$1
18222 ac_optarg=$2
18223 ac_shift=shift
18224 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 esac
18226
Skip Montanaro6dead952003-09-25 14:50:04 +000018227 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018228 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000018229 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18230 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 $as_echo "$ac_cs_version"; exit ;;
18233 --config | --confi | --conf | --con | --co | --c )
18234 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000018236 debug=: ;;
18237 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018238 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018239 case $ac_optarg in
18240 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018241 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018242 esac
18243 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018244 ac_need_defaults=false;;
18245 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018246 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018247 case $ac_optarg in
18248 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18249 esac
18250 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018252 --he | --h)
18253 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018254 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018255Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018257 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018258 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18259 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18260 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018261
18262 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018263 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018264Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018265
Matthias Kloseb9621712010-04-24 17:59:49 +000018266 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018267 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018268
18269 esac
18270 shift
18271done
18272
Skip Montanaro6dead952003-09-25 14:50:04 +000018273ac_configure_extra_args=
18274
18275if $ac_cs_silent; then
18276 exec 6>/dev/null
18277 ac_configure_extra_args="$ac_configure_extra_args --silent"
18278fi
18279
18280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018282if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018283 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018284 shift
18285 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18286 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018288 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018289fi
18290
Martin v. Löwis11437992002-04-12 09:54:03 +000018291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293exec 5>>config.log
18294{
18295 echo
18296 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18297## Running $as_me. ##
18298_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018299 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018304_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018305
Matthias Kloseb9621712010-04-24 17:59:49 +000018306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018307
18308# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018309for ac_config_target in $ac_config_targets
18310do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 case $ac_config_target in
18312 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18313 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18314 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018315 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18316 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018318 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018319 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018320 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018321 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322
Victor Stinnere0be4232011-10-25 13:06:09 +020018323 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018324 esac
18325done
18326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327
Martin v. Löwis11437992002-04-12 09:54:03 +000018328# If the user did not use the arguments to specify the items to instantiate,
18329# then the envvar interface is used. Set only those that are not.
18330# We use the long form for the default assignment because of an extremely
18331# bizarre bug on SunOS 4.1.3.
18332if $ac_need_defaults; then
18333 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18334 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18335fi
18336
Skip Montanaro6dead952003-09-25 14:50:04 +000018337# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018339# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340# Hook for its removal unless debugging.
18341# Note that there is a small window in which the directory will not be cleaned:
18342# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018343$debug ||
18344{
Victor Stinnere0be4232011-10-25 13:06:09 +020018345 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018346 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018347 : "${ac_tmp:=$tmp}"
18348 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018350 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018351}
Martin v. Löwis11437992002-04-12 09:54:03 +000018352# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018353
Martin v. Löwis11437992002-04-12 09:54:03 +000018354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018356 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018357} ||
18358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 tmp=./conf$$-$RANDOM
18360 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018361} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018362ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018363
Matthias Kloseb9621712010-04-24 17:59:49 +000018364# Set up the scripts for CONFIG_FILES section.
18365# No need to generate them if there are no CONFIG_FILES.
18366# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018367if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018368
Matthias Kloseb9621712010-04-24 17:59:49 +000018369
18370ac_cr=`echo X | tr X '\015'`
18371# On cygwin, bash can eat \r inside `` if the user requested igncr.
18372# But we know of no other shell where ac_cr would be empty at this
18373# point, so we can use a bashism as a fallback.
18374if test "x$ac_cr" = x; then
18375 eval ac_cr=\$\'\\r\'
18376fi
18377ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18378if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018379 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018380else
18381 ac_cs_awk_cr=$ac_cr
18382fi
18383
Victor Stinnere0be4232011-10-25 13:06:09 +020018384echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018385_ACEOF
18386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387
Matthias Kloseb9621712010-04-24 17:59:49 +000018388{
18389 echo "cat >conf$$subs.awk <<_ACEOF" &&
18390 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18391 echo "_ACEOF"
18392} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018393 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18394ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395ac_delim='%!_!# '
18396for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018397 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018398 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399
Matthias Kloseb9621712010-04-24 17:59:49 +000018400 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18401 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 break
18403 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018404 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 else
18406 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408done
Matthias Kloseb9621712010-04-24 17:59:49 +000018409rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410
Matthias Kloseb9621712010-04-24 17:59:49 +000018411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018412cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018414sed -n '
18415h
18416s/^/S["/; s/!.*/"]=/
18417p
18418g
18419s/^[^!]*!//
18420:repl
18421t repl
18422s/'"$ac_delim"'$//
18423t delim
18424:nl
18425h
18426s/\(.\{148\}\)..*/\1/
18427t more1
18428s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18429p
18430n
18431b repl
18432:more1
18433s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18434p
18435g
18436s/.\{148\}//
18437t nl
18438:delim
18439h
18440s/\(.\{148\}\)..*/\1/
18441t more2
18442s/["\\]/\\&/g; s/^/"/; s/$/"/
18443p
18444b
18445:more2
18446s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18447p
18448g
18449s/.\{148\}//
18450t delim
18451' <conf$$subs.awk | sed '
18452/^[^""]/{
18453 N
18454 s/\n//
18455}
18456' >>$CONFIG_STATUS || ac_write_fail=1
18457rm -f conf$$subs.awk
18458cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18459_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018460cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018461 for (key in S) S_is_set[key] = 1
18462 FS = ""
18463
18464}
18465{
18466 line = $ 0
18467 nfields = split(line, field, "@")
18468 substed = 0
18469 len = length(field[1])
18470 for (i = 2; i < nfields; i++) {
18471 key = field[i]
18472 keylen = length(key)
18473 if (S_is_set[key]) {
18474 value = S[key]
18475 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18476 len += length(value) + length(field[++i])
18477 substed = 1
18478 } else
18479 len += 1 + keylen
18480 }
18481
18482 print line
18483}
18484
18485_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018487cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18488if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18489 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18490else
18491 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018492fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018493 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018494_ACEOF
18495
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018496# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18497# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498# trailing colons and then remove the whole line if VPATH becomes empty
18499# (actually we leave an empty line to preserve line numbers).
18500if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018501 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18502h
18503s///
18504s/^/:/
18505s/[ ]*$/:/
18506s/:\$(srcdir):/:/g
18507s/:\${srcdir}:/:/g
18508s/:@srcdir@:/:/g
18509s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018511x
18512s/\(=[ ]*\).*/\1/
18513G
18514s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515s/^[^=]*=[ ]*$//
18516}'
18517fi
18518
Matthias Kloseb9621712010-04-24 17:59:49 +000018519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018520fi # test -n "$CONFIG_FILES"
18521
Matthias Kloseb9621712010-04-24 17:59:49 +000018522# Set up the scripts for CONFIG_HEADERS section.
18523# No need to generate them if there are no CONFIG_HEADERS.
18524# This happens for instance with `./config.status Makefile'.
18525if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018526cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018527BEGIN {
18528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529
Matthias Kloseb9621712010-04-24 17:59:49 +000018530# Transform confdefs.h into an awk script `defines.awk', embedded as
18531# here-document in config.status, that substitutes the proper values into
18532# config.h.in to produce config.h.
18533
18534# Create a delimiter string that does not exist in confdefs.h, to ease
18535# handling of long lines.
18536ac_delim='%!_!# '
18537for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018538 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18539 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018540 break
18541 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018542 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018543 else
18544 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18545 fi
18546done
18547
18548# For the awk script, D is an array of macro values keyed by name,
18549# likewise P contains macro parameters if any. Preserve backslash
18550# newline sequences.
18551
18552ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18553sed -n '
18554s/.\{148\}/&'"$ac_delim"'/g
18555t rset
18556:rset
18557s/^[ ]*#[ ]*define[ ][ ]*/ /
18558t def
18559d
18560:def
18561s/\\$//
18562t bsnl
18563s/["\\]/\\&/g
18564s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18565D["\1"]=" \3"/p
18566s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18567d
18568:bsnl
18569s/["\\]/\\&/g
18570s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18571D["\1"]=" \3\\\\\\n"\\/p
18572t cont
18573s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18574t cont
18575d
18576:cont
18577n
18578s/.\{148\}/&'"$ac_delim"'/g
18579t clear
18580:clear
18581s/\\$//
18582t bsnlc
18583s/["\\]/\\&/g; s/^/"/; s/$/"/p
18584d
18585:bsnlc
18586s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18587b cont
18588' <confdefs.h | sed '
18589s/'"$ac_delim"'/"\\\
18590"/g' >>$CONFIG_STATUS || ac_write_fail=1
18591
18592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18593 for (key in D) D_is_set[key] = 1
18594 FS = ""
18595}
18596/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18597 line = \$ 0
18598 split(line, arg, " ")
18599 if (arg[1] == "#") {
18600 defundef = arg[2]
18601 mac1 = arg[3]
18602 } else {
18603 defundef = substr(arg[1], 2)
18604 mac1 = arg[2]
18605 }
18606 split(mac1, mac2, "(") #)
18607 macro = mac2[1]
18608 prefix = substr(line, 1, index(line, defundef) - 1)
18609 if (D_is_set[macro]) {
18610 # Preserve the white space surrounding the "#".
18611 print prefix "define", macro P[macro] D[macro]
18612 next
18613 } else {
18614 # Replace #undef with comments. This is necessary, for example,
18615 # in the case of _POSIX_SOURCE, which is predefined and required
18616 # on some systems where configure will not decide to define it.
18617 if (defundef == "undef") {
18618 print "/*", prefix defundef, macro, "*/"
18619 next
18620 }
18621 }
18622}
18623{ print }
18624_ACAWK
18625_ACEOF
18626cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018627 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018628fi # test -n "$CONFIG_HEADERS"
18629
18630
18631eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18632shift
18633for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018634do
18635 case $ac_tag in
18636 :[FHLC]) ac_mode=$ac_tag; continue;;
18637 esac
18638 case $ac_mode$ac_tag in
18639 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018640 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641 :[FH]-) ac_tag=-:-;;
18642 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18643 esac
18644 ac_save_IFS=$IFS
18645 IFS=:
18646 set x $ac_tag
18647 IFS=$ac_save_IFS
18648 shift
18649 ac_file=$1
18650 shift
18651
18652 case $ac_mode in
18653 :L) ac_source=$1;;
18654 :[FH])
18655 ac_file_inputs=
18656 for ac_f
18657 do
18658 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018659 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018660 *) # Look for the file first in the build tree, then in the source tree
18661 # (if the path is not absolute). The absolute path cannot be DOS-style,
18662 # because $ac_f cannot contain `:'.
18663 test -f "$ac_f" ||
18664 case $ac_f in
18665 [\\/$]*) false;;
18666 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18667 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018668 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018669 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018670 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18671 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018672 done
18673
18674 # Let's still pretend it is `configure' which instantiates (i.e., don't
18675 # use $as_me), people would be surprised to read:
18676 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018677 configure_input='Generated from '`
18678 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18679 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018680 if test x"$ac_file" != x-; then
18681 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018682 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18683$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018684 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018685 # Neutralize special characters interpreted by sed in replacement strings.
18686 case $configure_input in #(
18687 *\&* | *\|* | *\\* )
18688 ac_sed_conf_input=`$as_echo "$configure_input" |
18689 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18690 *) ac_sed_conf_input=$configure_input;;
18691 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018692
18693 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018694 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18695 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018696 esac
18697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018698 esac
18699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018700 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018701$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702 X"$ac_file" : 'X\(//\)[^/]' \| \
18703 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018704 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018705$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018706 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18707 s//\1/
18708 q
18709 }
18710 /^X\(\/\/\)[^/].*/{
18711 s//\1/
18712 q
18713 }
18714 /^X\(\/\/\)$/{
18715 s//\1/
18716 q
18717 }
18718 /^X\(\/\).*/{
18719 s//\1/
18720 q
18721 }
18722 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018723 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018724 ac_builddir=.
18725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018726case "$ac_dir" in
18727.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18728*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018729 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018731 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018732 case $ac_top_builddir_sub in
18733 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18734 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18735 esac ;;
18736esac
18737ac_abs_top_builddir=$ac_pwd
18738ac_abs_builddir=$ac_pwd$ac_dir_suffix
18739# for backward compatibility:
18740ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018741
18742case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018743 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018744 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018745 ac_top_srcdir=$ac_top_builddir_sub
18746 ac_abs_top_srcdir=$ac_pwd ;;
18747 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018748 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018749 ac_top_srcdir=$srcdir
18750 ac_abs_top_srcdir=$srcdir ;;
18751 *) # Relative name.
18752 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18753 ac_top_srcdir=$ac_top_build_prefix$srcdir
18754 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018755esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018756ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018757
Martin v. Löwis11437992002-04-12 09:54:03 +000018758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759 case $ac_mode in
18760 :F)
18761 #
18762 # CONFIG_FILE
18763 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018764
18765 case $INSTALL in
18766 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018767 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018768 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018769 ac_MKDIR_P=$MKDIR_P
18770 case $MKDIR_P in
18771 [\\/$]* | ?:[\\/]* ) ;;
18772 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18773 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018774_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018775
Matthias Kloseb9621712010-04-24 17:59:49 +000018776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018777# If the template does not know about datarootdir, expand it.
18778# FIXME: This hack should be removed a few years after 2.60.
18779ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018780ac_sed_dataroot='
18781/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018782 p
18783 q
18784}
18785/@datadir@/p
18786/@docdir@/p
18787/@infodir@/p
18788/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018789/@mandir@/p'
18790case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018791*datarootdir*) ac_datarootdir_seen=yes;;
18792*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18794$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018797 ac_datarootdir_hack='
18798 s&@datadir@&$datadir&g
18799 s&@docdir@&$docdir&g
18800 s&@infodir@&$infodir&g
18801 s&@localedir@&$localedir&g
18802 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018803 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018804esac
18805_ACEOF
18806
18807# Neutralize VPATH when `$srcdir' = `.'.
18808# Shell code in configure.ac might set extrasub.
18809# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018810cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18811ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018812$extrasub
18813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018815:t
18816/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018817s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018819s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820s&@srcdir@&$ac_srcdir&;t t
18821s&@abs_srcdir@&$ac_abs_srcdir&;t t
18822s&@top_srcdir@&$ac_top_srcdir&;t t
18823s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18824s&@builddir@&$ac_builddir&;t t
18825s&@abs_builddir@&$ac_abs_builddir&;t t
18826s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18827s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018828s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018829$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018830"
Victor Stinnere0be4232011-10-25 13:06:09 +020018831eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18832 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018834test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018835 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18836 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18837 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018839which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018840$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018841which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018842
Victor Stinnere0be4232011-10-25 13:06:09 +020018843 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018844 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018845 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18846 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018847 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018848 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018849 ;;
18850 :H)
18851 #
18852 # CONFIG_HEADER
18853 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018855 {
18856 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018857 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18858 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018859 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018860 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018861 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18862$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018863 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018864 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018865 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018866 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018867 fi
18868 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018869 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018870 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018871 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018872 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018873 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018875
18876 esac
18877
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018878
18879 case $ac_file$ac_mode in
18880 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18881
18882 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018883done # for ac_tag
18884
Guido van Rossum627b2d71993-12-24 10:39:16 +000018885
Matthias Kloseb9621712010-04-24 17:59:49 +000018886as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018887_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018888ac_clean_files=$ac_clean_files_save
18889
Matthias Kloseb9621712010-04-24 17:59:49 +000018890test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018891 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018892
Martin v. Löwis11437992002-04-12 09:54:03 +000018893
18894# configure is writing to config.log, and then calls config.status.
18895# config.status does its own redirection, appending to config.log.
18896# Unfortunately, on DOS this fails, as config.log is still kept open
18897# by configure, so config.status won't be able to write to it; its
18898# output is simply discarded. So we exec the FD to /dev/null,
18899# effectively closing config.log, so it can be properly (re)opened and
18900# appended to by config.status. When coming back to configure, we
18901# need to make the FD available again.
18902if test "$no_create" != yes; then
18903 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018904 ac_config_status_args=
18905 test "$silent" = yes &&
18906 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018907 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018908 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 exec 5>>config.log
18910 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18911 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018912 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018913fi
18914if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18916$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018917fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018918
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018919
Christian Heimes75ed8902013-11-20 01:11:18 +010018920echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018921if test ! -f Modules/Setup.local
18922then
18923 echo "# Edit this file for local setup changes" >Modules/Setup.local
18924fi
18925
Christian Heimes75ed8902013-11-20 01:11:18 +010018926echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018927$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018928 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018929 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018930mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018931
18932if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18933 echo "" >&6
18934 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018935 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 +000018936 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018937 echo "" >&6
18938 echo "" >&6
18939fi
18940