blob: bb8fbc26c74ed128559121c86bcc9646ede621e7 [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.
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02003# Generated by GNU Autoconf 2.69 for python 3.9.
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'
Łukasz Langa9ab2fb12019-06-04 22:12:32 +0200583PACKAGE_VERSION='3.9'
584PACKAGE_STRING='python 3.9'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200684LLVM_AR
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700685PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
Benjamin Petersonbed04b62019-09-09 05:13:00 -0700785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -0700857PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Benjamin Petersonbed04b62019-09-09 05:13:00 -0700899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001411\`configure' configures python 3.9 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonbed04b62019-09-09 05:13:00 -07001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001477 short | recursive ) echo "Configuration of python 3.9:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001491 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1492 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001505 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1506 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001515 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001516 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001517 --with-lto Enable Link Time Optimization in any build. Disabled
1518 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001519 --with-hash-algorithm=[fnv|siphash24]
1520 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001521 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001522 enable AddressSanitizer (asan)
1523 --with-memory-sanitizer enable MemorySanitizer (msan)
1524 --with-undefined-behavior-sanitizer
1525 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001527 --with-system-expat build pyexpat module using an installed expat
1528 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001529 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001530 --with-system-libmpdec build _decimal module using an installed libmpdec
1531 library
Ned Deilyd819b932013-09-06 01:07:05 -07001532 --with-tcltk-includes='-I...'
1533 override search for Tcl and Tk include files
1534 --with-tcltk-libs='-L...'
1535 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001536 --with-dbmliborder=db1:db2:...
1537 order to check db backends for dbm. Valid value is a
1538 colon separated string with the backend names
1539 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001542 --with(out)-c-locale-coercion
1543 disable/enable C locale coercion to a UTF-8 based
1544 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001545 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001546 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001547 --with-libm=STRING math library
1548 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001549 --with(out)-computed-gotos
1550 Use computed gotos in evaluation loop (enabled by
1551 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001552 --with(out)-ensurepip=[=upgrade]
1553 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001554 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001555 --with-ssl-default-suites=[python|openssl|STRING]
1556 Override default cipher suites string, python: use
1557 Python's preferred selection (default), openssl:
1558 leave OpenSSL's defaults untouched, STRING: use a
1559 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07001571 PROFILE_TASK
1572 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001573 PKG_CONFIG path to pkg-config utility
1574 PKG_CONFIG_PATH
1575 directories to add to pkg-config's search path
1576 PKG_CONFIG_LIBDIR
1577 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579Use these variables to override the choices made by `configure' or to help
1580it to find libraries and programs with nonstandard names/locations.
1581
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001582Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001585fi
1586
1587if test "$ac_init_help" = "recursive"; then
1588 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 test -d "$ac_dir" ||
1591 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1592 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_builddir=.
1594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595case "$ac_dir" in
1596.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1597*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001600 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 case $ac_top_builddir_sub in
1602 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1603 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1604 esac ;;
1605esac
1606ac_abs_top_builddir=$ac_pwd
1607ac_abs_builddir=$ac_pwd$ac_dir_suffix
1608# for backward compatibility:
1609ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
1611case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 ac_top_srcdir=$ac_top_builddir_sub
1615 ac_abs_top_srcdir=$ac_pwd ;;
1616 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 ac_top_srcdir=$srcdir
1619 ac_abs_top_srcdir=$srcdir ;;
1620 *) # Relative name.
1621 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1622 ac_top_srcdir=$ac_top_build_prefix$srcdir
1623 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001624esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 cd "$ac_dir" || { ac_status=$?; continue; }
1628 # Check for guested configure.
1629 if test -f "$ac_srcdir/configure.gnu"; then
1630 echo &&
1631 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1632 elif test -f "$ac_srcdir/configure"; then
1633 echo &&
1634 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 fi || ac_status=$?
1638 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 done
1640fi
1641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001643if $ac_init_version; then
1644 cat <<\_ACEOF
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02001645python configure 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001647
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001648Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001649This configure script is free software; the Free Software Foundation
1650gives unlimited permission to copy, distribute and modify it.
1651_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001652 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001654
1655## ------------------------ ##
1656## Autoconf initialization. ##
1657## ------------------------ ##
1658
1659# ac_fn_c_try_compile LINENO
1660# --------------------------
1661# Try to compile conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_compile ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 rm -f conftest.$ac_objext
1666 if { { ac_try="$ac_compile"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_compile") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681 test $ac_status = 0; } && {
1682 test -z "$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 } && test -s conftest.$ac_objext; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_compile
1696
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001697# ac_fn_c_try_cpp LINENO
1698# ----------------------
1699# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_cpp ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { { ac_try="$ac_cpp conftest.$ac_ext"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } > conftest.i && {
1719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 }; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
1729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_cpp
1733
Matthias Kloseb9621712010-04-24 17:59:49 +00001734# ac_fn_c_try_link LINENO
1735# -----------------------
1736# Try to link conftest.$ac_ext, and return whether this succeeded.
1737ac_fn_c_try_link ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 rm -f conftest.$ac_objext conftest$ac_exeext
1741 if { { ac_try="$ac_link"
1742case "(($ac_try" in
1743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1744 *) ac_try_echo=$ac_try;;
1745esac
1746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1747$as_echo "$ac_try_echo"; } >&5
1748 (eval "$ac_link") 2>conftest.err
1749 ac_status=$?
1750 if test -s conftest.err; then
1751 grep -v '^ *+' conftest.err >conftest.er1
1752 cat conftest.er1 >&5
1753 mv -f conftest.er1 conftest.err
1754 fi
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && {
1757 test -z "$ac_c_werror_flag" ||
1758 test ! -s conftest.err
1759 } && test -s conftest$ac_exeext && {
1760 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001761 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 }; then :
1763 ac_retval=0
1764else
1765 $as_echo "$as_me: failed program was:" >&5
1766sed 's/^/| /' conftest.$ac_ext >&5
1767
1768 ac_retval=1
1769fi
1770 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1771 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1772 # interfere with the next link command; also delete a directory that is
1773 # left behind by Apple's compiler. We do this before executing the actions.
1774 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 as_fn_set_status $ac_retval
1777
1778} # ac_fn_c_try_link
1779
Matthias Kloseb9621712010-04-24 17:59:49 +00001780# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1781# -------------------------------------------------------
1782# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1783# the include files in INCLUDES and setting the cache variable VAR
1784# accordingly.
1785ac_fn_c_check_header_mongrel ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001788 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1790$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001791if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 $as_echo_n "(cached) " >&6
1793fi
1794eval ac_res=\$$3
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1796$as_echo "$ac_res" >&6; }
1797else
1798 # Is the header compilable?
1799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1800$as_echo_n "checking $2 usability... " >&6; }
1801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 ac_header_compiler=yes
1808else
1809 ac_header_compiler=no
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1813$as_echo "$ac_header_compiler" >&6; }
1814
1815# Is the header present?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1817$as_echo_n "checking $2 presence... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820#include <$2>
1821_ACEOF
1822if ac_fn_c_try_cpp "$LINENO"; then :
1823 ac_header_preproc=yes
1824else
1825 ac_header_preproc=no
1826fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001827rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1829$as_echo "$ac_header_preproc" >&6; }
1830
1831# So? What about this header?
1832case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1833 yes:no: )
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1835$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1838 ;;
1839 no:yes:* )
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1841$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1843$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1845$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1847$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1849$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001850( $as_echo "## --------------------------------------- ##
1851## Report this to https://bugs.python.org/ ##
1852## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 ) | sed "s/^/$as_me: WARNING: /" >&2
1854 ;;
1855esac
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1857$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001858if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001859 $as_echo_n "(cached) " >&6
1860else
1861 eval "$3=\$ac_header_compiler"
1862fi
1863eval ac_res=\$$3
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1865$as_echo "$ac_res" >&6; }
1866fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001867 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001868
1869} # ac_fn_c_check_header_mongrel
1870
1871# ac_fn_c_try_run LINENO
1872# ----------------------
1873# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1874# that executables *can* be run.
1875ac_fn_c_try_run ()
1876{
1877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1878 if { { ac_try="$ac_link"
1879case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_link") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1889 { { case "(($ac_try" in
1890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1891 *) ac_try_echo=$ac_try;;
1892esac
1893eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1894$as_echo "$ac_try_echo"; } >&5
1895 (eval "$ac_try") 2>&5
1896 ac_status=$?
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898 test $ac_status = 0; }; }; then :
1899 ac_retval=0
1900else
1901 $as_echo "$as_me: program exited with status $ac_status" >&5
1902 $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905 ac_retval=$ac_status
1906fi
1907 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_run
1912
1913# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1914# -------------------------------------------------------
1915# Tests whether HEADER exists and can be compiled using the include files in
1916# INCLUDES, setting the cache variable VAR accordingly.
1917ac_fn_c_check_header_compile ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928#include <$2>
1929_ACEOF
1930if ac_fn_c_try_compile "$LINENO"; then :
1931 eval "$3=yes"
1932else
1933 eval "$3=no"
1934fi
1935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1936fi
1937eval ac_res=\$$3
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1939$as_echo "$ac_res" >&6; }
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
1942} # ac_fn_c_check_header_compile
1943
Matthias Kloseb9621712010-04-24 17:59:49 +00001944# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1945# -------------------------------------------
1946# Tests whether TYPE exists after having included INCLUDES, setting cache
1947# variable VAR accordingly.
1948ac_fn_c_check_type ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001953if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001954 $as_echo_n "(cached) " >&6
1955else
1956 eval "$3=no"
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof ($2))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973int
1974main ()
1975{
1976if (sizeof (($2)))
1977 return 0;
1978 ;
1979 return 0;
1980}
1981_ACEOF
1982if ac_fn_c_try_compile "$LINENO"; then :
1983
1984else
1985 eval "$3=yes"
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_check_type
1997
Matthias Kloseb9621712010-04-24 17:59:49 +00001998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 ac_lo=0 ac_mid=0
2024 while :; do
2025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h. */
2027$4
2028int
2029main ()
2030{
2031static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_hi=$ac_mid; break
2041else
2042 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2043 if test $ac_lo -le $ac_mid; then
2044 ac_lo= ac_hi=
2045 break
2046 fi
2047 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 done
2051else
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002059test_array [0] = 0;
2060return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002076test_array [0] = 0;
2077return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002189if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245
2246} # ac_fn_c_check_func
2247
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002248# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2249# ---------------------------------------------
2250# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2251# accordingly.
2252ac_fn_c_check_decl ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 as_decl_name=`echo $2|sed 's/ *(.*//'`
2256 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2258$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2259if eval \${$3+:} false; then :
2260 $as_echo_n "(cached) " >&6
2261else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263/* end confdefs.h. */
2264$4
2265int
2266main ()
2267{
2268#ifndef $as_decl_name
2269#ifdef __cplusplus
2270 (void) $as_decl_use;
2271#else
2272 (void) $as_decl_name;
2273#endif
2274#endif
2275
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291
2292} # ac_fn_c_check_decl
2293
Matthias Kloseb9621712010-04-24 17:59:49 +00002294# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2295# ----------------------------------------------------
2296# Tries to find if the field MEMBER exists in type AGGR, after including
2297# INCLUDES, setting cache variable VAR accordingly.
2298ac_fn_c_check_member ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2302$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002303if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$5
2325int
2326main ()
2327{
2328static $2 ac_aggr;
2329if (sizeof ac_aggr.$3)
2330return 0;
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$4=yes"
2337else
2338 eval "$4=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$4
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002348
2349} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002354It was created by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002355generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002391 $as_echo "PATH: $as_dir"
2392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Kloseb9621712010-04-24 17:59:49 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# 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 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002495 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Kloseb9621712010-04-24 17:59:49 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Kloseb9621712010-04-24 17:59:49 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598else
Matthias Kloseb9621712010-04-24 17:59:49 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603do
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$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 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703
Christian Heimesff5be6e2018-01-20 13:19:21 +01002704
2705
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002706if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002707 # If we're building out-of-tree, we need to make sure the following
2708 # resources get picked up before their $srcdir counterparts.
2709 # Objects/ -> typeslots.inc
2710 # Include/ -> Python-ast.h, graminit.h
2711 # Python/ -> importlib.h
2712 # (A side effect of this is that these resources will automatically be
2713 # regenerated when building out-of-tree, regardless of whether or not
2714 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2715 # off.)
2716 BASECPPFLAGS="-IObjects -IInclude -IPython"
2717else
2718 BASECPPFLAGS=""
2719fi
2720
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721
2722
2723
2724
Victor Stinner9ed34a82017-05-02 22:35:58 +02002725if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727# Extract the first word of "git", so it can be a program name with args.
2728set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2730$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo_n "(cached) " >&6
2733else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 if test -n "$HAS_GIT"; then
2735 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736else
2737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738for as_dir in $PATH
2739do
2740 IFS=$as_save_IFS
2741 test -z "$as_dir" && as_dir=.
2742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2746 break 2
2747 fi
2748done
2749 done
2750IFS=$as_save_IFS
2751
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
2754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=$ac_cv_prog_HAS_GIT
2756if test -n "$HAS_GIT"; then
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2758$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2761$as_echo "no" >&6; }
2762fi
2763
2764
2765else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002766HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769then
Xiang Zhang4c855572018-08-20 22:36:19 +08002770 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2771 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2772 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002774 GITVERSION=""
2775 GITTAG=""
2776 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777fi
2778
2779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
2782
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002783ac_aux_dir=
2784for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2785 if test -f "$ac_dir/install-sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install-sh -c"
2788 break
2789 elif test -f "$ac_dir/install.sh"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/install.sh -c"
2792 break
2793 elif test -f "$ac_dir/shtool"; then
2794 ac_aux_dir=$ac_dir
2795 ac_install_sh="$ac_aux_dir/shtool install -c"
2796 break
2797 fi
2798done
2799if test -z "$ac_aux_dir"; then
2800 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2801fi
2802
2803# These three variables are undocumented and unsupported,
2804# and are intended to be withdrawn in a future Autoconf release.
2805# They can cause serious problems if a builder's source tree is in a directory
2806# whose full name contains unusual characters.
2807ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2808ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2809ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2810
2811
2812# Make sure we can run config.sub.
2813$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2814 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2815
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2817$as_echo_n "checking build system type... " >&6; }
2818if ${ac_cv_build+:} false; then :
2819 $as_echo_n "(cached) " >&6
2820else
2821 ac_build_alias=$build_alias
2822test "x$ac_build_alias" = x &&
2823 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2824test "x$ac_build_alias" = x &&
2825 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2826ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2827 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2828
2829fi
2830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2831$as_echo "$ac_cv_build" >&6; }
2832case $ac_cv_build in
2833*-*-*) ;;
2834*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2835esac
2836build=$ac_cv_build
2837ac_save_IFS=$IFS; IFS='-'
2838set x $ac_cv_build
2839shift
2840build_cpu=$1
2841build_vendor=$2
2842shift; shift
2843# Remember, the first character of IFS is used to create $*,
2844# except with old shells:
2845build_os=$*
2846IFS=$ac_save_IFS
2847case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2848
2849
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2851$as_echo_n "checking host system type... " >&6; }
2852if ${ac_cv_host+:} false; then :
2853 $as_echo_n "(cached) " >&6
2854else
2855 if test "x$host_alias" = x; then
2856 ac_cv_host=$ac_cv_build
2857else
2858 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2860fi
2861
2862fi
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2864$as_echo "$ac_cv_host" >&6; }
2865case $ac_cv_host in
2866*-*-*) ;;
2867*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2868esac
2869host=$ac_cv_host
2870ac_save_IFS=$IFS; IFS='-'
2871set x $ac_cv_host
2872shift
2873host_cpu=$1
2874host_vendor=$2
2875shift; shift
2876# Remember, the first character of IFS is used to create $*,
2877# except with old shells:
2878host_os=$*
2879IFS=$ac_save_IFS
2880case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2881
2882
2883
doko@python.orga10e4a92013-01-25 18:45:12 +01002884
2885
Ned Deilyfcbc2462014-08-22 13:32:49 -07002886# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2887rm -f pybuilddir.txt
2888
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889for ac_prog in python$PACKAGE_VERSION python3 python
2890do
2891 # Extract the first word of "$ac_prog", so it can be a program name with args.
2892set dummy $ac_prog; ac_word=$2
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2894$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo_n "(cached) " >&6
2897else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 if test -n "$PYTHON_FOR_REGEN"; then
2899 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900else
2901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2902for as_dir in $PATH
2903do
2904 IFS=$as_save_IFS
2905 test -z "$as_dir" && as_dir=.
2906 for ac_exec_ext in '' $ac_executable_extensions; do
2907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2910 break 2
2911 fi
2912done
2913 done
2914IFS=$as_save_IFS
2915
2916fi
2917fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2919if test -n "$PYTHON_FOR_REGEN"; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2921$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922else
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2924$as_echo "no" >&6; }
2925fi
2926
2927
Victor Stinnera5c62a82017-05-03 18:21:48 +02002928 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002930test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002931
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002932
2933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934if test "$cross_compiling" = yes; then
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2936$as_echo_n "checking for python interpreter for cross build... " >&6; }
2937 if test -z "$PYTHON_FOR_BUILD"; then
2938 for interp in python$PACKAGE_VERSION python3 python; do
2939 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002940 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 +02002941 break
2942 fi
2943 interp=
2944 done
2945 if test x$interp = x; then
2946 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2947 fi
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2949$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002950 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 +02002951 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002952elif test "$cross_compiling" = maybe; then
2953 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002954else
2955 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
Benjamin Petersond23f8222009-04-05 19:13:16 +00002960if test "$prefix" != "/"; then
2961 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2962fi
2963
2964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965
2966
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002967# We don't use PACKAGE_ variables, and they cause conflicts
2968# with other autoconf-based packages that include Python.h
2969grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2970rm confdefs.h
2971mv confdefs.h.new confdefs.h
2972
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002973
Łukasz Langa9ab2fb12019-06-04 22:12:32 +02002974VERSION=3.9
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002975
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002976# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002977
2978SOVERSION=1.0
2979
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980# The later defininition of _XOPEN_SOURCE disables certain features
2981# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
2985
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991
2992
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998
2999
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003001# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
3006
3007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003010# Arguments passed to configure.
3011
3012CONFIG_ARGS="$ac_configure_args"
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3015$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 case $enableval in
3020 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003021 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003022 # information
3023 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003024 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3027 if test ! -d "${enableval}"
3028 then
3029 enableval=/
3030 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
3034 case $enableval in
3035 no)
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038 ;;
3039 *)
3040 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 if test ! -d "${UNIVERSALSDK}"
3042 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003043 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 ;;
3046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049else
3050
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056if test -n "${UNIVERSALSDK}"
3057then
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3059$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060else
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
Ned Deily87adb6e2013-10-18 21:09:56 -07003067ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069# For backward compatibility reasons we prefer to select '32-bit' if available,
3070# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072if test "`uname -s`" = "Darwin"
3073then
3074 if test -n "${UNIVERSALSDK}"
3075 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003076 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077 then
3078 UNIVERSAL_ARCHS="intel"
3079 fi
3080 fi
3081fi
3082
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3085$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
3087# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003088if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090 UNIVERSAL_ARCHS="$withval"
3091
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092fi
3093
Ned Deily87adb6e2013-10-18 21:09:56 -07003094if test -n "${UNIVERSALSDK}"
3095then
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3097$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3098else
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100$as_echo "no" >&6; }
3101fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103
3104# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106 withval=$with_framework_name;
3107 PYTHONFRAMEWORK=${withval}
3108 PYTHONFRAMEWORKDIR=${withval}.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3110
3111else
3112
3113 PYTHONFRAMEWORK=Python
3114 PYTHONFRAMEWORKDIR=Python.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3116
3117fi
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003122 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003124 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 esac
3126 case $enableval in
3127 no)
3128 PYTHONFRAMEWORK=
3129 PYTHONFRAMEWORKDIR=no-framework
3130 PYTHONFRAMEWORKPREFIX=
3131 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST=
3133 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 FRAMEWORKALTINSTALLFIRST=
3135 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 if test "x${prefix}" = "xNONE"; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003142 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003143 ;;
3144 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003147 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003148 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003149 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3150 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003151 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 if test "x${prefix}" = "xNONE" ; then
3155 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 else
3158 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3159 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
3161 case "${enableval}" in
3162 /System*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 if test "${prefix}" = "NONE" ; then
3165 # See below
3166 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3167 fi
3168 ;;
3169
3170 /Library*)
3171 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3172 ;;
3173
3174 */Library/Frameworks)
3175 MDIR="`dirname "${enableval}"`"
3176 MDIR="`dirname "${MDIR}"`"
3177 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3178
3179 if test "${prefix}" = "NONE"; then
3180 # User hasn't specified the
3181 # --prefix option, but wants to install
3182 # the framework in a non-default location,
3183 # ensure that the compatibility links get
3184 # installed relative to that prefix as well
3185 # instead of in /usr/local.
3186 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3187 fi
3188 ;;
3189
3190 *)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 ;;
3193 esac
3194
Jack Jansen127e56e2001-09-11 14:41:54 +00003195 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003197 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003203 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3204
3205 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3206
Jack Jansene578a632001-08-15 01:27:14 +00003207 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Guido van Rossum563e7081996-09-10 18:20:48 +00003209else
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003212 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORKPREFIX=
3214 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215 FRAMEWORKINSTALLFIRST=
3216 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 FRAMEWORKALTINSTALLFIRST=
3218 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003219 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 if test "x${prefix}" = "xNONE" ; then
3221 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3222 else
3223 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3224 fi
Jack Jansene578a632001-08-15 01:27:14 +00003225 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228fi
3229
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
3231
Michael W. Hudson54241132001-12-07 15:38:26 +00003232
3233
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003237
3238
3239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003241
Ned Deilyb8f944f2013-11-21 22:42:25 -08003242
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003243
3244cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003245#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003246_ACEOF
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003250## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003251## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003252##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253# Set name for machine-dependent library files
3254
Matthias Kloseb9621712010-04-24 17:59:49 +00003255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3256$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257if test -z "$MACHDEP"
3258then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 # avoid using uname for cross builds
3260 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003261 # ac_sys_system and ac_sys_release are used for setting
3262 # a lot of different things including 'define_xopen_source'
3263 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003265 *-*-linux-android*)
3266 ac_sys_system=Linux-android
3267 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 *-*-linux*)
3269 ac_sys_system=Linux
3270 ;;
3271 *-*-cygwin*)
3272 ac_sys_system=Cygwin
3273 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003274 *-*-vxworks*)
3275 ac_sys_system=VxWorks
3276 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003299 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003300 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003301 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003302 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3307$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003308
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003309
3310if test "$cross_compiling" = yes; then
3311 case "$host" in
3312 *-*-linux*)
3313 case "$host_cpu" in
3314 arm*)
3315 _host_cpu=arm
3316 ;;
3317 *)
3318 _host_cpu=$host_cpu
3319 esac
3320 ;;
3321 *-*-cygwin*)
3322 _host_cpu=
3323 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003324 *-*-vxworks*)
3325 _host_cpu=$host_cpu
3326 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003327 *)
3328 # for now, limit cross builds to known configurations
3329 MACHDEP="unknown"
3330 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3331 esac
3332 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3333fi
3334
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003335# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3336# disable features if it is defined, without any means to access these
3337# features as extensions. For these systems, we skip the definition of
3338# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3339# some feature, make sure there is no alternative way to access this
3340# feature. Also, when using wildcards, make sure you have verified the
3341# need for not defining _XOPEN_SOURCE on all systems matching the
3342# wildcard, and that the wildcard does not include future systems
3343# (which may remove their limitations).
3344case $ac_sys_system/$ac_sys_release in
3345 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3346 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003347 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003348 # In addition, Stefan Krah confirms that issue #1244610 exists through
3349 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003350 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003351 define_xopen_source=no
3352 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3353 # also defined. This can be overridden by defining _BSD_SOURCE
3354 # As this has a different meaning on Linux, only define it on OpenBSD
3355
Matthias Kloseb9621712010-04-24 17:59:49 +00003356$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003357
3358 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003359 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003365
3366 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003367 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3368 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3369 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003370 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 +00003371 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003372 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3373 # request to enable features supported by the standard as a request
3374 # to disable features not supported by the standard. The best way
3375 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3376 # entirely and define __EXTENSIONS__ instead.
3377 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003378 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3380 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003381 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003382 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003383 define_xopen_source=no;;
3384 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003385 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003387 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003388 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3389 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3390 # identifies itself as Darwin/7.*
3391 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3392 # disables platform specific features beyond repair.
3393 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3394 # has no effect, don't bother defining them
3395 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003396 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003397 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003398 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003399 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3400 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3401 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003402 AIX/4)
3403 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003404 AIX/5)
3405 if test `uname -r` -eq 1; then
3406 define_xopen_source=no
3407 fi
3408 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003409 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3410 # defining NI_NUMERICHOST.
3411 QNX/6.3.2)
3412 define_xopen_source=no
3413 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003414 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3415 # in network headers still using system V types.
3416 VxWorks/*)
3417 define_xopen_source=no
3418 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003419
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420esac
3421
3422if test $define_xopen_source = yes
3423then
Victor Stinner14d098d2011-09-07 22:29:43 +02003424 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Victor Stinner14d098d2011-09-07 22:29:43 +02003426$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3430 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3431 # several APIs are not declared. Since this is also needed in some
3432 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Matthias Kloseb9621712010-04-24 17:59:49 +00003434$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003437
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003438$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440fi
3441
Christian Heimes647cd872013-12-07 23:39:33 +01003442# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3443case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003444 hp*|HP*)
3445 define_stdc_a1=yes;;
3446 *)
3447 define_stdc_a1=no;;
3448esac
3449
3450if test $define_stdc_a1 = yes
3451then
Christian Heimes647cd872013-12-07 23:39:33 +01003452
3453$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3454
Christian Heimesb02bcae2013-12-08 15:21:08 +01003455fi
Christian Heimes647cd872013-12-07 23:39:33 +01003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3458# it may influence the way we can build extensions, so distutils
3459# needs to check it
3460
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461
Jack Jansen6b08a402004-06-03 12:41:45 +00003462CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003463EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003464
Guido van Rossum627b2d71993-12-24 10:39:16 +00003465# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003466
3467# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3468# for debug/optimization stuff. BASECFLAGS is for flags that are required
3469# just to get things to compile and link. Users are free to override OPT
3470# when running configure or make. The build should not break if they do.
3471# BASECFLAGS should generally not be messed with, however.
3472
Guido van Rossum8b131c51995-03-09 14:10:13 +00003473# If the user switches compilers, we can't believe the cache
3474if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3475then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003476 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003477(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003478fi
3479
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003480# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3481# when the compiler supports them, but we don't always want -O2, and
3482# we set -g later.
3483if test -z "$CFLAGS"; then
3484 CFLAGS=
3485fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486
3487if test "$ac_sys_system" = "Darwin"
3488then
3489 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003490 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 # information
3492 if test -z "${CC}"
3493 then
3494 found_gcc=
3495 found_clang=
3496 as_save_IFS=$IFS; IFS=:
3497 for as_dir in $PATH
3498 do
3499 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003500 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003502 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003503 fi
3504 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003505 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003507 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508 fi
3509 fi
3510 done
3511 IFS=$as_save_IFS
3512
3513 if test -n "$found_gcc" -a -n "$found_clang"
3514 then
3515 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3516 then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3518$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3519 CC="$found_clang"
3520 CXX="$found_clang++"
3521 fi
3522
3523
3524 elif test -z "$found_gcc" -a -n "$found_clang"
3525 then
3526 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3527$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3528 CC="$found_clang"
3529 CXX="$found_clang++"
3530
3531 elif test -z "$found_gcc" -a -z "$found_clang"
3532 then
3533 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3534 if test -n "${found_clang}"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3537$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3538 CC="${found_clang}"
3539 CXX="`/usr/bin/xcrun -find clang++`"
3540
3541 # else: use default behaviour
3542 fi
3543 fi
3544 fi
3545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546ac_ext=c
3547ac_cpp='$CPP $CPPFLAGS'
3548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3550ac_compiler_gnu=$ac_cv_c_compiler_gnu
3551if test -n "$ac_tool_prefix"; then
3552 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3553set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3555$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003556if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003558else
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
3561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 $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 +00003571 break 2
3572 fi
3573done
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003576
Jack Jansendd19cf82001-12-06 22:36:17 +00003577fi
3578fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003579CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003580if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003583else
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003586fi
3587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589fi
3590if test -z "$ac_cv_prog_CC"; then
3591 ac_ct_CC=$CC
3592 # Extract the first word of "gcc", so it can be a program name with args.
3593set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003596if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003598else
3599 if test -n "$ac_ct_CC"; then
3600 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3601else
3602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3603for as_dir in $PATH
3604do
3605 IFS=$as_save_IFS
3606 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 break 2
3612 fi
3613done
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003616
3617fi
3618fi
3619ac_ct_CC=$ac_cv_prog_ac_ct_CC
3620if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3622$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623else
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3625$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 if test "x$ac_ct_CC" = x; then
3629 CC=""
3630 else
3631 case $cross_compiling:$ac_tool_warned in
3632yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635ac_tool_warned=yes ;;
3636esac
3637 CC=$ac_ct_CC
3638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
3640 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642
Jack Jansendd19cf82001-12-06 22:36:17 +00003643if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test -n "$ac_tool_prefix"; then
3645 # 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 +00003646set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3648$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003649if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003651else
3652 if test -n "$CC"; then
3653 ac_cv_prog_CC="$CC" # Let the user override the test.
3654else
Martin v. Löwis11437992002-04-12 09:54:03 +00003655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656for as_dir in $PATH
3657do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 $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 +00003664 break 2
3665 fi
3666done
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003669
3670fi
3671fi
3672CC=$ac_cv_prog_CC
3673if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3675$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3678$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684if test -z "$CC"; then
3685 # Extract the first word of "cc", so it can be a program name with args.
3686set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3688$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003689if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
3692 if test -n "$CC"; then
3693 ac_cv_prog_CC="$CC" # Let the user override the test.
3694else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697for as_dir in $PATH
3698do
3699 IFS=$as_save_IFS
3700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3704 ac_prog_rejected=yes
3705 continue
3706 fi
3707 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $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 +00003709 break 2
3710 fi
3711done
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003714
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715if test $ac_prog_rejected = yes; then
3716 # We found a bogon in the path, so make sure we never use it.
3717 set dummy $ac_cv_prog_CC
3718 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720 # We chose a different compiler from the bogus one.
3721 # However, it has the same basename, so the bogon will be chosen
3722 # first if we set CC to just the basename; use the full file name.
3723 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003724 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725 fi
3726fi
3727fi
3728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
3740if test -z "$CC"; then
3741 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 do
3744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3747$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003748if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003750else
3751 if test -n "$CC"; then
3752 ac_cv_prog_CC="$CC" # Let the user override the test.
3753else
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $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 +00003763 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
3769fi
3770fi
3771CC=$ac_cv_prog_CC
3772if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3774$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3777$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003778fi
3779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 test -n "$CC" && break
3782 done
3783fi
3784if test -z "$CC"; then
3785 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787do
3788 # Extract the first word of "$ac_prog", so it can be a program name with args.
3789set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
3795 if test -n "$ac_ct_CC"; then
3796 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3797else
3798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
3808 fi
3809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813fi
3814fi
3815ac_ct_CC=$ac_cv_prog_ac_ct_CC
3816if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3818$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$ac_ct_CC" && break
3826done
Michael W. Hudson54241132001-12-07 15:38:26 +00003827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828 if test "x$ac_ct_CC" = x; then
3829 CC=""
3830 else
3831 case $cross_compiling:$ac_tool_warned in
3832yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835ac_tool_warned=yes ;;
3836esac
3837 CC=$ac_ct_CC
3838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840
3841fi
3842
3843
Matthias Kloseb9621712010-04-24 17:59:49 +00003844test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3845$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003846as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003847See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848
3849# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003850$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3851set X $ac_compile
3852ac_compiler=$2
3853for ac_option in --version -v -V -qversion; do
3854 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855case "(($ac_try" in
3856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3857 *) ac_try_echo=$ac_try;;
3858esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3860$as_echo "$ac_try_echo"; } >&5
3861 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 if test -s conftest.err; then
3864 sed '10a\
3865... rest of stderr output deleted ...
3866 10q' conftest.err >conftest.er1
3867 cat conftest.er1 >&5
3868 fi
3869 rm -f conftest.er1 conftest.err
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }
3872done
Martin v. Löwis11437992002-04-12 09:54:03 +00003873
Matthias Kloseb9621712010-04-24 17:59:49 +00003874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003875/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877int
3878main ()
3879{
3880
3881 ;
3882 return 0;
3883}
3884_ACEOF
3885ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003886ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003887# Try to create an executable without -o first, disregard a.out.
3888# It will help us diagnose broken compilers, and finding out an intuition
3889# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3891$as_echo_n "checking whether the C compiler works... " >&6; }
3892ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3893
3894# The possible output files:
3895ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897ac_rmfiles=
3898for ac_file in $ac_files
3899do
3900 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3903 esac
3904done
3905rm -f $ac_rmfiles
3906
Matthias Kloseb9621712010-04-24 17:59:49 +00003907if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3917 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3919# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3920# in a Makefile. We should not override ac_cv_exeext if it was cached,
3921# so that the user can short-circuit this test for compilers unknown to
3922# Autoconf.
3923for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003924do
3925 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928 ;;
3929 [ab].out )
3930 # We found the default executable, but exeext='' is most
3931 # certainly right.
3932 break;;
3933 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 then :; else
3936 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3937 fi
3938 # We set ac_cv_exeext here because the later test for it is not
3939 # safe: cross compilers may not add the suffix if given an `-o'
3940 # argument, so we may need to know it at that point already.
3941 # Even if this section looks crufty: it has the advantage of
3942 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 break;;
3944 * )
3945 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 esac
3947done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948test "$ac_cv_exeext" = no && ac_cv_exeext=
3949
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003950else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 ac_file=''
3952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003953if test -z "$ac_file"; then :
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3955$as_echo "no" >&6; }
3956$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003957sed 's/^/| /' conftest.$ac_ext >&5
3958
Matthias Kloseb9621712010-04-24 17:59:49 +00003959{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003961as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003962See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003963else
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3965$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3968$as_echo_n "checking for C compiler default output file name... " >&6; }
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3970$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3976$as_echo_n "checking for suffix of executables... " >&6; }
3977if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3987 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3989# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3990# work properly (i.e., refer to `conftest.exe'), while it won't with
3991# `rm'.
3992for ac_file in conftest.exe conftest conftest.*; do
3993 test -f "$ac_file" || continue
3994 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3997 break;;
3998 * ) break;;
3999 esac
4000done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001else
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007rm -f conftest conftest$ac_cv_exeext
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4009$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010
4011rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004012EXEEXT=$ac_cv_exeext
4013ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015/* end confdefs.h. */
4016#include <stdio.h>
4017int
4018main ()
4019{
4020FILE *f = fopen ("conftest.out", "w");
4021 return ferror (f) || fclose (f) != 0;
4022
4023 ;
4024 return 0;
4025}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004027ac_clean_files="$ac_clean_files conftest.out"
4028# Check that the compiler produces executables we can run. If not, either
4029# the compiler is broken, or we cross compile.
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4031$as_echo_n "checking whether we are cross compiling... " >&6; }
4032if test "$cross_compiling" != yes; then
4033 { { ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
4038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4039$as_echo "$ac_try_echo"; } >&5
4040 (eval "$ac_link") 2>&5
4041 ac_status=$?
4042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4043 test $ac_status = 0; }
4044 if { ac_try='./conftest$ac_cv_exeext'
4045 { { case "(($ac_try" in
4046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4047 *) ac_try_echo=$ac_try;;
4048esac
4049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4050$as_echo "$ac_try_echo"; } >&5
4051 (eval "$ac_try") 2>&5
4052 ac_status=$?
4053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4054 test $ac_status = 0; }; }; then
4055 cross_compiling=no
4056 else
4057 if test "$cross_compiling" = maybe; then
4058 cross_compiling=yes
4059 else
4060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004063If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004064See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004065 fi
4066 fi
4067fi
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4069$as_echo "$cross_compiling" >&6; }
4070
4071rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4072ac_clean_files=$ac_clean_files_save
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4074$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004075if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo_n "(cached) " >&6
4077else
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004079/* end confdefs.h. */
4080
4081int
4082main ()
4083{
4084
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004090if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 for ac_file in conftest.o conftest.obj conftest.*; do
4102 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4106 break;;
4107 esac
4108done
4109else
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004111sed 's/^/| /' conftest.$ac_ext >&5
4112
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004115as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004116See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004117fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4121$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004122OBJEXT=$ac_cv_objext
4123ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4125$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004126if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
Martin v. Löwis11437992002-04-12 09:54:03 +00004132int
4133main ()
4134{
4135#ifndef __GNUC__
4136 choke me
4137#endif
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 ac_compiler_gnu=yes
4145else
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004149ac_cv_c_compiler_gnu=$ac_compiler_gnu
4150
4151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4153$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4154if test $ac_compiler_gnu = yes; then
4155 GCC=yes
4156else
4157 GCC=
4158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_test_CFLAGS=${CFLAGS+set}
4160ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4162$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166 ac_save_c_werror_flag=$ac_c_werror_flag
4167 ac_c_werror_flag=yes
4168 ac_cv_prog_cc_g=no
4169 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Martin v. Löwis11437992002-04-12 09:54:03 +00004173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004182 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 CFLAGS=""
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186/* end confdefs.h. */
4187
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197
Matthias Kloseb9621712010-04-24 17:59:49 +00004198else
4199 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4220 ac_c_werror_flag=$ac_save_c_werror_flag
4221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4223$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004224if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004226elif test $ac_cv_prog_cc_g = yes; then
4227 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004228 CFLAGS="-g -O2"
4229 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004230 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231 fi
4232else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004233 if test "$GCC" = yes; then
4234 CFLAGS="-O2"
4235 else
4236 CFLAGS=
4237 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4240$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004241if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004243else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004245ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004247/* end confdefs.h. */
4248#include <stdarg.h>
4249#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004250struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004251/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4252struct buf { int x; };
4253FILE * (*rcsopen) (struct buf *, struct stat *, int);
4254static char *e (p, i)
4255 char **p;
4256 int i;
4257{
4258 return p[i];
4259}
4260static char *f (char * (*g) (char **, int), char **p, ...)
4261{
4262 char *s;
4263 va_list v;
4264 va_start (v,p);
4265 s = g (p, va_arg (v,int));
4266 va_end (v);
4267 return s;
4268}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004269
4270/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4271 function prototypes and stuff, but not '\xHH' hex character constants.
4272 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004274 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4275 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004277int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4280 inside strings and character constants. */
4281#define FOO(x) 'x'
4282int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4283
Skip Montanaro6dead952003-09-25 14:50:04 +00004284int test (int i, double x);
4285struct s1 {int (*f) (int a);};
4286struct s2 {int (*f) (double a);};
4287int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4288int argc;
4289char **argv;
4290int
4291main ()
4292{
4293return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4294 ;
4295 return 0;
4296}
4297_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4299 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004300do
4301 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305rm -f core conftest.err conftest.$ac_objext
4306 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004307done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004309CC=$ac_save_CC
4310
4311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312# AC_CACHE_VAL
4313case "x$ac_cv_prog_cc_c89" in
4314 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4316$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4319$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004320 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4323$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004326
Matthias Kloseb9621712010-04-24 17:59:49 +00004327fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004328
Martin v. Löwis11437992002-04-12 09:54:03 +00004329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4341$as_echo_n "checking how to run the C preprocessor... " >&6; }
4342# On Suns, sometimes $CPP names a directory.
4343if test -n "$CPP" && test -d "$CPP"; then
4344 CPP=
4345fi
4346if test -z "$CPP"; then
4347 if ${ac_cv_prog_CPP+:} false; then :
4348 $as_echo_n "(cached) " >&6
4349else
4350 # Double quotes because CPP needs to be expanded
4351 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4352 do
4353 ac_preproc_ok=false
4354for ac_c_preproc_warn_flag in '' yes
4355do
4356 # Use a header file that comes with gcc, so configuring glibc
4357 # with a fresh cross-compiler works.
4358 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4359 # <limits.h> exists even on freestanding compilers.
4360 # On the NeXT, cc -E runs the code through the compiler's parser,
4361 # not just through cpp. "Syntax error" is here to catch this case.
4362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4363/* end confdefs.h. */
4364#ifdef __STDC__
4365# include <limits.h>
4366#else
4367# include <assert.h>
4368#endif
4369 Syntax error
4370_ACEOF
4371if ac_fn_c_try_cpp "$LINENO"; then :
4372
4373else
4374 # Broken: fails on valid input.
4375continue
4376fi
4377rm -f conftest.err conftest.i conftest.$ac_ext
4378
4379 # OK, works on sane cases. Now check whether nonexistent headers
4380 # can be detected and how.
4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382/* end confdefs.h. */
4383#include <ac_nonexistent.h>
4384_ACEOF
4385if ac_fn_c_try_cpp "$LINENO"; then :
4386 # Broken: success on invalid input.
4387continue
4388else
4389 # Passes both tests.
4390ac_preproc_ok=:
4391break
4392fi
4393rm -f conftest.err conftest.i conftest.$ac_ext
4394
4395done
4396# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4397rm -f conftest.i conftest.err conftest.$ac_ext
4398if $ac_preproc_ok; then :
4399 break
4400fi
4401
4402 done
4403 ac_cv_prog_CPP=$CPP
4404
4405fi
4406 CPP=$ac_cv_prog_CPP
4407else
4408 ac_cv_prog_CPP=$CPP
4409fi
4410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4411$as_echo "$CPP" >&6; }
4412ac_preproc_ok=false
4413for ac_c_preproc_warn_flag in '' yes
4414do
4415 # Use a header file that comes with gcc, so configuring glibc
4416 # with a fresh cross-compiler works.
4417 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4418 # <limits.h> exists even on freestanding compilers.
4419 # On the NeXT, cc -E runs the code through the compiler's parser,
4420 # not just through cpp. "Syntax error" is here to catch this case.
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422/* end confdefs.h. */
4423#ifdef __STDC__
4424# include <limits.h>
4425#else
4426# include <assert.h>
4427#endif
4428 Syntax error
4429_ACEOF
4430if ac_fn_c_try_cpp "$LINENO"; then :
4431
4432else
4433 # Broken: fails on valid input.
4434continue
4435fi
4436rm -f conftest.err conftest.i conftest.$ac_ext
4437
4438 # OK, works on sane cases. Now check whether nonexistent headers
4439 # can be detected and how.
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h. */
4442#include <ac_nonexistent.h>
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445 # Broken: success on invalid input.
4446continue
4447else
4448 # Passes both tests.
4449ac_preproc_ok=:
4450break
4451fi
4452rm -f conftest.err conftest.i conftest.$ac_ext
4453
4454done
4455# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4456rm -f conftest.i conftest.err conftest.$ac_ext
4457if $ac_preproc_ok; then :
4458
4459else
4460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4462as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4463See \`config.log' for more details" "$LINENO" 5; }
4464fi
4465
4466ac_ext=c
4467ac_cpp='$CPP $CPPFLAGS'
4468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4470ac_compiler_gnu=$ac_cv_c_compiler_gnu
4471
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4473$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4474if ${ac_cv_path_GREP+:} false; then :
4475 $as_echo_n "(cached) " >&6
4476else
4477 if test -z "$GREP"; then
4478 ac_path_GREP_found=false
4479 # Loop through the user's path and test for each of PROGNAME-LIST
4480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4482do
4483 IFS=$as_save_IFS
4484 test -z "$as_dir" && as_dir=.
4485 for ac_prog in grep ggrep; do
4486 for ac_exec_ext in '' $ac_executable_extensions; do
4487 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4488 as_fn_executable_p "$ac_path_GREP" || continue
4489# Check for GNU ac_path_GREP and select it if it is found.
4490 # Check for GNU $ac_path_GREP
4491case `"$ac_path_GREP" --version 2>&1` in
4492*GNU*)
4493 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4494*)
4495 ac_count=0
4496 $as_echo_n 0123456789 >"conftest.in"
4497 while :
4498 do
4499 cat "conftest.in" "conftest.in" >"conftest.tmp"
4500 mv "conftest.tmp" "conftest.in"
4501 cp "conftest.in" "conftest.nl"
4502 $as_echo 'GREP' >> "conftest.nl"
4503 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4504 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4505 as_fn_arith $ac_count + 1 && ac_count=$as_val
4506 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4507 # Best one so far, save it but keep looking for a better one
4508 ac_cv_path_GREP="$ac_path_GREP"
4509 ac_path_GREP_max=$ac_count
4510 fi
4511 # 10*(2^10) chars as input seems more than enough
4512 test $ac_count -gt 10 && break
4513 done
4514 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4515esac
4516
4517 $ac_path_GREP_found && break 3
4518 done
4519 done
4520 done
4521IFS=$as_save_IFS
4522 if test -z "$ac_cv_path_GREP"; then
4523 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4524 fi
4525else
4526 ac_cv_path_GREP=$GREP
4527fi
4528
4529fi
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4531$as_echo "$ac_cv_path_GREP" >&6; }
4532 GREP="$ac_cv_path_GREP"
4533
4534
Łukasz Langaa785c872016-09-09 17:37:37 -07004535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4536$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4537if ${ac_cv_path_SED+:} false; then :
4538 $as_echo_n "(cached) " >&6
4539else
4540 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4541 for ac_i in 1 2 3 4 5 6 7; do
4542 ac_script="$ac_script$as_nl$ac_script"
4543 done
4544 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4545 { ac_script=; unset ac_script;}
4546 if test -z "$SED"; then
4547 ac_path_SED_found=false
4548 # Loop through the user's path and test for each of PROGNAME-LIST
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
4554 for ac_prog in sed gsed; do
4555 for ac_exec_ext in '' $ac_executable_extensions; do
4556 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4557 as_fn_executable_p "$ac_path_SED" || continue
4558# Check for GNU ac_path_SED and select it if it is found.
4559 # Check for GNU $ac_path_SED
4560case `"$ac_path_SED" --version 2>&1` in
4561*GNU*)
4562 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4563*)
4564 ac_count=0
4565 $as_echo_n 0123456789 >"conftest.in"
4566 while :
4567 do
4568 cat "conftest.in" "conftest.in" >"conftest.tmp"
4569 mv "conftest.tmp" "conftest.in"
4570 cp "conftest.in" "conftest.nl"
4571 $as_echo '' >> "conftest.nl"
4572 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4573 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4574 as_fn_arith $ac_count + 1 && ac_count=$as_val
4575 if test $ac_count -gt ${ac_path_SED_max-0}; then
4576 # Best one so far, save it but keep looking for a better one
4577 ac_cv_path_SED="$ac_path_SED"
4578 ac_path_SED_max=$ac_count
4579 fi
4580 # 10*(2^10) chars as input seems more than enough
4581 test $ac_count -gt 10 && break
4582 done
4583 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4584esac
4585
4586 $ac_path_SED_found && break 3
4587 done
4588 done
4589 done
4590IFS=$as_save_IFS
4591 if test -z "$ac_cv_path_SED"; then
4592 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4593 fi
4594else
4595 ac_cv_path_SED=$SED
4596fi
4597
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4600$as_echo "$ac_cv_path_SED" >&6; }
4601 SED="$ac_cv_path_SED"
4602 rm -f conftest.sed
4603
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004604
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605
4606
Matthias Kloseb9621712010-04-24 17:59:49 +00004607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4608$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004610# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004611if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004612 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
4614 case $withval in
4615 no) with_cxx_main=no
4616 MAINCC='$(CC)';;
4617 yes) with_cxx_main=yes
4618 MAINCC='$(CXX)';;
4619 *) with_cxx_main=yes
4620 MAINCC=$withval
4621 if test -z "$CXX"
4622 then
4623 CXX=$withval
4624 fi;;
4625 esac
4626else
4627
4628 with_cxx_main=no
4629 MAINCC='$(CC)'
4630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4634$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636preset_cxx="$CXX"
4637if test -z "$CXX"
4638then
4639 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 gcc) if test -n "$ac_tool_prefix"; then
4641 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4642set dummy ${ac_tool_prefix}g++; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_CXX+:} false; then :
4646 $as_echo_n "(cached) " >&6
4647else
4648 case $CXX in
4649 [\\/]* | ?:[\\/]*)
4650 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4651 ;;
4652 *)
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in notfound
4655do
4656 IFS=$as_save_IFS
4657 test -z "$as_dir" && as_dir=.
4658 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662 break 2
4663 fi
4664done
4665 done
4666IFS=$as_save_IFS
4667
4668 ;;
4669esac
4670fi
4671CXX=$ac_cv_path_CXX
4672if test -n "$CXX"; then
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4674$as_echo "$CXX" >&6; }
4675else
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681fi
4682if test -z "$ac_cv_path_CXX"; then
4683 ac_pt_CXX=$CXX
4684 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004685set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688if ${ac_cv_path_ac_pt_CXX+:} false; then :
4689 $as_echo_n "(cached) " >&6
4690else
4691 case $ac_pt_CXX in
4692 [\\/]* | ?:[\\/]*)
4693 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4694 ;;
4695 *)
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in notfound
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
4707done
4708 done
4709IFS=$as_save_IFS
4710
4711 ;;
4712esac
4713fi
4714ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4715if test -n "$ac_pt_CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4717$as_echo "$ac_pt_CXX" >&6; }
4718else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723 if test "x$ac_pt_CXX" = x; then
4724 CXX="g++"
4725 else
4726 case $cross_compiling:$ac_tool_warned in
4727yes:)
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4730ac_tool_warned=yes ;;
4731esac
4732 CXX=$ac_pt_CXX
4733 fi
4734else
4735 CXX="$ac_cv_path_CXX"
4736fi
4737 ;;
4738 cc) if test -n "$ac_tool_prefix"; then
4739 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4740set dummy ${ac_tool_prefix}c++; ac_word=$2
4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004743if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745else
4746 case $CXX in
4747 [\\/]* | ?:[\\/]*)
4748 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4749 ;;
4750 *)
4751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4752for as_dir in notfound
4753do
4754 IFS=$as_save_IFS
4755 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760 break 2
4761 fi
4762done
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 ;;
4767esac
4768fi
4769CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004770if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4772$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004773else
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004777
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778
4779fi
4780if test -z "$ac_cv_path_CXX"; then
4781 ac_pt_CXX=$CXX
4782 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004786if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 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 +00004792 ;;
4793 *)
4794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4795for as_dir in notfound
4796do
4797 IFS=$as_save_IFS
4798 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004800 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 break 2
4804 fi
4805done
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 ;;
4810esac
4811fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4813if test -n "$ac_pt_CXX"; then
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4815$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816else
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004820
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 if test "x$ac_pt_CXX" = x; then
4822 CXX="c++"
4823 else
4824 case $cross_compiling:$ac_tool_warned in
4825yes:)
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4828ac_tool_warned=yes ;;
4829esac
4830 CXX=$ac_pt_CXX
4831 fi
4832else
4833 CXX="$ac_cv_path_CXX"
4834fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836 clang|*/clang) if test -n "$ac_tool_prefix"; then
4837 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4838set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if ${ac_cv_path_CXX+:} false; then :
4842 $as_echo_n "(cached) " >&6
4843else
4844 case $CXX in
4845 [\\/]* | ?:[\\/]*)
4846 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in notfound
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004856 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860done
4861 done
4862IFS=$as_save_IFS
4863
Ned Deilycbfb9a52012-06-23 16:02:19 -07004864 ;;
4865esac
4866fi
4867CXX=$ac_cv_path_CXX
4868if test -n "$CXX"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4870$as_echo "$CXX" >&6; }
4871else
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876
4877fi
4878if test -z "$ac_cv_path_CXX"; then
4879 ac_pt_CXX=$CXX
4880 # Extract the first word of "clang++", so it can be a program name with args.
4881set dummy clang++; ac_word=$2
4882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4883$as_echo_n "checking for $ac_word... " >&6; }
4884if ${ac_cv_path_ac_pt_CXX+:} false; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 case $ac_pt_CXX in
4888 [\\/]* | ?:[\\/]*)
4889 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4890 ;;
4891 *)
4892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893for as_dir in notfound
4894do
4895 IFS=$as_save_IFS
4896 test -z "$as_dir" && as_dir=.
4897 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004899 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4901 break 2
4902 fi
4903done
4904 done
4905IFS=$as_save_IFS
4906
4907 ;;
4908esac
4909fi
4910ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4911if test -n "$ac_pt_CXX"; then
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4913$as_echo "$ac_pt_CXX" >&6; }
4914else
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4916$as_echo "no" >&6; }
4917fi
4918
4919 if test "x$ac_pt_CXX" = x; then
4920 CXX="clang++"
4921 else
4922 case $cross_compiling:$ac_tool_warned in
4923yes:)
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4926ac_tool_warned=yes ;;
4927esac
4928 CXX=$ac_pt_CXX
4929 fi
4930else
4931 CXX="$ac_cv_path_CXX"
4932fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004933 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004934 icc|*/icc) if test -n "$ac_tool_prefix"; then
4935 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4936set dummy ${ac_tool_prefix}icpc; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_CXX+:} false; then :
4940 $as_echo_n "(cached) " >&6
4941else
4942 case $CXX in
4943 [\\/]* | ?:[\\/]*)
4944 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4945 ;;
4946 *)
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in notfound
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
4953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962 ;;
4963esac
4964fi
4965CXX=$ac_cv_path_CXX
4966if test -n "$CXX"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4968$as_echo "$CXX" >&6; }
4969else
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974
4975fi
4976if test -z "$ac_cv_path_CXX"; then
4977 ac_pt_CXX=$CXX
4978 # Extract the first word of "icpc", so it can be a program name with args.
4979set dummy icpc; ac_word=$2
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4981$as_echo_n "checking for $ac_word... " >&6; }
4982if ${ac_cv_path_ac_pt_CXX+:} false; then :
4983 $as_echo_n "(cached) " >&6
4984else
4985 case $ac_pt_CXX in
4986 [\\/]* | ?:[\\/]*)
4987 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4988 ;;
4989 *)
4990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4991for as_dir in notfound
4992do
4993 IFS=$as_save_IFS
4994 test -z "$as_dir" && as_dir=.
4995 for ac_exec_ext in '' $ac_executable_extensions; do
4996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4997 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4999 break 2
5000 fi
5001done
5002 done
5003IFS=$as_save_IFS
5004
5005 ;;
5006esac
5007fi
5008ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5009if test -n "$ac_pt_CXX"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5011$as_echo "$ac_pt_CXX" >&6; }
5012else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014$as_echo "no" >&6; }
5015fi
5016
5017 if test "x$ac_pt_CXX" = x; then
5018 CXX="icpc"
5019 else
5020 case $cross_compiling:$ac_tool_warned in
5021yes:)
5022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5024ac_tool_warned=yes ;;
5025esac
5026 CXX=$ac_pt_CXX
5027 fi
5028else
5029 CXX="$ac_cv_path_CXX"
5030fi
5031 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032 esac
5033 if test "$CXX" = "notfound"
5034 then
5035 CXX=""
5036 fi
5037fi
5038if test -z "$CXX"
5039then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 if test -n "$ac_tool_prefix"; then
5041 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5042 do
5043 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005047if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
5050 if test -n "$CXX"; then
5051 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067
5068fi
5069fi
5070CXX=$ac_cv_prog_CXX
5071if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077fi
5078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 test -n "$CXX" && break
5081 done
5082fi
5083if test -z "$CXX"; then
5084 ac_ct_CXX=$CXX
5085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5086do
5087 # Extract the first word of "$ac_prog", so it can be a program name with args.
5088set dummy $ac_prog; ac_word=$2
5089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
5091if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5092 $as_echo_n "(cached) " >&6
5093else
5094 if test -n "$ac_ct_CXX"; then
5095 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5096else
5097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
5102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 ac_cv_prog_ac_ct_CXX="$ac_prog"
5105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106 break 2
5107 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005108done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005109 done
5110IFS=$as_save_IFS
5111
5112fi
5113fi
5114ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5115if test -n "$ac_ct_CXX"; then
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5117$as_echo "$ac_ct_CXX" >&6; }
5118else
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
5121fi
5122
5123
5124 test -n "$ac_ct_CXX" && break
5125done
5126
5127 if test "x$ac_ct_CXX" = x; then
5128 CXX="notfound"
5129 else
5130 case $cross_compiling:$ac_tool_warned in
5131yes:)
5132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5134ac_tool_warned=yes ;;
5135esac
5136 CXX=$ac_ct_CXX
5137 fi
5138fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139
5140 if test "$CXX" = "notfound"
5141 then
5142 CXX=""
5143 fi
5144fi
5145if test "$preset_cxx" != "$CXX"
5146then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005147 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148
5149 By default, distutils will build C++ extension modules with \"$CXX\".
5150 If this is not intended, then set CXX on the configure command line.
5151 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005152$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005153
5154 By default, distutils will build C++ extension modules with \"$CXX\".
5155 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005156 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005157fi
5158
5159
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005160MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5161
5162
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5164$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5165cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005166#undef bfin
5167#undef cris
5168#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005170#undef hppa
5171#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005172#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005173#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005174#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005175#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005176#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005177#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005178 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005179#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005180# if defined(__x86_64__) && defined(__LP64__)
5181 x86_64-linux-gnu
5182# elif defined(__x86_64__) && defined(__ILP32__)
5183 x86_64-linux-gnux32
5184# elif defined(__i386__)
5185 i386-linux-gnu
5186# elif defined(__aarch64__) && defined(__AARCH64EL__)
5187# if defined(__ILP32__)
5188 aarch64_ilp32-linux-gnu
5189# else
5190 aarch64-linux-gnu
5191# endif
5192# elif defined(__aarch64__) && defined(__AARCH64EB__)
5193# if defined(__ILP32__)
5194 aarch64_be_ilp32-linux-gnu
5195# else
5196 aarch64_be-linux-gnu
5197# endif
5198# elif defined(__alpha__)
5199 alpha-linux-gnu
5200# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5201# if defined(__ARMEL__)
5202 arm-linux-gnueabihf
5203# else
5204 armeb-linux-gnueabihf
5205# endif
5206# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5207# if defined(__ARMEL__)
5208 arm-linux-gnueabi
5209# else
5210 armeb-linux-gnueabi
5211# endif
5212# elif defined(__hppa__)
5213 hppa-linux-gnu
5214# elif defined(__ia64__)
5215 ia64-linux-gnu
5216# elif defined(__m68k__) && !defined(__mcoldfire__)
5217 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005218# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5219# if _MIPS_SIM == _ABIO32
5220 mipsisa32r6el-linux-gnu
5221# elif _MIPS_SIM == _ABIN32
5222 mipsisa64r6el-linux-gnuabin32
5223# elif _MIPS_SIM == _ABI64
5224 mipsisa64r6el-linux-gnuabi64
5225# else
5226# error unknown platform triplet
5227# endif
5228# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5229# if _MIPS_SIM == _ABIO32
5230 mipsisa32r6-linux-gnu
5231# elif _MIPS_SIM == _ABIN32
5232 mipsisa64r6-linux-gnuabin32
5233# elif _MIPS_SIM == _ABI64
5234 mipsisa64r6-linux-gnuabi64
5235# else
5236# error unknown platform triplet
5237# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# elif defined(__mips_hard_float) && defined(_MIPSEL)
5239# if _MIPS_SIM == _ABIO32
5240 mipsel-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mips64el-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mips64el-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
5248# elif defined(__mips_hard_float)
5249# if _MIPS_SIM == _ABIO32
5250 mips-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__or1k__)
5259 or1k-linux-gnu
5260# elif defined(__powerpc__) && defined(__SPE__)
5261 powerpc-linux-gnuspe
5262# elif defined(__powerpc64__)
5263# if defined(__LITTLE_ENDIAN__)
5264 powerpc64le-linux-gnu
5265# else
5266 powerpc64-linux-gnu
5267# endif
5268# elif defined(__powerpc__)
5269 powerpc-linux-gnu
5270# elif defined(__s390x__)
5271 s390x-linux-gnu
5272# elif defined(__s390__)
5273 s390-linux-gnu
5274# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5275 sh4-linux-gnu
5276# elif defined(__sparc__) && defined(__arch64__)
5277 sparc64-linux-gnu
5278# elif defined(__sparc__)
5279 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005280# elif defined(__riscv)
5281# if __riscv_xlen == 32
5282 riscv32-linux-gnu
5283# elif __riscv_xlen == 64
5284 riscv64-linux-gnu
5285# else
5286# error unknown platform triplet
5287# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__FreeBSD_kernel__)
5292# if defined(__LP64__)
5293 x86_64-kfreebsd-gnu
5294# elif defined(__i386__)
5295 i386-kfreebsd-gnu
5296# else
5297# error unknown platform triplet
5298# endif
5299#elif defined(__gnu_hurd__)
5300 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005301#elif defined(__APPLE__)
5302 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005303#elif defined(__VXWORKS__)
5304 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305#else
5306# error unknown platform triplet
5307#endif
5308
5309EOF
5310
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005311if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5314$as_echo "$PLATFORM_TRIPLET" >&6; }
5315else
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5317$as_echo "none" >&6; }
5318fi
5319rm -f conftest.c conftest.out
5320
5321if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5322 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5323 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5324 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005325elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5326 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005327fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005328
doko@ubuntu.com55532312016-06-14 08:55:19 +02005329if test x$MULTIARCH != x; then
5330 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5331fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005332
5333
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5335$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5336save_LDFLAGS="$LDFLAGS"
5337LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5340/* end confdefs.h. */
5341
5342int
5343main ()
5344{
5345
5346 ;
5347 return 0;
5348}
5349_ACEOF
5350if ac_fn_c_try_link "$LINENO"; then :
5351 NO_AS_NEEDED="-Wl,--no-as-needed"
5352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5353$as_echo "yes" >&6; }
5354else
5355 NO_AS_NEEDED=""
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359rm -f core conftest.err conftest.$ac_objext \
5360 conftest$ac_exeext conftest.$ac_ext
5361LDFLAGS="$save_LDFLAGS"
5362
5363
5364
5365# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366
Matthias Kloseb9621712010-04-24 17:59:49 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5368$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005369if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371else
5372 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5373 then ac_cv_path_EGREP="$GREP -E"
5374 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 # Loop through the user's path and test for each of PROGNAME-LIST
5378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5380do
5381 IFS=$as_save_IFS
5382 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 for ac_prog in egrep; do
5384 for ac_exec_ext in '' $ac_executable_extensions; do
5385 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005386 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005387# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 # Check for GNU $ac_path_EGREP
5389case `"$ac_path_EGREP" --version 2>&1` in
5390*GNU*)
5391 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5392*)
5393 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 while :
5396 do
5397 cat "conftest.in" "conftest.in" >"conftest.tmp"
5398 mv "conftest.tmp" "conftest.in"
5399 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5405 # Best one so far, save it but keep looking for a better one
5406 ac_cv_path_EGREP="$ac_path_EGREP"
5407 ac_path_EGREP_max=$ac_count
5408 fi
5409 # 10*(2^10) chars as input seems more than enough
5410 test $ac_count -gt 10 && break
5411 done
5412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5413esac
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $ac_path_EGREP_found && break 3
5416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005421 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 +00005422 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423else
5424 ac_cv_path_EGREP=$EGREP
5425fi
5426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427 fi
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5430$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005432
5433
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5435$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005436if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 $as_echo_n "(cached) " >&6
5438else
5439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005441#include <stdlib.h>
5442#include <stdarg.h>
5443#include <string.h>
5444#include <float.h>
5445
5446int
5447main ()
5448{
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_header_stdc=yes
5456else
5457 ac_cv_header_stdc=no
5458fi
5459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005466
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005467_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471else
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005474rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Matthias Kloseb9621712010-04-24 17:59:49 +00005476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <stdlib.h>
5483
5484_ACEOF
5485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5486 $EGREP "free" >/dev/null 2>&1; then :
5487
5488else
5489 ac_cv_header_stdc=no
5490fi
5491rm -f conftest*
5492
5493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5497 if test "$cross_compiling" = yes; then :
5498 :
5499else
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#include <ctype.h>
5503#include <stdlib.h>
5504#if ((' ' & 0x0FF) == 0x020)
5505# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5506# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5507#else
5508# define ISLOWER(c) \
5509 (('a' <= (c) && (c) <= 'i') \
5510 || ('j' <= (c) && (c) <= 'r') \
5511 || ('s' <= (c) && (c) <= 'z'))
5512# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5513#endif
5514
5515#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5516int
5517main ()
5518{
5519 int i;
5520 for (i = 0; i < 256; i++)
5521 if (XOR (islower (i), ISLOWER (i))
5522 || toupper (i) != TOUPPER (i))
5523 return 2;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_run "$LINENO"; then :
5528
5529else
5530 ac_cv_header_stdc=no
5531fi
5532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5533 conftest.$ac_objext conftest.beam conftest.$ac_ext
5534fi
5535
5536fi
5537fi
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5539$as_echo "$ac_cv_header_stdc" >&6; }
5540if test $ac_cv_header_stdc = yes; then
5541
5542$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5543
5544fi
5545
5546# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5547for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5548 inttypes.h stdint.h unistd.h
5549do :
5550 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5551ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5552"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 cat >>confdefs.h <<_ACEOF
5555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5556_ACEOF
5557
5558fi
5559
5560done
5561
5562
5563
5564 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 +02005565if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 MINIX=yes
5567else
5568 MINIX=
5569fi
5570
5571
5572 if test "$MINIX" = yes; then
5573
5574$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5575
5576
5577$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5578
5579
5580$as_echo "#define _MINIX 1" >>confdefs.h
5581
5582 fi
5583
5584
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5586$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005587if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005588 $as_echo_n "(cached) " >&6
5589else
5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5591/* end confdefs.h. */
5592
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005593# define __EXTENSIONS__ 1
5594 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_safe_to_define___extensions__=yes
5605else
5606 ac_cv_safe_to_define___extensions__=no
5607fi
5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5609fi
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5611$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5612 test $ac_cv_safe_to_define___extensions__ = yes &&
5613 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5614
5615 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5618
5619 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5620
5621 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5622
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5626$as_echo_n "checking for the Android API level... " >&6; }
5627cat >> conftest.c <<EOF
5628#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005629android_api = __ANDROID_API__
5630arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631#else
5632#error not Android
5633#endif
5634EOF
5635
5636if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5638 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5640$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005641 if test -z "$ANDROID_API_LEVEL"; then
5642 echo 'Fatal: you must define __ANDROID_API__'
5643 exit 1
5644 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645
5646cat >>confdefs.h <<_ACEOF
5647#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5648_ACEOF
5649
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005650
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5652$as_echo_n "checking for the Android arm ABI... " >&6; }
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5654$as_echo "$_arm_arch" >&6; }
5655 if test "$_arm_arch" = 7; then
5656 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5657 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5658 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005659else
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5661$as_echo "not Android" >&6; }
5662fi
5663rm -f conftest.c conftest.out
5664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665# Check for unsupported systems
5666case $ac_sys_system/$ac_sys_release in
5667atheos*|Linux*/1*)
5668 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5669 echo See README for details.
5670 exit 1;;
5671esac
5672
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5675$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005678if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 withval=$with_suffix;
5680 case $withval in
5681 no) EXEEXT=;;
5682 yes) EXEEXT=.exe;;
5683 *) EXEEXT=$withval;;
5684 esac
5685fi
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5688$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690# Test whether we're running on a non-case-sensitive system, in which
5691# case we give a warning if no ext is given
5692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5694$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test ! -d CaseSensitiveTestDir; then
5696mkdir CaseSensitiveTestDir
5697fi
5698
5699if test -d casesensitivetestdir
5700then
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5702$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703 BUILDEXEEXT=.exe
5704else
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 BUILDEXEEXT=$EXEEXT
5708fi
5709rmdir CaseSensitiveTestDir
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711case $ac_sys_system in
5712hp*|HP*)
5713 case $CC in
5714 cc|*/cc) CC="$CC -Ae";;
5715 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716esac
5717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5720$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721if test -z "$LIBRARY"
5722then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005723 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5726$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728# LDLIBRARY is the name of the library to link against (as opposed to the
5729# name of the library into which to insert object files). BLDLIBRARY is also
5730# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5731# is blank as the main program is not linked directly against LDLIBRARY.
5732# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5733# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5734# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5735# DLLLIBRARY is the shared (i.e., DLL) library.
5736#
5737# RUNSHARED is used to run shared python without installed libraries
5738#
5739# INSTSONAME is the name of the shared library that will be use to install
5740# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005741#
5742# LDVERSION is the shared library version number, normally the Python version
5743# with the ABI build flags appended.
5744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746
5747
5748
5749
5750
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752LDLIBRARY="$LIBRARY"
5753BLDLIBRARY='$(LDLIBRARY)'
5754INSTSONAME='$(LDLIBRARY)'
5755DLLLIBRARY=''
5756LDLIBRARYDIR=''
5757RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005758LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LINKCC is the command that links the python executable -- default is $(CC).
5761# If CXX is set, and if it is needed to link a main function that was
5762# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5763# python might then depend on the C++ runtime
5764# This is altered for AIX in order to build the export list before
5765# linking.
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5768$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769if test -z "$LINKCC"
5770then
5771 LINKCC='$(PURIFY) $(MAINCC)'
5772 case $ac_sys_system in
5773 AIX*)
5774 exp_extra="\"\""
5775 if test $ac_sys_release -ge 5 -o \
5776 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5777 exp_extra="."
5778 fi
5779 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780 QNX*)
5781 # qcc must be used because the other compilers do not
5782 # support -N.
5783 LINKCC=qcc;;
5784 esac
5785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5787$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
5789# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5790# make sure we default having it set to "no": this is used by
5791# distutils.unixccompiler to know if it should add --enable-new-dtags
5792# to linker command lines, and failing to detect GNU ld simply results
5793# in the same bahaviour as before.
5794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5796$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797ac_prog=ld
5798if test "$GCC" = yes; then
5799 ac_prog=`$CC -print-prog-name=ld`
5800fi
5801case `"$ac_prog" -V 2>&1 < /dev/null` in
5802 *GNU*)
5803 GNULD=yes;;
5804 *)
5805 GNULD=no;;
5806esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5808$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5811$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 enableval=$enable_shared;
5815fi
5816
5817
5818if test -z "$enable_shared"
5819then
5820 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005821 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 enable_shared="yes";;
5823 *)
5824 enable_shared="no";;
5825 esac
5826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5828$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5831$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enableval=$enable_profiling;
5835fi
5836
5837if test "x$enable_profiling" = xyes; then
5838 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005839 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841/* end confdefs.h. */
5842int main() { return 0; }
5843_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844if ac_fn_c_try_link "$LINENO"; then :
5845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005847 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849rm -f core conftest.err conftest.$ac_objext \
5850 conftest$ac_exeext conftest.$ac_ext
5851 CC="$ac_save_cc"
5852else
5853 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5856$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858if test "x$enable_profiling" = xyes; then
5859 BASECFLAGS="-pg $BASECFLAGS"
5860 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861fi
5862
Matthias Kloseb9621712010-04-24 17:59:49 +00005863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865
5866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5867# library that we build, but we do not want to link against it (we
5868# will find it with a -framework option). For this reason there is an
5869# extra variable BLDLIBRARY against which Python and the extension
5870# modules are linked, BLDLIBRARY. This is normally the same as
5871# LDLIBRARY, but empty for MacOSX framework builds.
5872if test "$enable_framework"
5873then
5874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005875 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 BLDLIBRARY=''
5877else
5878 BLDLIBRARY='$(LDLIBRARY)'
5879fi
5880
5881# Other platforms follow
5882if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005883 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887 case $ac_sys_system in
5888 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).dll.a'
5890 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
5892 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).so'
5894 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005897 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005898 then
5899 PY3LIBRARY=libpython3.so
5900 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005902 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
5904 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005907 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005908 then
5909 PY3LIBRARY=libpython3.so
5910 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 hp*|HP*)
5913 case `uname -m` in
5914 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
5920 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).dylib'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005929 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005932 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
5934 esac
5935else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005936 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 case $ac_sys_system in
5938 CYGWIN*)
5939 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
5943fi
5944
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005945if test "$cross_compiling" = yes; then
5946 RUNSHARED=
5947fi
5948
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5950$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005953if test -n "$ac_tool_prefix"; then
5954 for ac_prog in ar aal
5955 do
5956 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5957set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005960if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962else
5963 if test -n "$AR"; then
5964 ac_cv_prog_AR="$AR" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 break 2
5976 fi
5977done
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979IFS=$as_save_IFS
5980
5981fi
5982fi
5983AR=$ac_cv_prog_AR
5984if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5986$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990fi
5991
5992
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005993 test -n "$AR" && break
5994 done
5995fi
5996if test -z "$AR"; then
5997 ac_ct_AR=$AR
5998 for ac_prog in ar aal
5999do
6000 # Extract the first word of "$ac_prog", so it can be a program name with args.
6001set dummy $ac_prog; ac_word=$2
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003$as_echo_n "checking for $ac_word... " >&6; }
6004if ${ac_cv_prog_ac_ct_AR+:} false; then :
6005 $as_echo_n "(cached) " >&6
6006else
6007 if test -n "$ac_ct_AR"; then
6008 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6009else
6010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011for as_dir in $PATH
6012do
6013 IFS=$as_save_IFS
6014 test -z "$as_dir" && as_dir=.
6015 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006017 ac_cv_prog_ac_ct_AR="$ac_prog"
6018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6019 break 2
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006022 done
6023IFS=$as_save_IFS
6024
6025fi
6026fi
6027ac_ct_AR=$ac_cv_prog_ac_ct_AR
6028if test -n "$ac_ct_AR"; then
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6030$as_echo "$ac_ct_AR" >&6; }
6031else
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033$as_echo "no" >&6; }
6034fi
6035
6036
6037 test -n "$ac_ct_AR" && break
6038done
6039
6040 if test "x$ac_ct_AR" = x; then
6041 AR="ar"
6042 else
6043 case $cross_compiling:$ac_tool_warned in
6044yes:)
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6047ac_tool_warned=yes ;;
6048esac
6049 AR=$ac_ct_AR
6050 fi
6051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052
6053
6054# tweak ARFLAGS only if the user didn't set it on the command line
6055
6056if test -z "$ARFLAGS"
6057then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006058 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
doko@ubuntu.com58844492012-06-30 18:25:32 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in readelf
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
6068if ${ac_cv_prog_READELF+:} false; then :
6069 $as_echo_n "(cached) " >&6
6070else
6071 if test -n "$READELF"; then
6072 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
6079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006081 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6083 break 2
6084 fi
6085done
6086 done
6087IFS=$as_save_IFS
6088
6089fi
6090fi
6091READELF=$ac_cv_prog_READELF
6092if test -n "$READELF"; then
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6094$as_echo "$READELF" >&6; }
6095else
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
6098fi
6099
6100
6101 test -n "$READELF" && break
6102 done
6103fi
6104if test -z "$READELF"; then
6105 ac_ct_READELF=$READELF
6106 for ac_prog in readelf
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_READELF"; then
6116 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006125 ac_cv_prog_ac_ct_READELF="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
6129done
6130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6136if test -n "$ac_ct_READELF"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6138$as_echo "$ac_ct_READELF" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_READELF" && break
6146done
6147
6148 if test "x$ac_ct_READELF" = x; then
6149 READELF=":"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 READELF=$ac_ct_READELF
6158 fi
6159fi
6160
6161if test "$cross_compiling" = yes; then
6162 case "$READELF" in
6163 readelf|:)
6164 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6165 ;;
6166 esac
6167fi
6168
6169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006172hp*|HP*)
6173 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 if test -z "$INSTALL"
6175 then
6176 INSTALL="${srcdir}/install-sh -c"
6177 fi
6178esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179# Find a good install program. We prefer a C program (faster),
6180# so one script is as good as another. But avoid the broken or
6181# incompatible versions:
6182# SysV /etc/install, /usr/sbin/install
6183# SunOS /usr/etc/install
6184# IRIX /sbin/install
6185# AIX /bin/install
6186# AmigaOS /C/install, which installs bootblocks on floppy discs
6187# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6188# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6189# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6190# OS/2's system install, which has a completely different semantic
6191# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006192# Reject install programs that cannot install multiple files.
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6194$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006196if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198else
6199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6200for as_dir in $PATH
6201do
6202 IFS=$as_save_IFS
6203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 # Account for people who put trailing slashes in PATH elements.
6205case $as_dir/ in #((
6206 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209 /usr/ucb/* ) ;;
6210 *)
6211 # OSF1 and SCO ODT 3.0 have their own names for install.
6212 # Don't use installbsd from OSF since it installs stuff as root
6213 # by default.
6214 for ac_prog in ginstall scoinst install; do
6215 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006216 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 if test $ac_prog = install &&
6218 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6219 # AIX install. It has an incompatible calling convention.
6220 :
6221 elif test $ac_prog = install &&
6222 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6223 # program-specific install script used by HP pwplus--don't use.
6224 :
6225 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006226 rm -rf conftest.one conftest.two conftest.dir
6227 echo one > conftest.one
6228 echo two > conftest.two
6229 mkdir conftest.dir
6230 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6231 test -s conftest.one && test -s conftest.two &&
6232 test -s conftest.dir/conftest.one &&
6233 test -s conftest.dir/conftest.two
6234 then
6235 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6236 break 3
6237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 fi
6239 fi
6240 done
6241 done
6242 ;;
6243esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006244
6245 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246IFS=$as_save_IFS
6247
Matthias Kloseb9621712010-04-24 17:59:49 +00006248rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250fi
6251 if test "${ac_cv_path_install+set}" = set; then
6252 INSTALL=$ac_cv_path_install
6253 else
6254 # As a last resort, use the slow shell script. Don't cache a
6255 # value for INSTALL within a source directory, because that will
6256 # break other packages using the cache if that directory is
6257 # removed, or if the value is a relative name.
6258 INSTALL=$ac_install_sh
6259 fi
6260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6262$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263
6264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6265# It thinks the first close brace ends the variable substitution.
6266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6267
6268test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6269
6270test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6271
Matthias Klose93a0ef12012-03-15 18:08:34 +01006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6273$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6274if test -z "$MKDIR_P"; then
6275 if ${ac_cv_path_mkdir+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277else
6278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6280do
6281 IFS=$as_save_IFS
6282 test -z "$as_dir" && as_dir=.
6283 for ac_prog in mkdir gmkdir; do
6284 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006285 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006286 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6287 'mkdir (GNU coreutils) '* | \
6288 'mkdir (coreutils) '* | \
6289 'mkdir (fileutils) '4.1*)
6290 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6291 break 3;;
6292 esac
6293 done
6294 done
6295 done
6296IFS=$as_save_IFS
6297
6298fi
6299
6300 test -d ./--version && rmdir ./--version
6301 if test "${ac_cv_path_mkdir+set}" = set; then
6302 MKDIR_P="$ac_cv_path_mkdir -p"
6303 else
6304 # As a last resort, use the slow shell script. Don't cache a
6305 # value for MKDIR_P within a source directory, because that will
6306 # break other packages using the cache if that directory is
6307 # removed, or if the value is a relative name.
6308 MKDIR_P="$ac_install_sh -d"
6309 fi
6310fi
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6312$as_echo "$MKDIR_P" >&6; }
6313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Not every filesystem supports hard links
6316
6317if test -z "$LN" ; then
6318 case $ac_sys_system in
6319 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 *) LN=ln;;
6321 esac
6322fi
6323
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006324# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006325
6326ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6330$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
6332# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006333if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334 withval=$with_pydebug;
6335if test "$withval" != no
6336then
6337
Matthias Kloseb9621712010-04-24 17:59:49 +00006338$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6341$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006343 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006344else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347else
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6349$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350fi
6351
6352
Victor Stinnerf4e47032019-04-25 00:56:28 +02006353# Check for --with-trace-refs
6354# --with-trace-refs
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6356$as_echo_n "checking for --with-trace-refs... " >&6; }
6357
6358# Check whether --with-trace-refs was given.
6359if test "${with_trace_refs+set}" = set; then :
6360 withval=$with_trace_refs;
6361else
6362 with_trace_refs=no
6363fi
6364
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6366$as_echo "$with_trace_refs" >&6; }
6367
6368if test "$with_trace_refs" = "yes"
6369then
6370
6371$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6372
6373fi
6374
6375# Check for --with-assertions.
6376# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006377assertions='false'
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6379$as_echo_n "checking for --with-assertions... " >&6; }
6380
6381# Check whether --with-assertions was given.
6382if test "${with_assertions+set}" = set; then :
6383 withval=$with_assertions;
6384if test "$withval" != no
6385then
6386 assertions='true'
6387fi
6388fi
6389
6390if test "$assertions" = 'true'; then
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6392$as_echo "yes" >&6; }
6393elif test "$Py_DEBUG" = 'true'; then
6394 assertions='true'
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6396$as_echo "implied by --with-pydebug" >&6; }
6397else
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
Brett Cannon63d98bc2016-09-06 17:12:40 -07006402# Enable optimization flags
6403
6404
6405Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6407$as_echo_n "checking for --enable-optimizations... " >&6; }
6408# Check whether --enable-optimizations was given.
6409if test "${enable_optimizations+set}" = set; then :
6410 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006411if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412then
6413 Py_OPT='true'
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; };
6416else
6417 Py_OPT='false'
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; };
6420fi
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006427 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6428 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006429 # 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 +00006430 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006431 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006432 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006433 DEF_MAKE_RULE="build_all"
6434else
6435 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006436 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006437 DEF_MAKE_RULE="all"
6438fi
6439
Neil Schemenauer4e16a4a2019-07-22 12:54:25 -07006440
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6442$as_echo_n "checking PROFILE_TASK... " >&6; }
6443if test -z "$PROFILE_TASK"
6444then
6445 PROFILE_TASK='-m test --pgo'
6446fi
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6448$as_echo "$PROFILE_TASK" >&6; }
6449
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006450# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6451# normal names in the default $PATH (ie: Ubuntu). They exist under the
6452# non-suffixed name in their versioned llvm directory.
6453
6454llvm_bin_dir=''
6455llvm_path="${PATH}"
6456if test "${CC}" = "clang"
6457then
6458 clang_bin=`which clang`
6459 # Some systems install clang elsewhere as a symlink to the real path
6460 # which is where the related llvm tools are located.
6461 if test -L "${clang_bin}"
6462 then
6463 clang_dir=`dirname "${clang_bin}"`
6464 clang_bin=`readlink "${clang_bin}"`
6465 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6466 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6467 fi
6468fi
6469
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006470# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6472$as_echo_n "checking for --with-lto... " >&6; }
6473
6474# Check whether --with-lto was given.
6475if test "${with_lto+set}" = set; then :
6476 withval=$with_lto;
6477if test "$withval" != no
6478then
6479 Py_LTO='true'
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6481$as_echo "yes" >&6; };
6482else
6483 Py_LTO='false'
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; };
6486fi
6487else
6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492if test "$Py_LTO" = 'true' ; then
6493 case $CC in
6494 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006495
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006496 if test -n "$ac_tool_prefix"; then
6497 # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
6498set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_LLVM_AR+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 case $LLVM_AR in
6505 [\\/]* | ?:[\\/]*)
6506 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6507 ;;
6508 *)
6509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in ${llvm_path}
6511do
6512 IFS=$as_save_IFS
6513 test -z "$as_dir" && as_dir=.
6514 for ac_exec_ext in '' $ac_executable_extensions; do
6515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518 break 2
6519 fi
6520done
6521 done
6522IFS=$as_save_IFS
6523
6524 ;;
6525esac
6526fi
6527LLVM_AR=$ac_cv_path_LLVM_AR
6528if test -n "$LLVM_AR"; then
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6530$as_echo "$LLVM_AR" >&6; }
6531else
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006537fi
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006538if test -z "$ac_cv_path_LLVM_AR"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006539 ac_pt_LLVM_AR=$LLVM_AR
6540 # Extract the first word of "llvm-ar", so it can be a program name with args.
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006541set dummy llvm-ar; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $ac_pt_LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6550 ;;
6551 *)
6552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in ${llvm_path}
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561 break 2
6562 fi
6563done
6564 done
6565IFS=$as_save_IFS
6566
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006567 ;;
6568esac
6569fi
6570ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6571if test -n "$ac_pt_LLVM_AR"; then
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6573$as_echo "$ac_pt_LLVM_AR" >&6; }
6574else
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006579 if test "x$ac_pt_LLVM_AR" = x; then
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006580 LLVM_AR="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006581 else
6582 case $cross_compiling:$ac_tool_warned in
6583yes:)
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6586ac_tool_warned=yes ;;
6587esac
6588 LLVM_AR=$ac_pt_LLVM_AR
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006589 fi
6590else
6591 LLVM_AR="$ac_cv_path_LLVM_AR"
6592fi
6593
6594
6595 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6596 then
6597 LLVM_AR_FOUND="found"
6598 else
6599 LLVM_AR_FOUND="not-found"
6600 fi
6601 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6602 then
6603 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6604 if test -n "${found_llvm_ar}"
6605 then
6606 LLVM_AR='/usr/bin/xcrun llvm-ar'
6607 LLVM_AR_FOUND=found
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6609$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6610 fi
6611 fi
6612 if test $LLVM_AR_FOUND = not-found
6613 then
6614 LLVM_PROFR_ERR=yes
6615 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6616 else
6617 LLVM_AR_ERR=no
6618 fi
6619 AR="${LLVM_AR}"
6620 case $ac_sys_system in
6621 Darwin*)
6622 # Any changes made here should be reflected in the GCC+Darwin case below
6623 LTOFLAGS="-flto -Wl,-export_dynamic"
6624 ;;
6625 *)
6626 LTOFLAGS="-flto"
6627 ;;
6628 esac
6629 ;;
6630 *gcc*)
6631 case $ac_sys_system in
6632 Darwin*)
6633 LTOFLAGS="-flto -Wl,-export_dynamic"
6634 ;;
6635 *)
6636 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6637 ;;
6638 esac
6639 ;;
6640 esac
6641
6642 if test "$ac_cv_prog_cc_g" = "yes"
6643 then
6644 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6645 # to get debug symbols.
6646 LTOFLAGS="$LTOFLAGS -g"
6647 fi
6648
stratakisf92c7aa2018-12-04 15:54:01 +01006649 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006650 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006651fi
6652
6653# Enable PGO flags.
6654
6655
6656
6657
6658
6659
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006660if test -n "$ac_tool_prefix"; then
6661 # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args.
6662set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2
Gregory P. Smith799520c2016-09-07 16:10:00 -07006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006680 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ;;
6689esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006690fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006691LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6692if test -n "$LLVM_PROFDATA"; then
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6694$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695else
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6697$as_echo "no" >&6; }
6698fi
6699
6700
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006701fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006702if test -z "$ac_cv_path_LLVM_PROFDATA"; then
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006703 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6704 # Extract the first word of "llvm-profdata", so it can be a program name with args.
Gregory P. Smith799520c2016-09-07 16:10:00 -07006705set dummy llvm-profdata; ac_word=$2
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6707$as_echo_n "checking for $ac_word... " >&6; }
6708if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6709 $as_echo_n "(cached) " >&6
6710else
6711 case $ac_pt_LLVM_PROFDATA in
6712 [\\/]* | ?:[\\/]*)
6713 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6714 ;;
6715 *)
6716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6717for as_dir in ${llvm_path}
6718do
6719 IFS=$as_save_IFS
6720 test -z "$as_dir" && as_dir=.
6721 for ac_exec_ext in '' $ac_executable_extensions; do
6722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6723 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6725 break 2
6726 fi
6727done
6728 done
6729IFS=$as_save_IFS
6730
Gregory P. Smith799520c2016-09-07 16:10:00 -07006731 ;;
6732esac
6733fi
6734ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6735if test -n "$ac_pt_LLVM_PROFDATA"; then
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6737$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6738else
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6740$as_echo "no" >&6; }
6741fi
6742
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006743 if test "x$ac_pt_LLVM_PROFDATA" = x; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006744 LLVM_PROFDATA="''"
Benjamin Petersonf3095b02019-09-13 15:30:36 +01006745 else
6746 case $cross_compiling:$ac_tool_warned in
6747yes:)
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6750ac_tool_warned=yes ;;
6751esac
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 fi
6754else
6755 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6756fi
6757
6758
6759if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6760then
6761 LLVM_PROF_FOUND="found"
6762else
6763 LLVM_PROF_FOUND="not-found"
6764fi
6765if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6766then
6767 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6768 if test -n "${found_llvm_profdata}"
6769 then
6770 # llvm-profdata isn't directly in $PATH in some cases.
6771 # https://apple.stackexchange.com/questions/197053/
6772 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6773 LLVM_PROF_FOUND=found
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6775$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6776 fi
6777fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778LLVM_PROF_ERR=no
6779case $CC in
6780 *clang*)
6781 # Any changes made here should be reflected in the GCC+Darwin case below
6782 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6783 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6786 if test $LLVM_PROF_FOUND = not-found
6787 then
6788 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006789 if test "${REQUIRE_PGO}" = "yes"
6790 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006791 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 -07006792 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793 fi
6794 ;;
6795 *gcc*)
6796 case $ac_sys_system in
6797 Darwin*)
6798 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6799 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 then
6804 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805 if test "${REQUIRE_PGO}" = "yes"
6806 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006807 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006808 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 fi
6810 ;;
6811 *)
6812 PGO_PROF_GEN_FLAG="-fprofile-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6814 LLVM_PROF_MERGER="true"
6815 LLVM_PROF_FILE=""
6816 ;;
6817 esac
6818 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006819 *icc*)
6820 PGO_PROF_GEN_FLAG="-prof-gen"
6821 PGO_PROF_USE_FLAG="-prof-use"
6822 LLVM_PROF_MERGER="true"
6823 LLVM_PROF_FILE=""
6824 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825esac
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6828# merged with this chunk of code?
6829
6830# Optimizer/debugger flags
6831# ------------------------
6832# (The following bit of code is complicated enough - please keep things
6833# indented properly. Just pretend you're editing Python code. ;-)
6834
6835# There are two parallel sets of case statements below, one that checks to
6836# see if OPT was set and one that does BASECFLAGS setting based upon
6837# compiler and platform. BASECFLAGS tweaks need to be made even if the
6838# user set OPT.
6839
Victor Stinner23a683a2019-04-12 21:27:37 +02006840case $CC in
6841 *clang*)
6842 cc_is_clang=1
6843 ;;
6844 *)
6845 if $CC --version 2>&1 | grep -q clang
6846 then
6847 cc_is_clang=1
6848 else
6849 cc_is_clang=
6850 fi
6851esac
6852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853# tweak OPT based on compiler and platform, only if the user didn't set
6854# it on the command line
6855
Victor Stinner9ed34a82017-05-02 22:35:58 +02006856
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006857if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858then
6859 case $GCC in
6860 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6862 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6863 WRAP="-fwrapv"
6864 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006865
Victor Stinner35f3d242017-04-21 12:35:24 +02006866 if test -n "${cc_is_clang}"
6867 then
6868 # Clang also needs -fwrapv
6869 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006870 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6871 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006872 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006873 fi
6874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 case $ac_cv_prog_cc_g in
6876 yes)
6877 if test "$Py_DEBUG" = 'true' ; then
6878 # Optimization messes up debuggers, so turn it off for
6879 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006880 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006881 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 else
Victor Stinner28205b22017-04-21 11:24:34 +02006886 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 fi
6888 ;;
6889 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006890 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 ;;
6892 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894 case $ac_sys_system in
6895 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6896 ;;
6897 esac
6898 ;;
6899
6900 *)
6901 OPT="-O"
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
6906
6907
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006908
stratakiscf10a752018-12-19 18:19:01 +01006909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910# The -arch flags for universal builds on OSX
6911UNIVERSAL_ARCH_FLAGS=
6912
6913
6914# tweak BASECFLAGS based on compiler and platform
6915case $GCC in
6916yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006917 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006918
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6920$as_echo_n "checking for -Wextra... " >&6; }
6921 ac_save_cc="$CC"
6922 CC="$CC -Wextra -Werror"
6923 if ${ac_cv_extra_warnings+:} false; then :
6924 $as_echo_n "(cached) " >&6
6925else
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927/* end confdefs.h. */
6928
6929
6930int
6931main ()
6932{
6933
6934 ;
6935 return 0;
6936}
6937
6938_ACEOF
6939if ac_fn_c_try_compile "$LINENO"; then :
6940
6941 ac_cv_extra_warnings=yes
6942
6943else
6944
6945 ac_cv_extra_warnings=no
6946
6947fi
6948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6949fi
6950
6951 CC="$ac_save_cc"
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6953$as_echo "$ac_cv_extra_warnings" >&6; }
6954
6955 if test $ac_cv_extra_warnings = yes
6956 then
6957 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6958 fi
6959
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960 # Python doesn't violate C99 aliasing rules, but older versions of
6961 # GCC produce warnings for legal Python code. Enable
6962 # -fno-strict-aliasing on versions of GCC that support but produce
6963 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6965$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966 ac_save_cc="$CC"
6967 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006969 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006971else
Matthias Kloseb9621712010-04-24 17:59:49 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006974
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976int
6977main ()
6978{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980 ;
6981 return 0;
6982}
Matthias Kloseb159a552010-04-25 21:00:44 +00006983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006985if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
6987 CC="$ac_save_cc -fstrict-aliasing"
6988 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990/* end confdefs.h. */
6991
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006992 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006993int
6994main ()
6995{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006996double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997 ;
6998 return 0;
6999}
Matthias Kloseb159a552010-04-25 21:00:44 +00007000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
7004 ac_cv_no_strict_aliasing=no
7005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006else
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 ac_cv_no_strict_aliasing=yes
7009
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007010fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007012
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013else
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 ac_cv_no_strict_aliasing=no
7016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007019fi
7020
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7024$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007025 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026 then
7027 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7028 fi
7029
Zachary Ware5af85642015-12-21 12:09:17 -06007030 # ICC doesn't recognize the option, but only emits a warning
7031 ## XXX does it emit an unused result warning and can it be disabled?
7032 case "$CC" in
7033 *icc*)
7034 ac_cv_disable_unused_result_warning=no
7035 ;;
7036 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7038$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7039 ac_save_cc="$CC"
7040 CC="$CC -Wunused-result -Werror"
7041 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007042 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007043 $as_echo_n "(cached) " >&6
7044else
7045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7046/* end confdefs.h. */
7047
7048
7049int
7050main ()
7051{
7052
7053 ;
7054 return 0;
7055}
7056
7057_ACEOF
7058if ac_fn_c_try_compile "$LINENO"; then :
7059
7060 ac_cv_disable_unused_result_warning=yes
7061
7062else
7063
7064 ac_cv_disable_unused_result_warning=no
7065
7066fi
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7068fi
7069
7070 CFLAGS="$save_CFLAGS"
7071 CC="$ac_save_cc"
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7073$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007074 ;;
7075 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007076
7077 if test $ac_cv_disable_unused_result_warning = yes
7078 then
7079 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007080 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7081 fi
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7084$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7085 ac_save_cc="$CC"
7086 CC="$CC -Wunused-parameter -Werror"
7087 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7088 $as_echo_n "(cached) " >&6
7089else
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092
7093
7094int
7095main ()
7096{
7097
7098 ;
7099 return 0;
7100}
7101
7102_ACEOF
7103if ac_fn_c_try_compile "$LINENO"; then :
7104
7105 ac_cv_disable_unused_parameter_warning=yes
7106
7107else
7108
7109 ac_cv_disable_unused_parameter_warning=no
7110
7111fi
7112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7113fi
7114
7115 CC="$ac_save_cc"
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7117$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7118
7119 if test $ac_cv_disable_unused_parameter_warning = yes
7120 then
7121 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7122 fi
7123
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7125$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7126 ac_save_cc="$CC"
7127 CC="$CC -Wmissing-field-initializers -Werror"
7128 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7129 $as_echo_n "(cached) " >&6
7130else
7131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7132/* end confdefs.h. */
7133
7134
7135int
7136main ()
7137{
7138
7139 ;
7140 return 0;
7141}
7142
7143_ACEOF
7144if ac_fn_c_try_compile "$LINENO"; then :
7145
7146 ac_cv_disable_missing_field_initializers=yes
7147
7148else
7149
7150 ac_cv_disable_missing_field_initializers=no
7151
7152fi
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7154fi
7155
7156 CC="$ac_save_cc"
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7158$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7159
7160 if test $ac_cv_disable_missing_field_initializers = yes
7161 then
7162 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007163 fi
7164
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7166$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7167 ac_save_cc="$CC"
7168 CC="$CC -Wsign-compare"
7169 save_CFLAGS="$CFLAGS"
7170 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7171 $as_echo_n "(cached) " >&6
7172else
7173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174/* end confdefs.h. */
7175
7176
7177int
7178main ()
7179{
7180
7181 ;
7182 return 0;
7183}
7184
7185_ACEOF
7186if ac_fn_c_try_compile "$LINENO"; then :
7187
7188 ac_cv_enable_sign_compare_warning=yes
7189
7190else
7191
7192 ac_cv_enable_sign_compare_warning=no
7193
7194fi
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7196fi
7197
7198 CFLAGS="$save_CFLAGS"
7199 CC="$ac_save_cc"
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7201$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7202
7203 if test $ac_cv_enable_sign_compare_warning = yes
7204 then
7205 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7206 fi
7207
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7209$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7210 ac_save_cc="$CC"
7211 CC="$CC -Wunreachable-code"
7212 save_CFLAGS="$CFLAGS"
7213 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7214 $as_echo_n "(cached) " >&6
7215else
7216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7217/* end confdefs.h. */
7218
7219
7220int
7221main ()
7222{
7223
7224 ;
7225 return 0;
7226}
7227
7228_ACEOF
7229if ac_fn_c_try_compile "$LINENO"; then :
7230
7231 ac_cv_enable_unreachable_code_warning=yes
7232
7233else
7234
7235 ac_cv_enable_unreachable_code_warning=no
7236
7237fi
7238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7239fi
7240
7241 CFLAGS="$save_CFLAGS"
7242 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007243
7244 # Don't enable unreachable code warning in debug mode, since it usually
7245 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007246 # Issue #24324: Unfortunately, the unreachable code warning does not work
7247 # correctly on gcc and has been silently removed from the compiler.
7248 # It is supported on clang but on OS X systems gcc may be an alias
7249 # for clang. Try to determine if the compiler is not really gcc and,
7250 # if so, only then enable the warning.
7251 if test $ac_cv_enable_unreachable_code_warning = yes && \
7252 test "$Py_DEBUG" != "true" && \
7253 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007254 then
7255 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007256 else
7257 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007258 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7260$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007261
INADA Naokie3364842018-06-05 20:40:53 +09007262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7263$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7264 ac_save_cc="$CC"
7265 CC="$CC -Werror -Wstrict-prototypes"
7266 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268else
7269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7270/* end confdefs.h. */
7271
7272
7273int
7274main ()
7275{
7276
7277 ;
7278 return 0;
7279}
7280
7281_ACEOF
7282if ac_fn_c_try_compile "$LINENO"; then :
7283
7284 ac_cv_enable_strict_prototypes_warning=yes
7285
7286else
7287
7288 ac_cv_enable_strict_prototypes_warning=no
7289
7290fi
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292fi
7293
7294 CC="$ac_save_cc"
7295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7296$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7297
7298 if test $ac_cv_enable_strict_prototypes_warning = yes
7299 then
7300 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7301 fi
7302
Victor Stinner193ee0a2017-02-06 14:24:00 +01007303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7304$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7305 ac_save_cc="$CC"
7306 CC="$CC -Werror=implicit-function-declaration"
7307 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7308 $as_echo_n "(cached) " >&6
7309else
7310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311/* end confdefs.h. */
7312
7313
7314int
7315main ()
7316{
7317
7318 ;
7319 return 0;
7320}
7321
7322_ACEOF
7323if ac_fn_c_try_compile "$LINENO"; then :
7324
7325 ac_cv_enable_implicit_function_declaration_error=yes
7326
7327else
7328
7329 ac_cv_enable_implicit_function_declaration_error=no
7330
7331fi
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333fi
7334
7335 CC="$ac_save_cc"
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7337$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7338
7339 if test $ac_cv_enable_implicit_function_declaration_error = yes
7340 then
7341 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7342 fi
7343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7345 # support. Without this, treatment of subnormals doesn't follow
7346 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007347 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348 alpha*)
7349 BASECFLAGS="$BASECFLAGS -mieee"
7350 ;;
7351 esac
7352
7353 case $ac_sys_system in
7354 SCO_SV*)
7355 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7356 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007357
Ned Deily87adb6e2013-10-18 21:09:56 -07007358 Darwin*)
7359 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7360 # used to be here, but non-Apple gcc doesn't accept them.
7361 if test "${CC}" = gcc
7362 then
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007364$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007365 case "${UNIVERSALSDK}" in
7366 */MacOSX10.4u.sdk)
7367 # Build using 10.4 SDK, force usage of gcc when the
7368 # compiler is gcc, otherwise the user will get very
7369 # confusing error messages when building on OSX 10.6
7370 CC=gcc-4.0
7371 CPP=cpp-4.0
7372 ;;
7373 esac
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007375$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007376 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377
Ned Deily87adb6e2013-10-18 21:09:56 -07007378 if test "${enable_universalsdk}"
7379 then
7380 case "$UNIVERSAL_ARCHS" in
7381 32-bit)
7382 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7383 LIPO_32BIT_FLAGS=""
7384 ARCH_RUN_32BIT=""
7385 ;;
7386 64-bit)
7387 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7388 LIPO_32BIT_FLAGS=""
7389 ARCH_RUN_32BIT="true"
7390 ;;
7391 all)
7392 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7393 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7394 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7395 ;;
7396 intel)
7397 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7398 LIPO_32BIT_FLAGS="-extract i386"
7399 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7400 ;;
7401 intel-32)
7402 UNIVERSAL_ARCH_FLAGS="-arch i386"
7403 LIPO_32BIT_FLAGS=""
7404 ARCH_RUN_32BIT=""
7405 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007406 intel-64)
7407 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7408 LIPO_32BIT_FLAGS=""
7409 ARCH_RUN_32BIT="true"
7410 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007411 3-way)
7412 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7413 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7414 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7415 ;;
7416 *)
7417 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7418 ;;
7419 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 if test "${UNIVERSALSDK}" != "/"
7422 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007423 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7424 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007425 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007426 else
7427 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7428 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 fi
7430 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431
Ned Deily87adb6e2013-10-18 21:09:56 -07007432 # Calculate an appropriate deployment target for this build:
7433 # The deployment target value is used explicitly to enable certain
7434 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007435 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 # component of the string returned by distutils.get_platform().
7437 #
7438 # Use the value from:
7439 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7440 # 2. the operating system version of the build machine if >= 10.6
7441 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7442 # below to pick either 10.3, 10.4, or 10.5 as the target.
7443 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7446$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007447 cur_target_major=`sw_vers -productVersion | \
7448 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7449 cur_target_minor=`sw_vers -productVersion | \
7450 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7451 cur_target="${cur_target_major}.${cur_target_minor}"
7452 if test ${cur_target_major} -eq 10 && \
7453 test ${cur_target_minor} -ge 3 && \
7454 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007455 then
Ned Deily36820b62014-06-25 13:44:22 -07007456 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007457 cur_target=10.3
7458 if test ${enable_universalsdk}
7459 then
7460 case "$UNIVERSAL_ARCHS" in
7461 all|3-way|intel|64-bit)
7462 # These configurations were first supported in 10.5
7463 cur_target='10.5'
7464 ;;
7465 esac
7466 else
7467 if test `/usr/bin/arch` = "i386"
7468 then
7469 # 10.4 was the first release to support Intel archs
7470 cur_target="10.4"
7471 fi
7472 fi
7473 fi
7474 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007475
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7477 # environment with a value that is the same as what we'll use
7478 # in the Makefile to ensure that we'll get the same compiler
7479 # environment during configure and build time.
7480 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7481 export MACOSX_DEPLOYMENT_TARGET
7482 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7484$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007485
Ned Deily87adb6e2013-10-18 21:09:56 -07007486 # end of Darwin* tests
7487 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488 esac
7489 ;;
7490
7491*)
7492 case $ac_sys_system in
7493 OpenUNIX*|UnixWare*)
7494 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7495 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496 SCO_SV*)
7497 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7498 ;;
7499 esac
7500 ;;
7501esac
7502
Zachary Ware5af85642015-12-21 12:09:17 -06007503# ICC needs -fp-model strict or floats behave badly
7504case "$CC" in
7505*icc*)
7506 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7507 ;;
7508esac
7509
T. Woutersddbfa2c2017-05-23 01:30:49 +02007510if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511 :
7512else
7513 OPT="-DNDEBUG $OPT"
7514fi
7515
7516if test "$ac_arch_flags"
7517then
7518 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7519fi
7520
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521# On some compilers, pthreads are available without further options
7522# (e.g. MacOS X). On some of these systems, the compiler will not
7523# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7524# So we have to see first whether pthreads are available without
7525# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7527$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007528if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530else
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 ac_cv_pthread_is_default=no
7533else
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536
Stefan Krah7dba5942012-11-22 22:49:11 +01007537#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538#include <pthread.h>
7539
7540void* routine(void* p){return NULL;}
7541
7542int main(){
7543 pthread_t p;
7544 if(pthread_create(&p,NULL,routine,NULL)!=0)
7545 return 1;
7546 (void)pthread_detach(p);
7547 return 0;
7548}
7549
7550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552
7553 ac_cv_pthread_is_default=yes
7554 ac_cv_kthread=no
7555 ac_cv_pthread=no
7556
7557else
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562fi
7563
7564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565fi
7566
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7568$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569
7570
7571if test $ac_cv_pthread_is_default = yes
7572then
7573 ac_cv_kpthread=no
7574else
7575# -Kpthread, if available, provides the right #defines
7576# and linker options to make pthread_create available
7577# Some compilers won't report that they do not support -Kpthread,
7578# so we need to run a program to see whether it really made the
7579# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7581$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007582if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584else
7585 ac_save_cc="$CC"
7586CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 ac_cv_kpthread=no
7589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591/* end confdefs.h. */
7592
Stefan Krah7dba5942012-11-22 22:49:11 +01007593#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594#include <pthread.h>
7595
7596void* routine(void* p){return NULL;}
7597
7598int main(){
7599 pthread_t p;
7600 if(pthread_create(&p,NULL,routine,NULL)!=0)
7601 return 1;
7602 (void)pthread_detach(p);
7603 return 0;
7604}
7605
7606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007607if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608 ac_cv_kpthread=yes
7609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614fi
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616CC="$ac_save_cc"
7617fi
7618
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7620$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621fi
7622
7623if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7624then
7625# -Kthread, if available, provides the right #defines
7626# and linker options to make pthread_create available
7627# Some compilers won't report that they do not support -Kthread,
7628# so we need to run a program to see whether it really made the
7629# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7631$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007632if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634else
7635 ac_save_cc="$CC"
7636CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007637if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638 ac_cv_kthread=no
7639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641/* end confdefs.h. */
7642
Stefan Krah7dba5942012-11-22 22:49:11 +01007643#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644#include <pthread.h>
7645
7646void* routine(void* p){return NULL;}
7647
7648int main(){
7649 pthread_t p;
7650 if(pthread_create(&p,NULL,routine,NULL)!=0)
7651 return 1;
7652 (void)pthread_detach(p);
7653 return 0;
7654}
7655
7656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658 ac_cv_kthread=yes
7659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666CC="$ac_save_cc"
7667fi
7668
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7670$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
7672
7673if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7674then
7675# -pthread, if available, provides the right #defines
7676# and linker options to make pthread_create available
7677# Some compilers won't report that they do not support -pthread,
7678# so we need to run a program to see whether it really made the
7679# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7681$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007682if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684else
7685 ac_save_cc="$CC"
7686CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007687if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688 ac_cv_pthread=no
7689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691/* end confdefs.h. */
7692
Stefan Krah7dba5942012-11-22 22:49:11 +01007693#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694#include <pthread.h>
7695
7696void* routine(void* p){return NULL;}
7697
7698int main(){
7699 pthread_t p;
7700 if(pthread_create(&p,NULL,routine,NULL)!=0)
7701 return 1;
7702 (void)pthread_detach(p);
7703 return 0;
7704}
7705
7706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007707if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708 ac_cv_pthread=yes
7709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
7715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716CC="$ac_save_cc"
7717fi
7718
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7720$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721fi
7722
7723# If we have set a CC compiler flag for thread support then
7724# check if it works for CXX, too.
7725ac_cv_cxx_thread=no
7726if test ! -z "$CXX"
7727then
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7729$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730ac_save_cxx="$CXX"
7731
7732if test "$ac_cv_kpthread" = "yes"
7733then
7734 CXX="$CXX -Kpthread"
7735 ac_cv_cxx_thread=yes
7736elif test "$ac_cv_kthread" = "yes"
7737then
7738 CXX="$CXX -Kthread"
7739 ac_cv_cxx_thread=yes
7740elif test "$ac_cv_pthread" = "yes"
7741then
7742 CXX="$CXX -pthread"
7743 ac_cv_cxx_thread=yes
7744fi
7745
7746if test $ac_cv_cxx_thread = yes
7747then
7748 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7749 $CXX -c conftest.$ac_ext 2>&5
7750 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7751 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7752 then
7753 ac_cv_cxx_thread=yes
7754 else
7755 ac_cv_cxx_thread=no
7756 fi
7757 rm -fr conftest*
7758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7760$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761fi
7762CXX="$ac_save_cxx"
7763
7764
7765# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7767$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007768if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770else
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772/* end confdefs.h. */
7773#include <stdlib.h>
7774#include <stdarg.h>
7775#include <string.h>
7776#include <float.h>
7777
7778int
7779main ()
7780{
7781
7782 ;
7783 return 0;
7784}
7785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007786if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787 ac_cv_header_stdc=yes
7788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7792
7793if test $ac_cv_header_stdc = yes; then
7794 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796/* end confdefs.h. */
7797#include <string.h>
7798
7799_ACEOF
7800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 $EGREP "memchr" >/dev/null 2>&1; then :
7802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803else
7804 ac_cv_header_stdc=no
7805fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007806rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807
7808fi
7809
7810if test $ac_cv_header_stdc = yes; then
7811 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813/* end confdefs.h. */
7814#include <stdlib.h>
7815
7816_ACEOF
7817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $EGREP "free" >/dev/null 2>&1; then :
7819
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820else
7821 ac_cv_header_stdc=no
7822fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007823rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824
7825fi
7826
7827if test $ac_cv_header_stdc = yes; then
7828 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830 :
7831else
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833/* end confdefs.h. */
7834#include <ctype.h>
7835#include <stdlib.h>
7836#if ((' ' & 0x0FF) == 0x020)
7837# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7838# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7839#else
7840# define ISLOWER(c) \
7841 (('a' <= (c) && (c) <= 'i') \
7842 || ('j' <= (c) && (c) <= 'r') \
7843 || ('s' <= (c) && (c) <= 'z'))
7844# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7845#endif
7846
7847#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7848int
7849main ()
7850{
7851 int i;
7852 for (i = 0; i < 256; i++)
7853 if (XOR (islower (i), ISLOWER (i))
7854 || toupper (i) != TOUPPER (i))
7855 return 2;
7856 return 0;
7857}
7858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007859if ac_fn_c_try_run "$LINENO"; then :
7860
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007861else
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866fi
7867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868fi
7869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7871$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872if test $ac_cv_header_stdc = yes; then
7873
Matthias Kloseb9621712010-04-24 17:59:49 +00007874$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007875
7876fi
7877
stratakise768c862018-01-23 16:11:24 +01007878for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007879fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007880ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007881sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007882utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007883poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007884sys/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 +01007885sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007886sys/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 +01007887sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007888sys/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 -07007889libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007890linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007891sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007892do :
7893 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7894ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007895if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007897#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007898_ACEOF
7899
7900fi
7901
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902done
7903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007905for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7908$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007909if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007914#include <sys/types.h>
7915#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
7920if ((DIR *) 0)
7921return 0;
7922 ;
7923 return 0;
7924}
7925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007926if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007928else
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933eval ac_res=\$$as_ac_Header
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7935$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007939_ACEOF
7940
7941ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944done
7945# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7946if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7948$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007951else
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956/* Override any GCC internal prototype to avoid an error.
7957 Use char because int might match the return type of a GCC
7958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959#ifdef __cplusplus
7960extern "C"
7961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007962char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007963int
7964main ()
7965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ;
7968 return 0;
7969}
7970_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971for ac_lib in '' dir; do
7972 if test -z "$ac_lib"; then
7973 ac_res="none required"
7974 else
7975 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007976 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007981rm -f core conftest.err conftest.$ac_objext \
7982 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007983 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986done
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989else
7990 ac_cv_search_opendir=no
7991fi
7992rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007993LIBS=$ac_func_search_save_LIBS
7994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7996$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008002
Michael W. Hudson54241132001-12-07 15:38:26 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8005$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008006if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008008else
8009 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013/* Override any GCC internal prototype to avoid an error.
8014 Use char because int might match the return type of a GCC
8015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016#ifdef __cplusplus
8017extern "C"
8018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008019char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ;
8025 return 0;
8026}
8027_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028for ac_lib in '' x; do
8029 if test -z "$ac_lib"; then
8030 ac_res="none required"
8031 else
8032 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008033 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038rm -f core conftest.err conftest.$ac_objext \
8039 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008040 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043done
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046else
8047 ac_cv_search_opendir=no
8048fi
8049rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008050LIBS=$ac_func_search_save_LIBS
8051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8053$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008055if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008058fi
8059
8060fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8063$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008069#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008070int
8071main ()
8072{
8073return makedev(0, 0);
8074 ;
8075 return 0;
8076}
8077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008079 ac_cv_header_sys_types_h_makedev=yes
8080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083rm -f core conftest.err conftest.$ac_objext \
8084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008085
8086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8088$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008089
8090if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008091ac_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 +02008092if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008095
8096fi
8097
8098
8099
8100 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 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 +02008102if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008105
8106fi
8107
8108
8109 fi
8110fi
8111
Michael W. Hudson54241132001-12-07 15:38:26 +00008112
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008113# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8114# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8115SAVE_CFLAGS=$CFLAGS
8116CFLAGS="-std=c99 $CFLAGS"
8117for ac_header in bluetooth/bluetooth.h
8118do :
8119 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8120if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8121 cat >>confdefs.h <<_ACEOF
8122#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8123_ACEOF
8124
8125fi
8126
8127done
8128
8129CFLAGS=$SAVE_CFLAGS
8130
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008131# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8132for ac_header in net/if.h
8133do :
8134 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8135#ifdef STDC_HEADERS
8136# include <stdlib.h>
8137# include <stddef.h>
8138#else
8139# ifdef HAVE_STDLIB_H
8140# include <stdlib.h>
8141# endif
8142#endif
8143#ifdef HAVE_SYS_SOCKET_H
8144# include <sys/socket.h>
8145#endif
8146
8147"
Victor Stinnere0be4232011-10-25 13:06:09 +02008148if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008149 cat >>confdefs.h <<_ACEOF
8150#define HAVE_NET_IF_H 1
8151_ACEOF
8152
8153fi
8154
8155done
8156
8157
Martin v. Löwis11017b12006-01-14 18:12:57 +00008158# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008159for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008160do :
8161 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 +00008162#ifdef HAVE_ASM_TYPES_H
8163#include <asm/types.h>
8164#endif
8165#ifdef HAVE_SYS_SOCKET_H
8166#include <sys/socket.h>
8167#endif
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169"
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008171 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008172#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008173_ACEOF
8174
8175fi
8176
8177done
8178
8179
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008180# On Linux, qrtr.h requires asm/types.h
8181for ac_header in linux/qrtr.h
8182do :
8183 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8184#ifdef HAVE_ASM_TYPES_H
8185#include <asm/types.h>
8186#endif
8187#ifdef HAVE_SYS_SOCKET_H
8188#include <sys/socket.h>
8189#endif
8190
8191"
8192if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8193 cat >>confdefs.h <<_ACEOF
8194#define HAVE_LINUX_QRTR_H 1
8195_ACEOF
8196
8197fi
8198
8199done
8200
8201
caaveryeffc12f2017-09-06 18:18:10 -04008202for ac_header in linux/vm_sockets.h
8203do :
8204 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8205#ifdef HAVE_SYS_SOCKET_H
8206#include <sys/socket.h>
8207#endif
8208
8209"
8210if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8211 cat >>confdefs.h <<_ACEOF
8212#define HAVE_LINUX_VM_SOCKETS_H 1
8213_ACEOF
8214
8215fi
8216
8217done
8218
8219
Charles-François Natali47413c12011-10-06 19:47:44 +02008220# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008221for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008222do :
8223 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8224ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8225#ifdef HAVE_SYS_SOCKET_H
8226#include <sys/socket.h>
8227#endif
8228
8229"
8230if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8231 cat >>confdefs.h <<_ACEOF
8232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8233_ACEOF
8234
8235fi
8236
8237done
8238
8239
Guido van Rossum627b2d71993-12-24 10:39:16 +00008240# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008241was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8243$as_echo_n "checking for clock_t in time.h... " >&6; }
8244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008246#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008251 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008252else
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008256
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008257
Guido van Rossum627b2d71993-12-24 10:39:16 +00008258fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008259rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8262$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8265$as_echo_n "checking for makedev... " >&6; }
8266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008268
Jesus Cea740f53a2010-04-28 11:35:30 +00008269#if defined(MAJOR_IN_MKDEV)
8270#include <sys/mkdev.h>
8271#elif defined(MAJOR_IN_SYSMACROS)
8272#include <sys/sysmacros.h>
8273#else
8274#include <sys/types.h>
8275#endif
8276
Neal Norwitz11690112002-07-30 01:08:28 +00008277int
8278main ()
8279{
Jesus Cea740f53a2010-04-28 11:35:30 +00008280
8281 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008282 ;
8283 return 0;
8284}
Matthias Kloseb159a552010-04-25 21:00:44 +00008285
Neal Norwitz11690112002-07-30 01:08:28 +00008286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008287if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008288 ac_cv_has_makedev=yes
8289else
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008292rm -f core conftest.err conftest.$ac_objext \
8293 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8295$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008296if test "$ac_cv_has_makedev" = "yes"; then
8297
Matthias Kloseb9621712010-04-24 17:59:49 +00008298$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008299
8300fi
8301
Christian Heimes985ecdc2013-11-20 11:46:18 +01008302# byte swapping
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8304$as_echo_n "checking for le64toh... " >&6; }
8305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8306/* end confdefs.h. */
8307
8308#ifdef HAVE_ENDIAN_H
8309#include <endian.h>
8310#elif defined(HAVE_SYS_ENDIAN_H)
8311#include <sys/endian.h>
8312#endif
8313
8314int
8315main ()
8316{
8317
8318 le64toh(1)
8319 ;
8320 return 0;
8321}
8322
8323_ACEOF
8324if ac_fn_c_try_link "$LINENO"; then :
8325 ac_cv_has_le64toh=yes
8326else
8327 ac_cv_has_le64toh=no
8328fi
8329rm -f core conftest.err conftest.$ac_objext \
8330 conftest$ac_exeext conftest.$ac_ext
8331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8332$as_echo "$ac_cv_has_le64toh" >&6; }
8333if test "$ac_cv_has_le64toh" = "yes"; then
8334
8335$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8336
8337fi
8338
Martin v. Löwis399a6892002-10-04 10:22:02 +00008339use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008340# Don't use largefile support for GNU/Hurd
8341case $ac_sys_system in GNU*)
8342 use_lfs=no
8343esac
8344
Martin v. Löwis399a6892002-10-04 10:22:02 +00008345if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008346# Two defines needed to enable largefile support on various platforms
8347# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008348case $ac_sys_system/$ac_sys_release in
8349AIX*)
8350
8351$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8352
8353 ;;
8354esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008360
Martin v. Löwis399a6892002-10-04 10:22:02 +00008361fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008362
Guido van Rossum84e7b241996-08-19 21:59:00 +00008363# Add some code to confdefs.h so that the test for off_t works on SCO
8364cat >> confdefs.h <<\EOF
8365#if defined(SCO_DS)
8366#undef _OFF_T
8367#endif
8368EOF
8369
Guido van Rossumef2255b2000-03-10 22:30:29 +00008370# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008371ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008372if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008373
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008374else
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
8376cat >>confdefs.h <<_ACEOF
8377#define mode_t int
8378_ACEOF
8379
8380fi
8381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008384
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008385else
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
8387cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008389_ACEOF
8390
8391fi
8392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008394if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398cat >>confdefs.h <<_ACEOF
8399#define pid_t int
8400_ACEOF
8401
8402fi
8403
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008406#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413
8414cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008416_ACEOF
8417
8418fi
8419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8421$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008422if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008424else
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008427#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
8429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008432 ac_cv_type_uid_t=yes
8433else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434 ac_cv_type_uid_t=no
8435fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008436rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8440$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008441if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008442
Matthias Kloseb9621712010-04-24 17:59:49 +00008443$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445
Matthias Kloseb9621712010-04-24 17:59:49 +00008446$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008447
8448fi
8449
Mark Dickinson983bc162012-12-02 12:11:38 +00008450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453
Matthias Kloseb9621712010-04-24 17:59:49 +00008454$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008455
8456fi
8457
Stefan Krah1919b7e2012-03-21 18:25:23 +01008458ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8459if test "x$ac_cv_type___uint128_t" = xyes; then :
8460
8461$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8462
8463fi
8464
Jack Jansendd19cf82001-12-06 22:36:17 +00008465
Michael W. Hudson54241132001-12-07 15:38:26 +00008466# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008467# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468# The cast to long int works around a bug in the HP C Compiler
8469# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8470# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8471# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8473$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 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 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 if test "$ac_cv_type_int" = yes; then
8481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008483as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008484See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 else
8486 ac_cv_sizeof_int=0
8487 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8492$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493
8494
8495
Martin v. Löwis11437992002-04-12 09:54:03 +00008496cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008497#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008498_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008499
8500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501# The cast to long int works around a bug in the HP C Compiler
8502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8504# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8506$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008507if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 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 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512else
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 if test "$ac_cv_type_long" = yes; then
8514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008516as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008517See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518 else
8519 ac_cv_sizeof_long=0
8520 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8525$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526
8527
8528
Martin v. Löwis11437992002-04-12 09:54:03 +00008529cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008530#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008531_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008532
8533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534# The cast to long int works around a bug in the HP C Compiler
8535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8537# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8539$as_echo_n "checking size of long long... " >&6; }
8540if ${ac_cv_sizeof_long_long+:} false; then :
8541 $as_echo_n "(cached) " >&6
8542else
8543 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8544
8545else
8546 if test "$ac_cv_type_long_long" = yes; then
8547 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8549as_fn_error 77 "cannot compute sizeof (long long)
8550See \`config.log' for more details" "$LINENO" 5; }
8551 else
8552 ac_cv_sizeof_long_long=0
8553 fi
8554fi
8555
8556fi
8557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8558$as_echo "$ac_cv_sizeof_long_long" >&6; }
8559
8560
8561
8562cat >>confdefs.h <<_ACEOF
8563#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8564_ACEOF
8565
8566
8567# The cast to long int works around a bug in the HP C Compiler
8568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8570# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8572$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008573if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 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 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 if test "$ac_cv_type_void_p" = yes; then
8580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008582as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008583See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 else
8585 ac_cv_sizeof_void_p=0
8586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8591$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592
8593
8594
Martin v. Löwis11437992002-04-12 09:54:03 +00008595cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008596#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008597_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008598
8599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8605$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008606if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611else
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 if test "$ac_cv_type_short" = yes; then
8613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008615as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008616See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 else
8618 ac_cv_sizeof_short=0
8619 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8624$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625
8626
8627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008629#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008630_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008631
8632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633# The cast to long int works around a bug in the HP C Compiler
8634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8636# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8638$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008639if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 if test "$ac_cv_type_float" = yes; then
8646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008648as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008649See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_float=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8657$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008662#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008664
8665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666# The cast to long int works around a bug in the HP C Compiler
8667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8671$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008672if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 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 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 if test "$ac_cv_type_double" = yes; then
8679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008681as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008682See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683 else
8684 ac_cv_sizeof_double=0
8685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8690$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691
8692
8693
Martin v. Löwis11437992002-04-12 09:54:03 +00008694cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008695#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008697
8698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699# The cast to long int works around a bug in the HP C Compiler
8700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8702# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8704$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if test "$ac_cv_type_fpos_t" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008714as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008715See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716 else
8717 ac_cv_sizeof_fpos_t=0
8718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8723$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724
8725
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008728#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008729_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008730
Michael W. Hudson54241132001-12-07 15:38:26 +00008731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8737$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Martin v. Löwis18e16552006-02-15 17:27:45 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_size_t" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof_size_t=0
8751 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Martin v. Löwis18e16552006-02-15 17:27:45 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8756$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Martin v. Löwis18e16552006-02-15 17:27:45 +00008760cat >>confdefs.h <<_ACEOF
8761#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8762_ACEOF
8763
8764
Christian Heimes400adb02008-02-01 08:12:03 +00008765# The cast to long int works around a bug in the HP C Compiler
8766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8770$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008771if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 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 +00008775
Christian Heimes400adb02008-02-01 08:12:03 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 if test "$ac_cv_type_pid_t" = yes; then
8778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008780as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008781See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008782 else
8783 ac_cv_sizeof_pid_t=0
8784 fi
8785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786
Christian Heimes400adb02008-02-01 08:12:03 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8789$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008790
8791
8792
8793cat >>confdefs.h <<_ACEOF
8794#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8795_ACEOF
8796
8797
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008798# The cast to long int works around a bug in the HP C Compiler
8799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8801# This bug is HP SR number 8606223364.
8802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8803$as_echo_n "checking size of uintptr_t... " >&6; }
8804if ${ac_cv_sizeof_uintptr_t+:} false; then :
8805 $as_echo_n "(cached) " >&6
8806else
8807 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8808
8809else
8810 if test "$ac_cv_type_uintptr_t" = yes; then
8811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8813as_fn_error 77 "cannot compute sizeof (uintptr_t)
8814See \`config.log' for more details" "$LINENO" 5; }
8815 else
8816 ac_cv_sizeof_uintptr_t=0
8817 fi
8818fi
8819
8820fi
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8822$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8823
8824
8825
8826cat >>confdefs.h <<_ACEOF
8827#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8828_ACEOF
8829
8830
Michael W. Hudson54241132001-12-07 15:38:26 +00008831
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008832
Eitan Adler3055c942018-05-15 22:58:09 -07008833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8834$as_echo_n "checking for long double... " >&6; }
8835if ${ac_cv_type_long_double+:} false; then :
8836 $as_echo_n "(cached) " >&6
8837else
8838 if test "$GCC" = yes; then
8839 ac_cv_type_long_double=yes
8840 else
8841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8842/* end confdefs.h. */
8843/* The Stardent Vistra knows sizeof (long double), but does
8844 not support it. */
8845 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008846int
8847main ()
8848{
Eitan Adler3055c942018-05-15 22:58:09 -07008849static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8850 sizeof (double) <= sizeof (long double))];
8851test_array [0] = 0;
8852return test_array [0];
8853
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008854 ;
8855 return 0;
8856}
8857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008858if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008859 ac_cv_type_long_double=yes
8860else
8861 ac_cv_type_long_double=no
8862fi
8863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8864 fi
8865fi
8866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8867$as_echo "$ac_cv_type_long_double" >&6; }
8868 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008871
Eitan Adler3055c942018-05-15 22:58:09 -07008872 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008874# The cast to long int works around a bug in the HP C Compiler
8875# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8876# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8877# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8879$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008880if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008882else
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 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 +00008884
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 if test "$ac_cv_type_long_double" = yes; then
8887 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8888$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008889as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008890See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891 else
8892 ac_cv_sizeof_long_double=0
8893 fi
8894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008895
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8898$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008899
8900
8901
8902cat >>confdefs.h <<_ACEOF
8903#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8904_ACEOF
8905
8906
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908# The cast to long int works around a bug in the HP C Compiler
8909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8911# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8913$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008914if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008916else
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 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 +00008918
Thomas Woutersb2137042007-02-01 18:02:27 +00008919else
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 if test "$ac_cv_type__Bool" = yes; then
8921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008923as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008924See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925 else
8926 ac_cv_sizeof__Bool=0
8927 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008929
Thomas Woutersb2137042007-02-01 18:02:27 +00008930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8932$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933
8934
8935
Thomas Woutersb2137042007-02-01 18:02:27 +00008936cat >>confdefs.h <<_ACEOF
8937#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8938_ACEOF
8939
8940
Thomas Woutersb2137042007-02-01 18:02:27 +00008941
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008942# The cast to long int works around a bug in the HP C Compiler
8943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8945# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8947$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008948if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008950else
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952#ifdef HAVE_SYS_TYPES_H
8953#include <sys/types.h>
8954#endif
8955
Matthias Kloseb9621712010-04-24 17:59:49 +00008956"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008958else
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 if test "$ac_cv_type_off_t" = yes; then
8960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008962as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008963See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964 else
8965 ac_cv_sizeof_off_t=0
8966 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8971$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973
8974
Martin v. Löwis11437992002-04-12 09:54:03 +00008975cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008976#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008977_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008978
Michael W. Hudson54241132001-12-07 15:38:26 +00008979
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8982$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008983if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008984 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008987
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8989$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008993fi
8994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995# The cast to long int works around a bug in the HP C Compiler
8996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8998# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9000$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009001if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003else
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005#ifdef HAVE_SYS_TYPES_H
9006#include <sys/types.h>
9007#endif
9008#ifdef HAVE_TIME_H
9009#include <time.h>
9010#endif
9011
Matthias Kloseb9621712010-04-24 17:59:49 +00009012"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009014else
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 if test "$ac_cv_type_time_t" = yes; then
9016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009018as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009019See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020 else
9021 ac_cv_sizeof_time_t=0
9022 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009024
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9027$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029
9030
Martin v. Löwis11437992002-04-12 09:54:03 +00009031cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009032#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009034
Michael W. Hudson54241132001-12-07 15:38:26 +00009035
9036
Trent Mick635f6fb2000-08-23 21:33:05 +00009037# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009038ac_save_cc="$CC"
9039if test "$ac_cv_kpthread" = "yes"
9040then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009041elif test "$ac_cv_kthread" = "yes"
9042then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009043elif test "$ac_cv_pthread" = "yes"
9044then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009045fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9048$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009049have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009052
9053 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009054int
9055main ()
9056{
Guido van Rossum12580492000-09-24 16:47:19 +00009057pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 ;
9059 return 0;
9060}
Matthias Kloseb159a552010-04-25 21:00:44 +00009061
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009063if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009064 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9068$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009069if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9073# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9075$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009076if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009078else
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009080#ifdef HAVE_PTHREAD_H
9081#include <pthread.h>
9082#endif
9083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009085
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009086else
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 if test "$ac_cv_type_pthread_t" = yes; then
9088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009090as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009091See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092 else
9093 ac_cv_sizeof_pthread_t=0
9094 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009096
Trent Mick635f6fb2000-08-23 21:33:05 +00009097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9099$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101
9102
Martin v. Löwis11437992002-04-12 09:54:03 +00009103cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009104#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009105_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107
Trent Mick635f6fb2000-08-23 21:33:05 +00009108fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009109
9110# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9111# This checking will be unnecessary after removing deprecated TLS API.
9112# The cast to long int works around a bug in the HP C Compiler
9113# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9114# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9115# This bug is HP SR number 8606223364.
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9117$as_echo_n "checking size of pthread_key_t... " >&6; }
9118if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9119 $as_echo_n "(cached) " >&6
9120else
9121 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9122"; then :
9123
9124else
9125 if test "$ac_cv_type_pthread_key_t" = yes; then
9126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9128as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9129See \`config.log' for more details" "$LINENO" 5; }
9130 else
9131 ac_cv_sizeof_pthread_key_t=0
9132 fi
9133fi
9134
9135fi
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9137$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9138
9139
9140
9141cat >>confdefs.h <<_ACEOF
9142#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9143_ACEOF
9144
9145
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9147$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9148if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150/* end confdefs.h. */
9151#include <pthread.h>
9152int
9153main ()
9154{
9155pthread_key_t k; k * 1;
9156 ;
9157 return 0;
9158}
9159_ACEOF
9160if ac_fn_c_try_compile "$LINENO"; then :
9161 ac_pthread_key_t_is_arithmetic_type=yes
9162else
9163 ac_pthread_key_t_is_arithmetic_type=no
9164
9165fi
9166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9168$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9169 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9170
9171$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9172
9173 fi
9174else
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176$as_echo "no" >&6; }
9177fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009178CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009179
Michael W. Hudson54241132001-12-07 15:38:26 +00009180
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009182 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009183 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9184 ;;
9185 Darwin/*)
9186 OTHER_LIBTOOL_OPT=""
9187 ;;
9188esac
9189
9190
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009191
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009192case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009193 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009194 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9195 if test "${enable_universalsdk}"; then
9196 :
9197 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009198 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009199 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009200 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009201 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009202 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009203 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009204 if test ${gcc_version} '<' 4.0
9205 then
9206 LIBTOOL_CRUFT="-lcc_dynamic"
9207 else
9208 LIBTOOL_CRUFT=""
9209 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009210 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009211 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009212else
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009215
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009216 #include <unistd.h>
9217 int main(int argc, char*argv[])
9218 {
9219 if (sizeof(long) == 4) {
9220 return 0;
9221 } else {
9222 return 1;
9223 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009224 }
9225
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009227if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009228 ac_osx_32bit=yes
9229else
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234fi
9235
9236
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009237 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009238 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009239 i386)
9240 MACOSX_DEFAULT_ARCH="i386"
9241 ;;
9242 ppc)
9243 MACOSX_DEFAULT_ARCH="ppc"
9244 ;;
9245 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009246 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247 ;;
9248 esac
9249 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009250 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009251 i386)
9252 MACOSX_DEFAULT_ARCH="x86_64"
9253 ;;
9254 ppc)
9255 MACOSX_DEFAULT_ARCH="ppc64"
9256 ;;
9257 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009258 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009259 ;;
9260 esac
9261
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009262 fi
9263
9264 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009265 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9269$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009270if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009272 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009274 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9279$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009280 if test $enable_shared = "yes"
9281 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009282 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 +00009283 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284else
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287fi
9288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9290$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009291case $ac_sys_system/$ac_sys_release in
9292 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9297$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009298 ;;
9299 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009302 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009303esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009304
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306
Michael W. Hudson54241132001-12-07 15:38:26 +00009307
9308
9309
9310
Benjamin Peterson99f03762010-04-11 22:15:28 +00009311
Thomas Wouters477c8d52006-05-27 19:21:47 +00009312
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009313# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9314# -- usually .so, .sl on HP-UX, .dll on Cygwin
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9316$as_echo_n "checking the extension of shared libraries... " >&6; }
9317if test -z "$SHLIB_SUFFIX"; then
9318 case $ac_sys_system in
9319 hp*|HP*)
9320 case `uname -m` in
9321 ia64) SHLIB_SUFFIX=.so;;
9322 *) SHLIB_SUFFIX=.sl;;
9323 esac
9324 ;;
9325 CYGWIN*) SHLIB_SUFFIX=.dll;;
9326 *) SHLIB_SUFFIX=.so;;
9327 esac
9328fi
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9330$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009331
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009333# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334# (Shared libraries in this instance are shared modules to be loaded into
9335# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9337$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338if test -z "$LDSHARED"
9339then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009340 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009341 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009342 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009343 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009344 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009346 if test "$GCC" = "yes" ; then
9347 LDSHARED='$(CC) -shared'
9348 LDCXXSHARED='$(CXX) -shared'
9349 else
9350 LDSHARED='$(CC) -G'
9351 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009352 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009353 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009354 if test "$GCC" = "yes" ; then
9355 LDSHARED='$(CC) -shared'
9356 LDCXXSHARED='$(CXX) -shared'
9357 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009358 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009359 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009360 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009361 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009362 LDSHARED='$(CC) -bundle'
9363 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009364 if test "$enable_framework" ; then
9365 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009366 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9367 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009368 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009369 else
9370 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009371 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009372 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009373 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009374 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009375 LDSHARED='$(CC) -bundle'
9376 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009377 if test "$enable_framework" ; then
9378 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009379 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9380 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009381 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009382 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009383 # No framework, use the Python app as bundle-loader
9384 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009385 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009386 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009387 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009388 Darwin/*)
9389 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9390 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009391
Ned Deily36820b62014-06-25 13:44:22 -07009392 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9393 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9394 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9395 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9396 if test ${dep_target_major} -eq 10 && \
9397 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009398 then
Ned Deily36820b62014-06-25 13:44:22 -07009399 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009400 LDSHARED='$(CC) -bundle'
9401 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009402 if test "$enable_framework" ; then
9403 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009404 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9405 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009406 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009407 else
9408 # No framework, use the Python app as bundle-loader
9409 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9410 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009411 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009412 fi
Ned Deily36820b62014-06-25 13:44:22 -07009413 else
9414 # building for OS X 10.3 and later
9415 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9416 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9417 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009418 fi
9419 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009420 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 LDSHARED='$(CC) -shared'
9422 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009423 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009424 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009425 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009426 LDSHARED='$(CC) -shared'
9427 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009428 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009429 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009430 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009431 OpenBSD*)
9432 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9433 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009434 LDSHARED='$(CC) -shared $(CCSHARED)'
9435 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009436 else
9437 case `uname -r` in
9438 [01].* | 2.[0-7] | 2.[0-7].*)
9439 LDSHARED="ld -Bshareable ${LDFLAGS}"
9440 ;;
9441 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009442 LDSHARED='$(CC) -shared $(CCSHARED)'
9443 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009444 ;;
9445 esac
9446 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009447 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009448 LDSHARED='$(CC) -shared'
9449 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009450 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009451 if test "$GCC" = "yes" ; then
9452 LDSHARED='$(CC) -shared'
9453 LDCXXSHARED='$(CXX) -shared'
9454 else
9455 LDSHARED='$(CC) -G'
9456 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009457 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009458 SCO_SV*)
9459 LDSHARED='$(CC) -Wl,-G,-Bexport'
9460 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9461 CYGWIN*)
9462 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9463 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009464 *) LDSHARED="ld";;
9465 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9468$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009470BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009471# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009472# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9474$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009475if test -z "$CCSHARED"
9476then
Guido van Rossum07397971997-04-29 21:49:50 +00009477 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009478 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009479 then CCSHARED="-fPIC";
9480 elif test `uname -p` = sparc;
9481 then CCSHARED="-xcode=pic32";
9482 else CCSHARED="-Kpic";
9483 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009484 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009485 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009486 else CCSHARED="+z";
9487 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009488 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009489 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009490 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009491 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009492 if test "$GCC" = "yes"
9493 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009494 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009495 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009496 SCO_SV*)
9497 if test "$GCC" = "yes"
9498 then CCSHARED="-fPIC"
9499 else CCSHARED="-Kpic -belf"
9500 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009501 VxWorks*)
9502 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009503 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9506$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009508# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9510$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009511if test -z "$LINKFORSHARED"
9512then
Guido van Rossum07397971997-04-29 21:49:50 +00009513 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009514 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009515 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009516 LINKFORSHARED="-Wl,-E -Wl,+s";;
9517# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009518 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009519 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009520 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009522 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Ned Deily5bbbc732019-07-02 03:12:18 -04009523
9524 # Issue #18075: the default maximum stack size (8MBytes) is too
9525 # small for the default recursion limit. Increase the stack size
9526 # to ensure that tests don't crash
Ronald Oussoren1a057ba2019-08-01 07:43:07 +02009527 # Note: This matches the value of THREAD_STACK_SIZE in
9528 # thread_pthread.h
Ned Deily5bbbc732019-07-02 03:12:18 -04009529 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9530
Jack Jansene578a632001-08-15 01:27:14 +00009531 if test "$enable_framework"
9532 then
Jack Jansenda49e192005-01-07 13:08:22 +00009533 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009534 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009535 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009536 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009537 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009538 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009539 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009540 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9541 then
9542 LINKFORSHARED="-Wl,--export-dynamic"
9543 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009544 SunOS/5*) case $CC in
9545 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009546 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009547 then
9548 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009549 fi;;
9550 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009551 CYGWIN*)
9552 if test $enable_shared = "no"
9553 then
9554 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9555 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009556 QNX*)
9557 # -Wl,-E causes the symbols to be added to the dynamic
9558 # symbol table so that they can be found when a module
9559 # is loaded. -N 2048K causes the stack size to be set
9560 # to 2048 kilobytes so that the stack doesn't overflow
9561 # when running test_compile.py.
9562 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009563 VxWorks*)
9564 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009565 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9568$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569
Michael W. Hudson54241132001-12-07 15:38:26 +00009570
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009571
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9573$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009574if test ! "$LIBRARY" = "$LDLIBRARY"
9575then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009576 case $ac_sys_system in
9577 CYGWIN*)
9578 # Cygwin needs CCSHARED when building extension DLLs
9579 # but not when building the interpreter DLL.
9580 CFLAGSFORSHARED='';;
9581 *)
9582 CFLAGSFORSHARED='$(CCSHARED)'
9583 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9586$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009587
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009588# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9589# library (with --enable-shared).
9590# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009591# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9592# if it is not required, since it creates a dependency of the shared library
9593# to LIBS. This, in turn, means that applications linking the shared libpython
9594# don't need to link LIBS explicitly. The default should be only changed
9595# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9598$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009600 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009601 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009602esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9604$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009605
9606
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9609$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009610if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009611 $as_echo_n "(cached) " >&6
9612else
9613 ac_check_lib_save_LIBS=$LIBS
9614LIBS="-lsendfile $LIBS"
9615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9616/* end confdefs.h. */
9617
9618/* Override any GCC internal prototype to avoid an error.
9619 Use char because int might match the return type of a GCC
9620 builtin and then its argument prototype would still apply. */
9621#ifdef __cplusplus
9622extern "C"
9623#endif
9624char sendfile ();
9625int
9626main ()
9627{
9628return sendfile ();
9629 ;
9630 return 0;
9631}
9632_ACEOF
9633if ac_fn_c_try_link "$LINENO"; then :
9634 ac_cv_lib_sendfile_sendfile=yes
9635else
9636 ac_cv_lib_sendfile_sendfile=no
9637fi
9638rm -f core conftest.err conftest.$ac_objext \
9639 conftest$ac_exeext conftest.$ac_ext
9640LIBS=$ac_check_lib_save_LIBS
9641fi
9642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9643$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009644if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009645 cat >>confdefs.h <<_ACEOF
9646#define HAVE_LIBSENDFILE 1
9647_ACEOF
9648
9649 LIBS="-lsendfile $LIBS"
9650
9651fi
9652
Matthias Kloseb9621712010-04-24 17:59:49 +00009653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9654$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009655if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009659LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663/* Override any GCC internal prototype to avoid an error.
9664 Use char because int might match the return type of a GCC
9665 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009666#ifdef __cplusplus
9667extern "C"
9668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009669char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009670int
9671main ()
9672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009680else
Matthias Kloseb9621712010-04-24 17:59:49 +00009681 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009683rm -f core conftest.err conftest.$ac_objext \
9684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009685LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9688$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009689if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 cat >>confdefs.h <<_ACEOF
9691#define HAVE_LIBDL 1
9692_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009693
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009694 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009695
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009696fi
9697 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9699$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009700if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009702else
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009704LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708/* Override any GCC internal prototype to avoid an error.
9709 Use char because int might match the return type of a GCC
9710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711#ifdef __cplusplus
9712extern "C"
9713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009714char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715int
9716main ()
9717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ;
9720 return 0;
9721}
9722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009725else
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009728rm -f core conftest.err conftest.$ac_objext \
9729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9733$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 cat >>confdefs.h <<_ACEOF
9736#define HAVE_LIBDLD 1
9737_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009739 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009740
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009741fi
9742 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009743
Michael Felt0d3ccb42017-12-30 22:39:20 +01009744# checks for uuid.h location
9745for ac_header in uuid/uuid.h uuid.h
9746do :
9747 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9748ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9750 cat >>confdefs.h <<_ACEOF
9751#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9752_ACEOF
9753
9754fi
9755
9756done
9757
9758
Berker Peksag9a10ff42017-11-08 23:09:16 +03009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9760$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9762/* end confdefs.h. */
9763#include <uuid/uuid.h>
9764int
9765main ()
9766{
9767
9768#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009769void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009770#endif
9771
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776if ac_fn_c_try_compile "$LINENO"; then :
9777
9778$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9779
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9781$as_echo "yes" >&6; }
9782else
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
9785
9786fi
9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9788
Michael Felt0d3ccb42017-12-30 22:39:20 +01009789# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009790# FreeBSD and OpenBSD provides support as well
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9792$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9794/* end confdefs.h. */
9795#include <uuid.h>
9796int
9797main ()
9798{
9799
9800#ifndef uuid_create
9801void *x = uuid_create
9802#endif
9803
9804 ;
9805 return 0;
9806}
9807_ACEOF
9808if ac_fn_c_try_compile "$LINENO"; then :
9809
9810$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9811
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813$as_echo "yes" >&6; }
9814else
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817
9818fi
9819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9820
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009821# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9822# stream in big-endian byte-order
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9824$as_echo_n "checking for uuid_enc_be... " >&6; }
9825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9826/* end confdefs.h. */
9827#include <uuid.h>
9828int
9829main ()
9830{
9831
9832#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009833void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009834#endif
9835
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840if ac_fn_c_try_compile "$LINENO"; then :
9841
9842$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9843
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9845$as_echo "yes" >&6; }
9846else
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9848$as_echo "no" >&6; }
9849
9850fi
9851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9852
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009853# 'Real Time' functions on Solaris
9854# posix4 on Solaris 2.6
9855# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009857$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009858if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009860else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009861 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865/* Override any GCC internal prototype to avoid an error.
9866 Use char because int might match the return type of a GCC
9867 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868#ifdef __cplusplus
9869extern "C"
9870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009871char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009872int
9873main ()
9874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 ;
9877 return 0;
9878}
9879_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880for ac_lib in '' pthread rt posix4; do
9881 if test -z "$ac_lib"; then
9882 ac_res="none required"
9883 else
9884 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009885 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009890rm -f core conftest.err conftest.$ac_objext \
9891 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009892 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895done
Victor Stinnere0be4232011-10-25 13:06:09 +02009896if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009897
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898else
9899 ac_cv_search_sem_init=no
9900fi
9901rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009902LIBS=$ac_func_search_save_LIBS
9903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9905$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009907if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009909
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009910fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009911
Martin v. Löwis519adae2003-09-20 10:47:47 +00009912
Martin v. Löwis19d17342003-06-14 21:03:05 +00009913# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9915$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009916if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009918else
9919 ac_check_lib_save_LIBS=$LIBS
9920LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009922/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924/* Override any GCC internal prototype to avoid an error.
9925 Use char because int might match the return type of a GCC
9926 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009927#ifdef __cplusplus
9928extern "C"
9929#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009930char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931int
9932main ()
9933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009935 ;
9936 return 0;
9937}
9938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940 ac_cv_lib_intl_textdomain=yes
9941else
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944rm -f core conftest.err conftest.$ac_objext \
9945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009946LIBS=$ac_check_lib_save_LIBS
9947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9949$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009950if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953
Brett Cannonc6d936e2009-06-07 20:09:53 +00009954 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009955fi
9956
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009957
9958# checks for system dependent C++ extensions support
9959case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9961$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009964
Georg Brandl59e87bd2011-02-15 19:48:59 +00009965 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009966int
9967main ()
9968{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009969loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 ;
9971 return 0;
9972}
Matthias Kloseb159a552010-04-25 21:00:44 +00009973
Martin v. Löwis11437992002-04-12 09:54:03 +00009974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009975if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009979
Matthias Kloseb159a552010-04-25 21:00:44 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009981$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009982
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009983else
Matthias Kloseb159a552010-04-25 21:00:44 +00009984
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009987
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009989rm -f core conftest.err conftest.$ac_objext \
9990 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009991 *) ;;
9992esac
9993
Christian Heimes985ecdc2013-11-20 11:46:18 +01009994# check for systems that require aligned memory access
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9996$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009997if ${ac_cv_aligned_required+:} false; then :
9998 $as_echo_n "(cached) " >&6
9999else
10000 if test "$cross_compiling" = yes; then :
10001 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010002else
10003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10004/* end confdefs.h. */
10005
10006int main()
10007{
10008 char s[16];
10009 int i, *p1, *p2;
10010 for (i=0; i < 16; i++)
10011 s[i] = i;
10012 p1 = (int*)(s+1);
10013 p2 = (int*)(s+2);
10014 if (*p1 == *p2)
10015 return 1;
10016 return 0;
10017}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010018_ACEOF
10019if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010020 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010021else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010022 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023fi
10024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10025 conftest.$ac_objext conftest.beam conftest.$ac_ext
10026fi
10027
10028
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010029fi
10030
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10032$as_echo "$ac_cv_aligned_required" >&6; }
10033if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010034
10035$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10036
10037fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010038
10039# str, bytes and memoryview hash algorithm
10040
10041
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10043$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10044
10045# Check whether --with-hash_algorithm was given.
10046if test "${with_hash_algorithm+set}" = set; then :
10047 withval=$with_hash_algorithm;
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10049$as_echo "$withval" >&6; }
10050case "$withval" in
10051 siphash24)
10052 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10053
10054 ;;
10055 fnv)
10056 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10057
10058 ;;
10059 *)
10060 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10061 ;;
10062esac
10063
10064else
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10066$as_echo "default" >&6; }
10067fi
10068
10069
Charles-François Natalid30b0222014-05-08 23:08:51 +010010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10071$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10072
10073# Check whether --with-address_sanitizer was given.
10074if test "${with_address_sanitizer+set}" = set; then :
10075 withval=$with_address_sanitizer;
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10077$as_echo "$withval" >&6; }
10078BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10079LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010080# ASan works by controlling memory allocation, our own malloc interferes.
10081with_pymalloc="no"
10082
10083else
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10090$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10091
10092# Check whether --with-memory_sanitizer was given.
10093if test "${with_memory_sanitizer+set}" = set; then :
10094 withval=$with_memory_sanitizer;
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10096$as_echo "$withval" >&6; }
10097BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10098LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10099# MSan works by controlling memory allocation, our own malloc interferes.
10100with_pymalloc="no"
10101
10102else
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105fi
10106
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10109$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10110
10111# Check whether --with-undefined_behavior_sanitizer was given.
10112if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10113 withval=$with_undefined_behavior_sanitizer;
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10115$as_echo "$withval" >&6; }
10116BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10117LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010118
10119else
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
Guido van Rossum70c7f481998-03-26 18:44:10 +000010125# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10127$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010128if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010130else
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010132LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136/* Override any GCC internal prototype to avoid an error.
10137 Use char because int might match the return type of a GCC
10138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139#ifdef __cplusplus
10140extern "C"
10141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010142char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010143int
10144main ()
10145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010153else
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156rm -f core conftest.err conftest.$ac_objext \
10157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010158LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10161$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010162if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010163 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010164fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010165 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10167$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010168if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010170else
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010172LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176/* Override any GCC internal prototype to avoid an error.
10177 Use char because int might match the return type of a GCC
10178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010179#ifdef __cplusplus
10180extern "C"
10181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010182char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010183int
10184main ()
10185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ;
10188 return 0;
10189}
10190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010193else
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196rm -f core conftest.err conftest.$ac_objext \
10197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010198LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10201$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010202if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010203 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010204fi
10205 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10208$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10214$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010215LIBS="$withval $LIBS"
10216
10217else
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10219$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220fi
10221
Guido van Rossum7f43da71994-08-01 12:15:30 +000010222
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010223
10224
10225
10226
10227
10228
Victor Stinner23a683a2019-04-12 21:27:37 +020010229
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010230if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10231 if test -n "$ac_tool_prefix"; then
10232 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10233set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10235$as_echo_n "checking for $ac_word... " >&6; }
10236if ${ac_cv_path_PKG_CONFIG+:} false; then :
10237 $as_echo_n "(cached) " >&6
10238else
10239 case $PKG_CONFIG in
10240 [\\/]* | ?:[\\/]*)
10241 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10242 ;;
10243 *)
10244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245for as_dir in $PATH
10246do
10247 IFS=$as_save_IFS
10248 test -z "$as_dir" && as_dir=.
10249 for ac_exec_ext in '' $ac_executable_extensions; do
10250 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10251 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10253 break 2
10254 fi
10255done
10256 done
10257IFS=$as_save_IFS
10258
10259 ;;
10260esac
10261fi
10262PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10263if test -n "$PKG_CONFIG"; then
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10265$as_echo "$PKG_CONFIG" >&6; }
10266else
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268$as_echo "no" >&6; }
10269fi
10270
10271
10272fi
10273if test -z "$ac_cv_path_PKG_CONFIG"; then
10274 ac_pt_PKG_CONFIG=$PKG_CONFIG
10275 # Extract the first word of "pkg-config", so it can be a program name with args.
10276set dummy pkg-config; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10280 $as_echo_n "(cached) " >&6
10281else
10282 case $ac_pt_PKG_CONFIG in
10283 [\\/]* | ?:[\\/]*)
10284 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10285 ;;
10286 *)
10287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290 IFS=$as_save_IFS
10291 test -z "$as_dir" && as_dir=.
10292 for ac_exec_ext in '' $ac_executable_extensions; do
10293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296 break 2
10297 fi
10298done
10299 done
10300IFS=$as_save_IFS
10301
10302 ;;
10303esac
10304fi
10305ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10306if test -n "$ac_pt_PKG_CONFIG"; then
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10308$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10309else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314 if test "x$ac_pt_PKG_CONFIG" = x; then
10315 PKG_CONFIG=""
10316 else
10317 case $cross_compiling:$ac_tool_warned in
10318yes:)
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10321ac_tool_warned=yes ;;
10322esac
10323 PKG_CONFIG=$ac_pt_PKG_CONFIG
10324 fi
10325else
10326 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10327fi
10328
10329fi
10330if test -n "$PKG_CONFIG"; then
10331 _pkg_min_version=0.9.0
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10333$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10334 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10336$as_echo "yes" >&6; }
10337 else
10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
10340 PKG_CONFIG=""
10341 fi
10342fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010343
10344# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10346$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010347
10348# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010350 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010351else
10352 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010353fi
10354
10355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10357$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010358
10359# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10361$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010362
10363# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010365 withval=$with_system_ffi;
10366fi
10367
10368
Zachary Waref40d4dd2016-09-17 01:25:24 -050010369if test "$ac_sys_system" = "Darwin"
10370then
10371 case "$with_system_ffi" in
10372 "")
10373 with_system_ffi="no"
10374 ;;
10375 yes|no)
10376 ;;
10377 *)
10378 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10379 ;;
10380 esac
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10382$as_echo "$with_system_ffi" >&6; }
10383else
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10385$as_echo "yes" >&6; }
10386 if test "$with_system_ffi" != ""
10387 then
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10389$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10390 fi
10391 with_system_ffi="yes"
10392fi
Zachary Ware935043d2016-09-09 17:01:21 -070010393
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010394if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010395 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10396else
10397 LIBFFI_INCLUDEDIR=""
10398fi
10399
10400
Stefan Krah60187b52012-03-23 19:06:27 +010010401# Check for use of the system libmpdec library
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10403$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10404
10405# Check whether --with-system_libmpdec was given.
10406if test "${with_system_libmpdec+set}" = set; then :
10407 withval=$with_system_libmpdec;
10408else
10409 with_system_libmpdec="no"
10410fi
10411
10412
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10414$as_echo "$with_system_libmpdec" >&6; }
10415
Benjamin Peterson076ed002010-10-31 17:11:02 +000010416# Check for support for loadable sqlite extensions
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10418$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10419# Check whether --enable-loadable-sqlite-extensions was given.
10420if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10421 enableval=$enable_loadable_sqlite_extensions;
10422else
10423 enable_loadable_sqlite_extensions="no"
10424fi
10425
10426
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10428$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10429
Ned Deilyd819b932013-09-06 01:07:05 -070010430# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10431
10432
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10434$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10435
10436# Check whether --with-tcltk-includes was given.
10437if test "${with_tcltk_includes+set}" = set; then :
10438 withval=$with_tcltk_includes;
10439else
10440 with_tcltk_includes="default"
10441fi
10442
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10444$as_echo "$with_tcltk_includes" >&6; }
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10446$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10447
10448# Check whether --with-tcltk-libs was given.
10449if test "${with_tcltk_libs+set}" = set; then :
10450 withval=$with_tcltk_libs;
10451else
10452 with_tcltk_libs="default"
10453fi
10454
10455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10456$as_echo "$with_tcltk_libs" >&6; }
10457if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10458then
10459 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10460 then
10461 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10462 fi
10463 TCLTK_INCLUDES=""
10464 TCLTK_LIBS=""
10465else
10466 TCLTK_INCLUDES="$with_tcltk_includes"
10467 TCLTK_LIBS="$with_tcltk_libs"
10468fi
10469
Matthias Klose55708cc2009-04-30 08:06:49 +000010470# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10472$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010473
10474# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010475if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010476 withval=$with_dbmliborder;
10477if test x$with_dbmliborder = xyes
10478then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010479as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010480else
10481 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10482 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10483 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010484 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010485 fi
10486 done
10487fi
10488fi
10489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10491$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010492
Martin v. Löwis11437992002-04-12 09:54:03 +000010493# Templates for things AC_DEFINEd more than once.
10494# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010495
10496
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010497if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010498then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010499 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010501
10502 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010503elif test "$ac_cv_kpthread" = "yes"
10504then
10505 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010506 if test "$ac_cv_cxx_thread" = "yes"; then
10507 CXX="$CXX -Kpthread"
10508 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010510elif test "$ac_cv_kthread" = "yes"
10511then
10512 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010513 if test "$ac_cv_cxx_thread" = "yes"; then
10514 CXX="$CXX -Kthread"
10515 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010516 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010517elif test "$ac_cv_pthread" = "yes"
10518then
10519 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010520 if test "$ac_cv_cxx_thread" = "yes"; then
10521 CXX="$CXX -pthread"
10522 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010523 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010524else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010525 if test ! -z "$withval" -a -d "$withval"
10526 then LDFLAGS="$LDFLAGS -L$withval"
10527 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010528
10529 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010530 # define _POSIX_THREADS in unistd.h. Some apparently don't
10531 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10533$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010536
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010537#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010538#ifdef _POSIX_THREADS
10539yes
10540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010541
10542_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010545 unistd_defines_pthreads=yes
10546else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547 unistd_defines_pthreads=no
10548fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010549rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010550
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10552$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010555
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010556 # Just looking for pthread_create in libpthread is not enough:
10557 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10558 # So we really have to include pthread.h, and then link.
10559 _libs=$LIBS
10560 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10562$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010565
10566#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010567#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010568
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010569void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010570int
10571main ()
10572{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010573
10574pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ;
10576 return 0;
10577}
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10582$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010583 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010584
Guido van Rossum02a1c402000-02-25 19:26:31 +000010585else
Martin v. Löwis11437992002-04-12 09:54:03 +000010586
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010587 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010589if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010590
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010591 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010592
Guido van Rossumad678af1998-10-02 14:42:15 +000010593else
Guido van Rossumad678af1998-10-02 14:42:15 +000010594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10596$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010597if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599else
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010601LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605/* Override any GCC internal prototype to avoid an error.
10606 Use char because int might match the return type of a GCC
10607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010608#ifdef __cplusplus
10609extern "C"
10610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010611char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010612int
10613main ()
10614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 ;
10617 return 0;
10618}
10619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010620if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010621 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010622else
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010624fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010625rm -f core conftest.err conftest.$ac_objext \
10626 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010627LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10630$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010631if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010632
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010633 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010634 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010635
Greg Steinadf63d62000-07-05 10:38:09 +000010636else
Greg Steinadf63d62000-07-05 10:38:09 +000010637
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10639$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010640if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010642else
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010644LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648/* Override any GCC internal prototype to avoid an error.
10649 Use char because int might match the return type of a GCC
10650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010651#ifdef __cplusplus
10652extern "C"
10653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010654char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010655int
10656main ()
10657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ;
10660 return 0;
10661}
10662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010668rm -f core conftest.err conftest.$ac_objext \
10669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10673$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010674if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010675
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010676 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010677 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010678
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010679else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10682$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010685else
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010687LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691/* Override any GCC internal prototype to avoid an error.
10692 Use char because int might match the return type of a GCC
10693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010694#ifdef __cplusplus
10695extern "C"
10696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010697char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010698int
10699main ()
10700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 ;
10703 return 0;
10704}
10705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010706if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010708else
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010711rm -f core conftest.err conftest.$ac_objext \
10712 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10716$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010717if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010718
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010719 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010720 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010721
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010722else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10725$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010726if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010730LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734/* Override any GCC internal prototype to avoid an error.
10735 Use char because int might match the return type of a GCC
10736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010737#ifdef __cplusplus
10738extern "C"
10739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010740char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010741int
10742main ()
10743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 ;
10746 return 0;
10747}
10748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010751else
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754rm -f core conftest.err conftest.$ac_objext \
10755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010756LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10759$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010760if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010761
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010762 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010763 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010764
Guido van Rossumb93a8621998-05-07 13:27:32 +000010765else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010766
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010767 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10768
Guido van Rossum2d38f911996-06-26 19:47:01 +000010769fi
10770
Guido van Rossum627b2d71993-12-24 10:39:16 +000010771
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010772fi
10773
Guido van Rossum0be3e491997-05-22 20:33:33 +000010774fi
10775
Guido van Rossum49545951997-12-02 19:28:29 +000010776fi
10777
Guido van Rossumb93a8621998-05-07 13:27:32 +000010778fi
10779
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010781rm -f core conftest.err conftest.$ac_objext \
10782 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10785$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010786if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010788else
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010790LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794/* Override any GCC internal prototype to avoid an error.
10795 Use char because int might match the return type of a GCC
10796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010797#ifdef __cplusplus
10798extern "C"
10799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010800char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010801int
10802main ()
10803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 ;
10806 return 0;
10807}
10808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811else
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010814rm -f core conftest.err conftest.$ac_objext \
10815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010816LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10819$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010820if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010821
Martin v. Löwis130fb172001-07-19 11:00:41 +000010822 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010823
Guido van Rossum627b2d71993-12-24 10:39:16 +000010824fi
10825
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010826
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010827fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010828
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010829if test "$posix_threads" = "yes"; then
10830 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833
10834 fi
10835
10836 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10837 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010838 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010839$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010840
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841 ;;
10842 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010843$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844
10845 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010846 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010847$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010848
10849 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010850 esac
10851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10853$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010854 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010856else
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010858 ac_cv_pthread_system_supported=no
10859else
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010862
10863 #include <stdio.h>
10864 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010865 void *foo(void *parm) {
10866 return NULL;
10867 }
10868 main() {
10869 pthread_attr_t attr;
10870 pthread_t id;
10871 if (pthread_attr_init(&attr)) exit(-1);
10872 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10873 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10874 exit(0);
10875 }
10876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010877if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878 ac_cv_pthread_system_supported=yes
10879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010886
Guido van Rossum627b2d71993-12-24 10:39:16 +000010887fi
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10890$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010891 if test "$ac_cv_pthread_system_supported" = "yes"; then
10892
Matthias Kloseb9621712010-04-24 17:59:49 +000010893$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894
10895 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 for ac_func in pthread_sigmask
10897do :
10898 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010899if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010900 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010901#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010902_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010903 case $ac_sys_system in
10904 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010907
10908 ;;
10909 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010910fi
10911done
10912
pdoxe14679c2017-10-05 00:01:56 -070010913 for ac_func in pthread_getcpuclockid
10914do :
10915 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10916if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10917 cat >>confdefs.h <<_ACEOF
10918#define HAVE_PTHREAD_GETCPUCLOCKID 1
10919_ACEOF
10920
10921fi
10922done
10923
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010924fi
10925
10926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10930$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010932if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010933 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010934 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 ipv6=no
10938 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10940$as_echo "yes" >&6; }
10941 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942
10943 ipv6=yes
10944 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946else
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 /* AF_INET6 available check */
10951#include <sys/types.h>
10952#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010953int
10954main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010956int domain = AF_INET6;
10957 ;
10958 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959}
Martin v. Löwis11437992002-04-12 09:54:03 +000010960_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010961if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10964$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967else
Matthias Kloseb159a552010-04-25 21:00:44 +000010968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010976if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10978$as_echo_n "checking if RFC2553 API is available... " >&6; }
10979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010981
10982 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010983#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010984int
10985main ()
10986{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010987struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010988 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 ;
10990 return 0;
10991}
Matthias Kloseb159a552010-04-25 21:00:44 +000010992
Martin v. Löwis11437992002-04-12 09:54:03 +000010993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010995
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010998 ipv6=yes
10999
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011000else
Matthias Kloseb159a552010-04-25 21:00:44 +000011001
11002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011004 ipv6=no
11005
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011008fi
11009
11010if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011012
11013fi
11014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015fi
11016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011017
11018ipv6type=unknown
11019ipv6lib=none
11020ipv6trylibc=no
11021
11022if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11024$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011025 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11026 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027 case $i in
11028 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011032#include <netinet/in.h>
11033#ifdef IPV6_INRIA_VERSION
11034yes
11035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011039 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011041rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042
11043 ;;
11044 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048#include <netinet/in.h>
11049#ifdef __KAME__
11050yes
11051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055 ipv6type=$i;
11056 ipv6lib=inet6
11057 ipv6libdir=/usr/local/v6/lib
11058 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011060rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061
11062 ;;
11063 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067#include <features.h>
11068#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11069yes
11070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074 ipv6type=$i;
11075 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078
11079 ;;
11080 linux-inet6)
11081 if test -d /usr/inet6; then
11082 ipv6type=$i
11083 ipv6lib=inet6
11084 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011085 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086 fi
11087 ;;
11088 solaris)
11089 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011090 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091 ipv6type=$i
11092 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 fi
11094 fi
11095 ;;
11096 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011099
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011100#include <sys/param.h>
11101#ifdef _TOSHIBA_INET6
11102yes
11103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011104_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107 ipv6type=$i;
11108 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011109 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011111rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112
11113 ;;
11114 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118#include </usr/local/v6/include/sys/v6config.h>
11119#ifdef __V6D__
11120yes
11121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125 ipv6type=$i;
11126 ipv6lib=v6;
11127 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011128 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011130rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131
11132 ;;
11133 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137#include <sys/param.h>
11138#ifdef _ZETA_MINAMI_INET6
11139yes
11140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144 ipv6type=$i;
11145 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011146 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011148rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149
11150 ;;
11151 esac
11152 if test "$ipv6type" != "unknown"; then
11153 break
11154 fi
11155 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11157$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011158fi
11159
11160if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11161 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11162 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11163 echo "using lib$ipv6lib"
11164 else
11165 if test $ipv6trylibc = "yes"; then
11166 echo "using libc"
11167 else
11168 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11169 echo "You need to fetch lib$ipv6lib.a from appropriate"
11170 echo 'ipv6 kit and compile beforehand.'
11171 exit 1
11172 fi
11173 fi
11174fi
11175
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11177$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179/* end confdefs.h. */
11180 /* CAN_RAW_FD_FRAMES available check */
11181#include <linux/can/raw.h>
11182int
11183main ()
11184{
11185int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11186 ;
11187 return 0;
11188}
11189_ACEOF
11190if ac_fn_c_try_compile "$LINENO"; then :
11191
11192
11193$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11194
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11196$as_echo "yes" >&6; }
11197
11198else
11199
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
11202
11203fi
11204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11205
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011206# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11208$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212 withval=$with_doc_strings;
11213fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011214
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011215
11216if test -z "$with_doc_strings"
11217then with_doc_strings="yes"
11218fi
11219if test "$with_doc_strings" != "no"
11220then
11221
Matthias Kloseb9621712010-04-24 17:59:49 +000011222$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011223
11224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11226$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011227
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011228# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11230$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011233if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234 withval=$with_pymalloc;
11235fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011236
Neil Schemenauera35c6882001-02-27 04:45:05 +000011237
Neil Schemenauer16c22972002-03-22 15:34:49 +000011238if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011239then
11240 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011241fi
11242if test "$with_pymalloc" != "no"
11243then
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011246
11247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11249$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011250
Nick Coghlan6ea41862017-06-11 13:16:15 +100011251# Check for --with-c-locale-coercion
11252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11253$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11254
11255# Check whether --with-c-locale-coercion was given.
11256if test "${with_c_locale_coercion+set}" = set; then :
11257 withval=$with_c_locale_coercion;
11258fi
11259
11260
11261if test -z "$with_c_locale_coercion"
11262then
11263 with_c_locale_coercion="yes"
11264fi
11265if test "$with_c_locale_coercion" != "no"
11266then
11267
11268$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11269
11270fi
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11272$as_echo "$with_c_locale_coercion" >&6; }
11273
Benjamin Peterson05159c42009-12-03 03:01:27 +000011274# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11276$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011277
11278# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011279if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011280 withval=$with_valgrind;
11281else
11282 with_valgrind=no
11283fi
11284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11286$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011287if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 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 +020011289if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011292
11293else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011294 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295
11296fi
11297
11298
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011299 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011300fi
11301
Łukasz Langaa785c872016-09-09 17:37:37 -070011302# Check for DTrace support
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11304$as_echo_n "checking for --with-dtrace... " >&6; }
11305
11306# Check whether --with-dtrace was given.
11307if test "${with_dtrace+set}" = set; then :
11308 withval=$with_dtrace;
11309else
11310 with_dtrace=no
11311fi
11312
11313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11314$as_echo "$with_dtrace" >&6; }
11315
11316
11317
11318
11319
11320DTRACE=
11321DFLAGS=
11322DTRACE_HEADERS=
11323DTRACE_OBJS=
11324
11325if test "$with_dtrace" = "yes"
11326then
11327 # Extract the first word of "dtrace", so it can be a program name with args.
11328set dummy dtrace; ac_word=$2
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330$as_echo_n "checking for $ac_word... " >&6; }
11331if ${ac_cv_path_DTRACE+:} false; then :
11332 $as_echo_n "(cached) " >&6
11333else
11334 case $DTRACE in
11335 [\\/]* | ?:[\\/]*)
11336 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11337 ;;
11338 *)
11339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340for as_dir in $PATH
11341do
11342 IFS=$as_save_IFS
11343 test -z "$as_dir" && as_dir=.
11344 for ac_exec_ext in '' $ac_executable_extensions; do
11345 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348 break 2
11349 fi
11350done
11351 done
11352IFS=$as_save_IFS
11353
11354 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11355 ;;
11356esac
11357fi
11358DTRACE=$ac_cv_path_DTRACE
11359if test -n "$DTRACE"; then
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11361$as_echo "$DTRACE" >&6; }
11362else
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
11365fi
11366
11367
11368 if test "$DTRACE" = "not found"; then
11369 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11370 fi
11371
11372$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11373
11374 DTRACE_HEADERS="Include/pydtrace_probes.h"
11375
11376 # On OS X, DTrace providers do not need to be explicitly compiled and
11377 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11378 # generation flag '-G'. We check for presence of this flag, rather than
11379 # hardcoding support by OS, in the interest of robustness.
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11381$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11382if ${ac_cv_dtrace_link+:} false; then :
11383 $as_echo_n "(cached) " >&6
11384else
11385 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011386 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011387 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11388 ac_cv_dtrace_link=yes
11389
11390fi
11391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11392$as_echo "$ac_cv_dtrace_link" >&6; }
11393 if test "$ac_cv_dtrace_link" = "yes"; then
11394 DTRACE_OBJS="Python/pydtrace.o"
11395 fi
11396fi
11397
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011398# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011399
Guido van Rossum98935bf2001-09-05 19:13:16 +000011400DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011401
Guido van Rossume97ee181999-12-20 21:27:22 +000011402# the dlopen() function means we might want to use dynload_shlib.o. some
11403# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011404for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011405do :
11406 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011407if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011410_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011411
Guido van Rossume97ee181999-12-20 21:27:22 +000011412fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011413done
Guido van Rossume97ee181999-12-20 21:27:22 +000011414
Michael W. Hudson54241132001-12-07 15:38:26 +000011415
Guido van Rossume97ee181999-12-20 21:27:22 +000011416# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11417# loading of modules.
11418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11420$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011421if test -z "$DYNLOADFILE"
11422then
11423 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011424 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11425 if test "$ac_cv_func_dlopen" = yes
11426 then DYNLOADFILE="dynload_shlib.o"
11427 else DYNLOADFILE="dynload_aix.o"
11428 fi
11429 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011430 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011431 *)
11432 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11433 # out any dynamic loading
11434 if test "$ac_cv_func_dlopen" = yes
11435 then DYNLOADFILE="dynload_shlib.o"
11436 else DYNLOADFILE="dynload_stub.o"
11437 fi
11438 ;;
11439 esac
11440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11442$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011443if test "$DYNLOADFILE" != "dynload_stub.o"
11444then
Martin v. Löwis11437992002-04-12 09:54:03 +000011445
Matthias Kloseb9621712010-04-24 17:59:49 +000011446$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011447
11448fi
11449
Neil Schemenauer4e425612001-06-19 15:44:15 +000011450# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11451
Michael W. Hudson54241132001-12-07 15:38:26 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11454$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011455if test -z "$MACHDEP_OBJS"
11456then
Jack Jansene578a632001-08-15 01:27:14 +000011457 MACHDEP_OBJS=$extra_machdep_objs
11458else
11459 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011460fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011461if test -z "$MACHDEP_OBJS"; then
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11463$as_echo "none" >&6; }
11464else
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11466$as_echo "$MACHDEP_OBJS" >&6; }
11467fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011468
Guido van Rossum627b2d71993-12-24 10:39:16 +000011469# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011470for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011471 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11472 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011473 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011474 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011475 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011476 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011477 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011478 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011479 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011480 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011481 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011482 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011483 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11484 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011485 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011486 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011487 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011488 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11489 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011490 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011491 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011492 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011493 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011494 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011495do :
11496 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11497ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011498if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011500#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011501_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011502
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011503fi
11504done
11505
Michael W. Hudson54241132001-12-07 15:38:26 +000011506
Benjamin Peterson40caa052018-09-12 15:52:40 -070011507# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11508# links. Some libc implementations have a stub lchmod implementation that always
11509# returns an error.
11510if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011511 for ac_func in lchmod
11512do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011513 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11514if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011515 cat >>confdefs.h <<_ACEOF
11516#define HAVE_LCHMOD 1
11517_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011518
11519fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011520done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011521
11522fi
11523
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011524ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11525 #include <dirent.h>
11526"
11527if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11528
11529$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11530
11531fi
11532
11533
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011534# For some functions, having a definition is not sufficient, since
11535# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11537$as_echo_n "checking for chroot... " >&6; }
11538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011540#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011541int
11542main ()
11543{
11544void *x=chroot
11545 ;
11546 return 0;
11547}
11548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011550
Matthias Kloseb9621712010-04-24 17:59:49 +000011551$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011552
Matthias Kloseb159a552010-04-25 21:00:44 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011555else
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558
11559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11562$as_echo_n "checking for link... " >&6; }
11563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011564/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011565#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011566int
11567main ()
11568{
11569void *x=link
11570 ;
11571 return 0;
11572}
11573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011577
Matthias Kloseb159a552010-04-25 21:00:44 +000011578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583
11584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11587$as_echo_n "checking for symlink... " >&6; }
11588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011589/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011590#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011591int
11592main ()
11593{
11594void *x=symlink
11595 ;
11596 return 0;
11597}
11598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011602
Matthias Kloseb159a552010-04-25 21:00:44 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011604$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011605else
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608
11609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11612$as_echo_n "checking for fchdir... " >&6; }
11613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011615#include <unistd.h>
11616int
11617main ()
11618{
11619void *x=fchdir
11620 ;
11621 return 0;
11622}
11623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011625
Matthias Kloseb9621712010-04-24 17:59:49 +000011626$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011627
Matthias Kloseb159a552010-04-25 21:00:44 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011629$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011630else
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633
11634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11637$as_echo_n "checking for fsync... " >&6; }
11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011640#include <unistd.h>
11641int
11642main ()
11643{
11644void *x=fsync
11645 ;
11646 return 0;
11647}
11648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011652
Matthias Kloseb159a552010-04-25 21:00:44 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011654$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011658
11659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11662$as_echo_n "checking for fdatasync... " >&6; }
11663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011664/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011665#include <unistd.h>
11666int
11667main ()
11668{
11669void *x=fdatasync
11670 ;
11671 return 0;
11672}
11673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011677
Matthias Kloseb159a552010-04-25 21:00:44 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011683
11684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11687$as_echo_n "checking for epoll... " >&6; }
11688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011689/* end confdefs.h. */
11690#include <sys/epoll.h>
11691int
11692main ()
11693{
11694void *x=epoll_create
11695 ;
11696 return 0;
11697}
11698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011699if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011702
Matthias Kloseb159a552010-04-25 21:00:44 +000011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011708
11709fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11712$as_echo_n "checking for epoll_create1... " >&6; }
11713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11714/* end confdefs.h. */
11715#include <sys/epoll.h>
11716int
11717main ()
11718{
11719void *x=epoll_create1
11720 ;
11721 return 0;
11722}
11723_ACEOF
11724if ac_fn_c_try_compile "$LINENO"; then :
11725
11726$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11727
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11729$as_echo "yes" >&6; }
11730else
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732$as_echo "no" >&6; }
11733
11734fi
11735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11737$as_echo_n "checking for kqueue... " >&6; }
11738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011739/* end confdefs.h. */
11740
11741#include <sys/types.h>
11742#include <sys/event.h>
11743
11744int
11745main ()
11746{
11747int x=kqueue()
11748 ;
11749 return 0;
11750}
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011753
Matthias Kloseb9621712010-04-24 17:59:49 +000011754$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011755
Matthias Kloseb159a552010-04-25 21:00:44 +000011756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11760$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011761
11762fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11765$as_echo_n "checking for prlimit... " >&6; }
11766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11767/* end confdefs.h. */
11768
11769#include <sys/time.h>
11770#include <sys/resource.h>
11771
11772int
11773main ()
11774{
11775void *x=prlimit
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780if ac_fn_c_try_compile "$LINENO"; then :
11781
11782$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11783
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11785$as_echo "yes" >&6; }
11786else
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
11789
11790fi
11791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11792
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11794$as_echo_n "checking for memfd_create... " >&6; }
11795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11796/* end confdefs.h. */
11797
11798#ifdef HAVE_SYS_MMAN_H
11799#include <sys/mman.h>
11800#endif
11801#ifdef HAVE_SYS_MEMFD_H
11802#include <sys/memfd.h>
11803#endif
11804
11805int
11806main ()
11807{
11808void *x=memfd_create
11809 ;
11810 return 0;
11811}
11812_ACEOF
11813if ac_fn_c_try_compile "$LINENO"; then :
11814
11815$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11816
11817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11818$as_echo "yes" >&6; }
11819else
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821$as_echo "no" >&6; }
11822
11823fi
11824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11825
Martin v. Löwisd5843682002-11-21 20:41:28 +000011826# On some systems (eg. FreeBSD 5), we would find a definition of the
11827# functions ctermid_r, setgroups in the library, but no prototype
11828# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11829# address to avoid compiler warnings and potential miscompilations
11830# because of the missing prototypes.
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11833$as_echo_n "checking for ctermid_r... " >&6; }
11834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011836
Martin v. Löwisd5843682002-11-21 20:41:28 +000011837#include <stdio.h>
11838
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839int
11840main ()
11841{
11842void* p = ctermid_r
11843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011848
Matthias Kloseb9621712010-04-24 17:59:49 +000011849$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011850
Matthias Kloseb159a552010-04-25 21:00:44 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011856
11857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11859
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11861$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011862if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011863 $as_echo_n "(cached) " >&6
11864else
11865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011866/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011867#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011868int
11869main ()
11870{
11871void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011872
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011873 ;
11874 return 0;
11875}
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011878 ac_cv_flock_decl=yes
11879else
11880 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011881
11882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011884
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011885fi
11886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11887$as_echo "$ac_cv_flock_decl" >&6; }
11888if test "x${ac_cv_flock_decl}" = xyes; then
11889 for ac_func in flock
11890do :
11891 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011892if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011893 cat >>confdefs.h <<_ACEOF
11894#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011895_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011896
Antoine Pitroua3000072010-09-07 14:52:42 +000011897else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011899$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011900if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011901 $as_echo_n "(cached) " >&6
11902else
11903 ac_check_lib_save_LIBS=$LIBS
11904LIBS="-lbsd $LIBS"
11905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11906/* end confdefs.h. */
11907
11908/* Override any GCC internal prototype to avoid an error.
11909 Use char because int might match the return type of a GCC
11910 builtin and then its argument prototype would still apply. */
11911#ifdef __cplusplus
11912extern "C"
11913#endif
11914char flock ();
11915int
11916main ()
11917{
11918return flock ();
11919 ;
11920 return 0;
11921}
11922_ACEOF
11923if ac_fn_c_try_link "$LINENO"; then :
11924 ac_cv_lib_bsd_flock=yes
11925else
11926 ac_cv_lib_bsd_flock=no
11927fi
11928rm -f core conftest.err conftest.$ac_objext \
11929 conftest$ac_exeext conftest.$ac_ext
11930LIBS=$ac_check_lib_save_LIBS
11931fi
11932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11933$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011934if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011935 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011936
11937
11938$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11939
11940
11941fi
11942
11943
11944fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011945done
11946
Antoine Pitroua3000072010-09-07 14:52:42 +000011947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11950$as_echo_n "checking for getpagesize... " >&6; }
11951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011952/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011953
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011954#include <unistd.h>
11955
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956int
11957main ()
11958{
11959void* p = getpagesize
11960 ;
11961 return 0;
11962}
11963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011967
Matthias Kloseb159a552010-04-25 21:00:44 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011973
11974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011976
Victor Stinner984890f2011-11-24 13:53:38 +010011977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11978$as_echo_n "checking for broken unsetenv... " >&6; }
11979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980/* end confdefs.h. */
11981
11982#include <stdlib.h>
11983
11984int
11985main ()
11986{
11987int res = unsetenv("DUMMY")
11988 ;
11989 return 0;
11990}
11991_ACEOF
11992if ac_fn_c_try_compile "$LINENO"; then :
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994$as_echo "no" >&6; }
11995else
11996
11997$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11998
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12000$as_echo "yes" >&6; }
12001
12002fi
12003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12004
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012005for ac_prog in true
12006do
12007 # Extract the first word of "$ac_prog", so it can be a program name with args.
12008set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12010$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012011if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012013else
12014 if test -n "$TRUE"; then
12015 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12016else
12017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12018for as_dir in $PATH
12019do
12020 IFS=$as_save_IFS
12021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012024 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 $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 +000012026 break 2
12027 fi
12028done
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012030IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012031
12032fi
12033fi
12034TRUE=$ac_cv_prog_TRUE
12035if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12037$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12040$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012041fi
12042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012044 test -n "$TRUE" && break
12045done
12046test -n "$TRUE" || TRUE="/bin/true"
12047
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12050$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012051if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053else
12054 ac_check_lib_save_LIBS=$LIBS
12055LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012057/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059/* Override any GCC internal prototype to avoid an error.
12060 Use char because int might match the return type of a GCC
12061 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062#ifdef __cplusplus
12063extern "C"
12064#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066int
12067main ()
12068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012075 ac_cv_lib_c_inet_aton=yes
12076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012079rm -f core conftest.err conftest.$ac_objext \
12080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081LIBS=$ac_check_lib_save_LIBS
12082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12084$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012085if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012086 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12089$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012090if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012092else
12093 ac_check_lib_save_LIBS=$LIBS
12094LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012098/* Override any GCC internal prototype to avoid an error.
12099 Use char because int might match the return type of a GCC
12100 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012101#ifdef __cplusplus
12102extern "C"
12103#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012104char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105int
12106main ()
12107{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012114 ac_cv_lib_resolv_inet_aton=yes
12115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012118rm -f core conftest.err conftest.$ac_objext \
12119 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012120LIBS=$ac_check_lib_save_LIBS
12121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12123$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012124if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012125 cat >>confdefs.h <<_ACEOF
12126#define HAVE_LIBRESOLV 1
12127_ACEOF
12128
12129 LIBS="-lresolv $LIBS"
12130
12131fi
12132
12133
12134fi
12135
12136
Christian Heimesd0764e22007-12-04 15:00:33 +000012137# On Tru64, chflags seems to be present, but calling it will
12138# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12140$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012141if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012145 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012148/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012149
Christian Heimesd0764e22007-12-04 15:00:33 +000012150#include <sys/stat.h>
12151#include <unistd.h>
12152int main(int argc, char*argv[])
12153{
12154 if(chflags(argv[0], 0) != 0)
12155 return 1;
12156 return 0;
12157}
Ned Deily3eb67d52011-06-28 00:00:28 -070012158
Christian Heimesd0764e22007-12-04 15:00:33 +000012159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012160if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012161 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012167fi
12168
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12172$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012173if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012176 ac_cv_have_chflags="yes"
12177else
12178 ac_cv_have_chflags="no"
12179fi
12180
12181fi
12182if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012185
12186fi
12187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12189$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012190if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012194 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012197/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012198
Christian Heimesd0764e22007-12-04 15:00:33 +000012199#include <sys/stat.h>
12200#include <unistd.h>
12201int main(int argc, char*argv[])
12202{
12203 if(lchflags(argv[0], 0) != 0)
12204 return 1;
12205 return 0;
12206}
Ned Deily3eb67d52011-06-28 00:00:28 -070012207
Christian Heimesd0764e22007-12-04 15:00:33 +000012208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012209if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012210 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012216fi
12217
12218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12221$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012222if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012224if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012225 ac_cv_have_lchflags="yes"
12226else
12227 ac_cv_have_lchflags="no"
12228fi
12229
12230fi
12231if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012232
Matthias Kloseb9621712010-04-24 17:59:49 +000012233$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012234
12235fi
12236
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012237case $ac_sys_system/$ac_sys_release in
12238Darwin/*)
12239 _CUR_CFLAGS="${CFLAGS}"
12240 _CUR_LDFLAGS="${LDFLAGS}"
12241 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12242 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12243 ;;
12244esac
12245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12247$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012248if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012249 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012250else
12251 ac_check_lib_save_LIBS=$LIBS
12252LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012254/* end confdefs.h. */
12255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256/* Override any GCC internal prototype to avoid an error.
12257 Use char because int might match the return type of a GCC
12258 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012259#ifdef __cplusplus
12260extern "C"
12261#endif
12262char inflateCopy ();
12263int
12264main ()
12265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012272 ac_cv_lib_z_inflateCopy=yes
12273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276rm -f core conftest.err conftest.$ac_objext \
12277 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012278LIBS=$ac_check_lib_save_LIBS
12279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12281$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012283
Matthias Kloseb9621712010-04-24 17:59:49 +000012284$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012285
12286fi
12287
12288
12289case $ac_sys_system/$ac_sys_release in
12290Darwin/*)
12291 CFLAGS="${_CUR_CFLAGS}"
12292 LDFLAGS="${_CUR_LDFLAGS}"
12293 ;;
12294esac
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12297$as_echo_n "checking for hstrerror... " >&6; }
12298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012300
Martin v. Löwise9416172003-05-03 10:12:45 +000012301#include <netdb.h>
12302
Martin v. Löwise9416172003-05-03 10:12:45 +000012303int
12304main ()
12305{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012306void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012307 ;
12308 return 0;
12309}
12310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012314
Matthias Kloseb159a552010-04-25 21:00:44 +000012315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12319$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012320
12321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012322rm -f core conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12326$as_echo_n "checking for inet_aton... " >&6; }
12327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012328/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012329
Martin v. Löwis86d66262006-02-17 08:40:11 +000012330#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012331#include <sys/socket.h>
12332#include <netinet/in.h>
12333#include <arpa/inet.h>
12334
Martin v. Löwise9416172003-05-03 10:12:45 +000012335int
12336main ()
12337{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012338void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012346
Matthias Kloseb159a552010-04-25 21:00:44 +000012347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012349else
Matthias Kloseb9621712010-04-24 17:59:49 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012352
12353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012354rm -f core conftest.err conftest.$ac_objext \
12355 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12358$as_echo_n "checking for inet_pton... " >&6; }
12359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012360/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012361
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012362#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012363#include <sys/socket.h>
12364#include <netinet/in.h>
12365#include <arpa/inet.h>
12366
Martin v. Löwise9416172003-05-03 10:12:45 +000012367int
12368main ()
12369{
12370void* p = inet_pton
12371 ;
12372 return 0;
12373}
12374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012378
Matthias Kloseb159a552010-04-25 21:00:44 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012381else
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12383$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012384
12385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012387
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012388# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12390$as_echo_n "checking for setgroups... " >&6; }
12391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012392/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012393
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012394#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012395#ifdef HAVE_GRP_H
12396#include <grp.h>
12397#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012398
Martin v. Löwisd5843682002-11-21 20:41:28 +000012399int
12400main ()
12401{
12402void* p = setgroups
12403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012410
Matthias Kloseb159a552010-04-25 21:00:44 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12415$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012416
12417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012419
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012420# check for openpty and forkpty
12421
12422for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012423do :
12424 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012425if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012427#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012428_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012429
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12432$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012433if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012435else
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012437LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441/* Override any GCC internal prototype to avoid an error.
12442 Use char because int might match the return type of a GCC
12443 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012444#ifdef __cplusplus
12445extern "C"
12446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012447char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012448int
12449main ()
12450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461rm -f core conftest.err conftest.$ac_objext \
12462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012463LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12466$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012467if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012469 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012470else
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12472$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012473if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012475else
12476 ac_check_lib_save_LIBS=$LIBS
12477LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012479/* end confdefs.h. */
12480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481/* Override any GCC internal prototype to avoid an error.
12482 Use char because int might match the return type of a GCC
12483 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012484#ifdef __cplusplus
12485extern "C"
12486#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012487char openpty ();
12488int
12489main ()
12490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012492 ;
12493 return 0;
12494}
12495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012497 ac_cv_lib_bsd_openpty=yes
12498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012501rm -f core conftest.err conftest.$ac_objext \
12502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012503LIBS=$ac_check_lib_save_LIBS
12504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12506$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012507if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012509 LIBS="$LIBS -lbsd"
12510fi
12511
12512
12513fi
12514
Fred Drake8cef4cf2000-06-28 16:40:38 +000012515
12516fi
12517done
12518
12519for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012520do :
12521 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012522if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012524#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012525_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012526
Fred Drake8cef4cf2000-06-28 16:40:38 +000012527else
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12529$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012532else
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012534LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538/* Override any GCC internal prototype to avoid an error.
12539 Use char because int might match the return type of a GCC
12540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012541#ifdef __cplusplus
12542extern "C"
12543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012544char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012545int
12546main ()
12547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 ;
12550 return 0;
12551}
12552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012560LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12563$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012564if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012566 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012567else
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12569$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012570if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012572else
12573 ac_check_lib_save_LIBS=$LIBS
12574LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012576/* end confdefs.h. */
12577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578/* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012581#ifdef __cplusplus
12582extern "C"
12583#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012584char forkpty ();
12585int
12586main ()
12587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012594 ac_cv_lib_bsd_forkpty=yes
12595else
Matthias Kloseb9621712010-04-24 17:59:49 +000012596 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012598rm -f core conftest.err conftest.$ac_objext \
12599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012600LIBS=$ac_check_lib_save_LIBS
12601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12603$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012604if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012606 LIBS="$LIBS -lbsd"
12607fi
12608
12609
12610fi
12611
Fred Drake8cef4cf2000-06-28 16:40:38 +000012612
12613fi
12614done
12615
Jack Jansendd19cf82001-12-06 22:36:17 +000012616
Michael W. Hudson54241132001-12-07 15:38:26 +000012617# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012618for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012619do :
12620 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12621ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012622if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012625_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012626
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012627fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628done
12629
Michael W. Hudson54241132001-12-07 15:38:26 +000012630
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012631ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012632if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012633 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012634
Martin v. Löwis1142de32002-03-29 16:28:31 +000012635else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012637 *" dup2.$ac_objext "* ) ;;
12638 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012640esac
12641
Martin v. Löwis1142de32002-03-29 16:28:31 +000012642fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012643
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012644ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012645if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012646 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12647
12648else
12649 case " $LIBOBJS " in
12650 *" strdup.$ac_objext "* ) ;;
12651 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12652 ;;
12653esac
12654
12655fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012656
12657
12658for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012659do :
12660 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012661if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012663#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012666/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012668int
12669main ()
12670{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012671getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 ;
12673 return 0;
12674}
12675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012679
Guido van Rossum627b2d71993-12-24 10:39:16 +000012680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012682
Guido van Rossum627b2d71993-12-24 10:39:16 +000012683fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012684done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012685
Jack Jansen150753c2003-03-29 22:07:47 +000012686for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012687do :
12688 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012689if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012690 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012691#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012694/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012695#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012696int
12697main ()
12698{
12699setpgrp(0,0);
12700 ;
12701 return 0;
12702}
12703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012707
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012710
12711fi
12712done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012713
Michael W. Hudson54241132001-12-07 15:38:26 +000012714
Gregory P. Smith387512c2018-12-30 15:42:32 -080012715# We search for both crypt and crypt_r as one or the other may be defined
12716# This gets us our -lcrypt in LIBS when required on the target platform.
12717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12718$as_echo_n "checking for library containing crypt... " >&6; }
12719if ${ac_cv_search_crypt+:} false; then :
12720 $as_echo_n "(cached) " >&6
12721else
12722 ac_func_search_save_LIBS=$LIBS
12723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12724/* end confdefs.h. */
12725
12726/* 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. */
12729#ifdef __cplusplus
12730extern "C"
12731#endif
12732char crypt ();
12733int
12734main ()
12735{
12736return crypt ();
12737 ;
12738 return 0;
12739}
12740_ACEOF
12741for ac_lib in '' crypt; do
12742 if test -z "$ac_lib"; then
12743 ac_res="none required"
12744 else
12745 ac_res=-l$ac_lib
12746 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12747 fi
12748 if ac_fn_c_try_link "$LINENO"; then :
12749 ac_cv_search_crypt=$ac_res
12750fi
12751rm -f core conftest.err conftest.$ac_objext \
12752 conftest$ac_exeext
12753 if ${ac_cv_search_crypt+:} false; then :
12754 break
12755fi
12756done
12757if ${ac_cv_search_crypt+:} false; then :
12758
12759else
12760 ac_cv_search_crypt=no
12761fi
12762rm conftest.$ac_ext
12763LIBS=$ac_func_search_save_LIBS
12764fi
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12766$as_echo "$ac_cv_search_crypt" >&6; }
12767ac_res=$ac_cv_search_crypt
12768if test "$ac_res" != no; then :
12769 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12770
12771fi
12772
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12774$as_echo_n "checking for library containing crypt_r... " >&6; }
12775if ${ac_cv_search_crypt_r+:} false; then :
12776 $as_echo_n "(cached) " >&6
12777else
12778 ac_func_search_save_LIBS=$LIBS
12779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12780/* end confdefs.h. */
12781
12782/* Override any GCC internal prototype to avoid an error.
12783 Use char because int might match the return type of a GCC
12784 builtin and then its argument prototype would still apply. */
12785#ifdef __cplusplus
12786extern "C"
12787#endif
12788char crypt_r ();
12789int
12790main ()
12791{
12792return crypt_r ();
12793 ;
12794 return 0;
12795}
12796_ACEOF
12797for ac_lib in '' crypt; do
12798 if test -z "$ac_lib"; then
12799 ac_res="none required"
12800 else
12801 ac_res=-l$ac_lib
12802 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12803 fi
12804 if ac_fn_c_try_link "$LINENO"; then :
12805 ac_cv_search_crypt_r=$ac_res
12806fi
12807rm -f core conftest.err conftest.$ac_objext \
12808 conftest$ac_exeext
12809 if ${ac_cv_search_crypt_r+:} false; then :
12810 break
12811fi
12812done
12813if ${ac_cv_search_crypt_r+:} false; then :
12814
12815else
12816 ac_cv_search_crypt_r=no
12817fi
12818rm conftest.$ac_ext
12819LIBS=$ac_func_search_save_LIBS
12820fi
12821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12822$as_echo "$ac_cv_search_crypt_r" >&6; }
12823ac_res=$ac_cv_search_crypt_r
12824if test "$ac_res" != no; then :
12825 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12826
12827fi
12828
12829
12830ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12831if test "x$ac_cv_func_crypt_r" = xyes; then :
12832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12833/* end confdefs.h. */
12834
12835#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12836#include <crypt.h>
12837
12838int
12839main ()
12840{
12841
12842struct crypt_data d;
12843char *r = crypt_r("", "", &d);
12844
12845 ;
12846 return 0;
12847}
12848_ACEOF
12849if ac_fn_c_try_compile "$LINENO"; then :
12850
12851$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12852
12853fi
12854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12855
12856fi
12857
12858
Victor Stinnere0be4232011-10-25 13:06:09 +020012859for ac_func in clock_gettime
12860do :
12861 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12862if test "x$ac_cv_func_clock_gettime" = xyes; then :
12863 cat >>confdefs.h <<_ACEOF
12864#define HAVE_CLOCK_GETTIME 1
12865_ACEOF
12866
12867else
12868
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12870$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12871if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12872 $as_echo_n "(cached) " >&6
12873else
12874 ac_check_lib_save_LIBS=$LIBS
12875LIBS="-lrt $LIBS"
12876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877/* end confdefs.h. */
12878
12879/* Override any GCC internal prototype to avoid an error.
12880 Use char because int might match the return type of a GCC
12881 builtin and then its argument prototype would still apply. */
12882#ifdef __cplusplus
12883extern "C"
12884#endif
12885char clock_gettime ();
12886int
12887main ()
12888{
12889return clock_gettime ();
12890 ;
12891 return 0;
12892}
12893_ACEOF
12894if ac_fn_c_try_link "$LINENO"; then :
12895 ac_cv_lib_rt_clock_gettime=yes
12896else
12897 ac_cv_lib_rt_clock_gettime=no
12898fi
12899rm -f core conftest.err conftest.$ac_objext \
12900 conftest$ac_exeext conftest.$ac_ext
12901LIBS=$ac_check_lib_save_LIBS
12902fi
12903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12904$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12905if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12906
Victor Stinner7efb8332014-08-29 15:41:08 +020012907 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012908 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12909
12910
12911$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12912
12913
12914fi
12915
12916
12917fi
12918done
12919
12920
12921for ac_func in clock_getres
12922do :
12923 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12924if test "x$ac_cv_func_clock_getres" = xyes; then :
12925 cat >>confdefs.h <<_ACEOF
12926#define HAVE_CLOCK_GETRES 1
12927_ACEOF
12928
12929else
12930
12931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12932$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12933if ${ac_cv_lib_rt_clock_getres+:} false; then :
12934 $as_echo_n "(cached) " >&6
12935else
12936 ac_check_lib_save_LIBS=$LIBS
12937LIBS="-lrt $LIBS"
12938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939/* end confdefs.h. */
12940
12941/* Override any GCC internal prototype to avoid an error.
12942 Use char because int might match the return type of a GCC
12943 builtin and then its argument prototype would still apply. */
12944#ifdef __cplusplus
12945extern "C"
12946#endif
12947char clock_getres ();
12948int
12949main ()
12950{
12951return clock_getres ();
12952 ;
12953 return 0;
12954}
12955_ACEOF
12956if ac_fn_c_try_link "$LINENO"; then :
12957 ac_cv_lib_rt_clock_getres=yes
12958else
12959 ac_cv_lib_rt_clock_getres=no
12960fi
12961rm -f core conftest.err conftest.$ac_objext \
12962 conftest$ac_exeext conftest.$ac_ext
12963LIBS=$ac_check_lib_save_LIBS
12964fi
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12966$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12967if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12968
12969 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12970
12971
12972fi
12973
12974
12975fi
12976done
12977
12978
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012979for ac_func in clock_settime
12980do :
12981 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12982if test "x$ac_cv_func_clock_settime" = xyes; then :
12983 cat >>confdefs.h <<_ACEOF
12984#define HAVE_CLOCK_SETTIME 1
12985_ACEOF
12986
12987else
12988
12989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12990$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12991if ${ac_cv_lib_rt_clock_settime+:} false; then :
12992 $as_echo_n "(cached) " >&6
12993else
12994 ac_check_lib_save_LIBS=$LIBS
12995LIBS="-lrt $LIBS"
12996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12997/* end confdefs.h. */
12998
12999/* Override any GCC internal prototype to avoid an error.
13000 Use char because int might match the return type of a GCC
13001 builtin and then its argument prototype would still apply. */
13002#ifdef __cplusplus
13003extern "C"
13004#endif
13005char clock_settime ();
13006int
13007main ()
13008{
13009return clock_settime ();
13010 ;
13011 return 0;
13012}
13013_ACEOF
13014if ac_fn_c_try_link "$LINENO"; then :
13015 ac_cv_lib_rt_clock_settime=yes
13016else
13017 ac_cv_lib_rt_clock_settime=no
13018fi
13019rm -f core conftest.err conftest.$ac_objext \
13020 conftest$ac_exeext conftest.$ac_ext
13021LIBS=$ac_check_lib_save_LIBS
13022fi
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13024$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13025if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13026
13027 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13028
13029
13030fi
13031
13032
13033fi
13034done
13035
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13038$as_echo_n "checking for major... " >&6; }
13039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013041
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013042#if defined(MAJOR_IN_MKDEV)
13043#include <sys/mkdev.h>
13044#elif defined(MAJOR_IN_SYSMACROS)
13045#include <sys/sysmacros.h>
13046#else
13047#include <sys/types.h>
13048#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013049
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013050int
13051main ()
13052{
13053
13054 makedev(major(0),minor(0));
13055
13056 ;
13057 return 0;
13058}
13059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013061
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13066$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013067
13068else
Skip Montanaro6dead952003-09-25 14:50:04 +000013069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013072
13073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013074rm -f core conftest.err conftest.$ac_objext \
13075 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013076
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013077# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013078# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13080$as_echo_n "checking for getaddrinfo... " >&6; }
13081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013083
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013084#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013085#include <sys/socket.h>
13086#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013087#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013088
Martin v. Löwis11437992002-04-12 09:54:03 +000013089int
13090main ()
13091{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013092getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 ;
13094 return 0;
13095}
13096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013097if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013098 have_getaddrinfo=yes
13099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013102rm -f core conftest.err conftest.$ac_objext \
13103 conftest$ac_exeext conftest.$ac_ext
13104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13105$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013106if test $have_getaddrinfo = yes
13107then
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13109$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013110 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013114
13115if test "${enable_ipv6+set}" = set; then
13116 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13117else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013119fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123
Stefan Krah19c21392012-11-22 23:47:32 +010013124#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013125#include <sys/types.h>
13126#include <netdb.h>
13127#include <string.h>
13128#include <sys/socket.h>
13129#include <netinet/in.h>
13130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013132{
13133 int passive, gaierr, inet4 = 0, inet6 = 0;
13134 struct addrinfo hints, *ai, *aitop;
13135 char straddr[INET6_ADDRSTRLEN], strport[16];
13136
13137 for (passive = 0; passive <= 1; passive++) {
13138 memset(&hints, 0, sizeof(hints));
13139 hints.ai_family = AF_UNSPEC;
13140 hints.ai_flags = passive ? AI_PASSIVE : 0;
13141 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013142 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013143 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13144 (void)gai_strerror(gaierr);
13145 goto bad;
13146 }
13147 for (ai = aitop; ai; ai = ai->ai_next) {
13148 if (ai->ai_addr == NULL ||
13149 ai->ai_addrlen == 0 ||
13150 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13151 straddr, sizeof(straddr), strport, sizeof(strport),
13152 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13153 goto bad;
13154 }
13155 switch (ai->ai_family) {
13156 case AF_INET:
13157 if (strcmp(strport, "54321") != 0) {
13158 goto bad;
13159 }
13160 if (passive) {
13161 if (strcmp(straddr, "0.0.0.0") != 0) {
13162 goto bad;
13163 }
13164 } else {
13165 if (strcmp(straddr, "127.0.0.1") != 0) {
13166 goto bad;
13167 }
13168 }
13169 inet4++;
13170 break;
13171 case AF_INET6:
13172 if (strcmp(strport, "54321") != 0) {
13173 goto bad;
13174 }
13175 if (passive) {
13176 if (strcmp(straddr, "::") != 0) {
13177 goto bad;
13178 }
13179 } else {
13180 if (strcmp(straddr, "::1") != 0) {
13181 goto bad;
13182 }
13183 }
13184 inet6++;
13185 break;
13186 case AF_UNSPEC:
13187 goto bad;
13188 break;
13189 default:
13190 /* another family support? */
13191 break;
13192 }
13193 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013194 freeaddrinfo(aitop);
13195 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013196 }
13197
13198 if (!(inet4 == 0 || inet4 == 2))
13199 goto bad;
13200 if (!(inet6 == 0 || inet6 == 2))
13201 goto bad;
13202
13203 if (aitop)
13204 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013205 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013206
13207 bad:
13208 if (aitop)
13209 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211}
13212
Martin v. Löwis11437992002-04-12 09:54:03 +000013213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013224
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13228$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13229
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013230if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013231then
13232 if test $ipv6 = yes
13233 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234 echo 'Fatal: You must get working getaddrinfo() function.'
13235 echo ' or you can specify "--disable-ipv6"'.
13236 exit 1
13237 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013238else
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013241
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013243
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013244for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013245do :
13246 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013247if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013250_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013252fi
13253done
13254
Michael W. Hudson54241132001-12-07 15:38:26 +000013255
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013256# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13258$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264#include <sys/types.h>
13265#include <sys/time.h>
13266#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268int
13269main ()
13270{
13271if ((struct tm *) 0)
13272return 0;
13273 ;
13274 return 0;
13275}
13276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013277if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013278 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013279else
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13285$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013286if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289
13290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13293$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013294if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299#include <sys/types.h>
13300#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Martin v. Löwis11437992002-04-12 09:54:03 +000013302int
13303main ()
13304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305struct tm tm;
13306 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 ;
13309 return 0;
13310}
13311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313 ac_cv_struct_tm=time.h
13314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13320$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013321if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324
13325fi
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327ac_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 +000013328#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330"
Victor Stinnere0be4232011-10-25 13:06:09 +020013331if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
13333cat >>confdefs.h <<_ACEOF
13334#define HAVE_STRUCT_TM_TM_ZONE 1
13335_ACEOF
13336
13337
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13346"
Victor Stinnere0be4232011-10-25 13:06:09 +020013347if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349else
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351fi
13352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355_ACEOF
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13358$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013359if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365#if !HAVE_DECL_TZNAME
13366extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369int
13370main ()
13371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 ;
13374 return 0;
13375}
13376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013377if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378 ac_cv_var_tzname=yes
13379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013382rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13386$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013387 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391 fi
13392fi
13393
Matthias Kloseb9621712010-04-24 17:59:49 +000013394ac_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 +020013395if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013396
13397cat >>confdefs.h <<_ACEOF
13398#define HAVE_STRUCT_STAT_ST_RDEV 1
13399_ACEOF
13400
13401
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013402fi
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404ac_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 +020013405if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407cat >>confdefs.h <<_ACEOF
13408#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13409_ACEOF
13410
13411
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013412fi
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414ac_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 +020013415if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013416
13417cat >>confdefs.h <<_ACEOF
13418#define HAVE_STRUCT_STAT_ST_FLAGS 1
13419_ACEOF
13420
13421
13422fi
13423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424ac_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 +020013425if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013426
13427cat >>confdefs.h <<_ACEOF
13428#define HAVE_STRUCT_STAT_ST_GEN 1
13429_ACEOF
13430
13431
13432fi
13433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434ac_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 +020013435if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013436
13437cat >>confdefs.h <<_ACEOF
13438#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13439_ACEOF
13440
13441
13442fi
13443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444ac_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 +020013445if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447cat >>confdefs.h <<_ACEOF
13448#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13449_ACEOF
13450
13451
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013452fi
13453
Stefan Krah267b6392016-04-26 01:09:18 +020013454ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13455 #include <sys/types.h>
13456 #include <pwd.h>
13457
13458"
13459if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13460
13461cat >>confdefs.h <<_ACEOF
13462#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13463_ACEOF
13464
13465
13466fi
13467ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13468 #include <sys/types.h>
13469 #include <pwd.h>
13470
13471"
13472if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13473
13474cat >>confdefs.h <<_ACEOF
13475#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13476_ACEOF
13477
13478
13479fi
13480
Zachary Ware6a6967e2016-10-01 00:47:27 -050013481# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13482ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13483"
13484if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13485
13486cat >>confdefs.h <<_ACEOF
13487#define HAVE_SIGINFO_T_SI_BAND 1
13488_ACEOF
13489
13490
13491fi
13492
Michael W. Hudson54241132001-12-07 15:38:26 +000013493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13495$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013496if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013498else
Matthias Kloseb159a552010-04-25 21:00:44 +000013499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013502#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013503int
13504main ()
13505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512 ac_cv_header_time_altzone=yes
13513else
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518fi
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13521$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013522if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525
13526fi
13527
Guido van Rossumda88dad1995-01-26 00:46:29 +000013528was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13530$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013532/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013533
13534#include <sys/types.h>
13535#include <sys/select.h>
13536#include <sys/time.h>
13537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538int
13539main ()
13540{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541;
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 ;
13543 return 0;
13544}
13545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013551 was_it_defined=yes
13552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13556$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13559$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013560if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013564/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013565#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013566int
13567main ()
13568{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013569struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ;
13571 return 0;
13572}
13573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013575 ac_cv_struct_addrinfo=yes
13576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13580fi
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13583$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013587
13588fi
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13591$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013592if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013597
13598# include <sys/types.h>
13599# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013600int
13601main ()
13602{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013604 ;
13605 return 0;
13606}
13607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609 ac_cv_struct_sockaddr_storage=yes
13610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13614fi
13615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13617$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621
13622fi
13623
Christian Heimesdffa3942016-09-05 23:54:41 +020013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13625$as_echo_n "checking for sockaddr_alg... " >&6; }
13626if ${ac_cv_struct_sockaddr_alg+:} false; then :
13627 $as_echo_n "(cached) " >&6
13628else
13629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13630/* end confdefs.h. */
13631
13632# include <sys/types.h>
13633# include <sys/socket.h>
13634# include <linux/if_alg.h>
13635int
13636main ()
13637{
13638struct sockaddr_alg s
13639 ;
13640 return 0;
13641}
13642_ACEOF
13643if ac_fn_c_try_compile "$LINENO"; then :
13644 ac_cv_struct_sockaddr_alg=yes
13645else
13646 ac_cv_struct_sockaddr_alg=no
13647fi
13648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13649fi
13650
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13652$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13653if test $ac_cv_struct_sockaddr_alg = yes; then
13654
13655$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13656
13657fi
13658
Guido van Rossum627b2d71993-12-24 10:39:16 +000013659# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13662$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013663if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013668$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013669int
13670main ()
13671{
13672static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013673test_array [0] = 0;
13674return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
13676 ;
13677 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013678}
Martin v. Löwis11437992002-04-12 09:54:03 +000013679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013680if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013681 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013682else
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13688$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013689if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013691
13692fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013693
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13695$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013696if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013700/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701
Martin v. Löwis11437992002-04-12 09:54:03 +000013702int
13703main ()
13704{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013705
Martin v. Löwis11437992002-04-12 09:54:03 +000013706#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013707 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013709 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711 char const *const *pcpcc;
13712 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 /* NEC SVR4.0.2 mips cc rejects this. */
13714 struct point {int x, y;};
13715 static struct point const zero = {0,0};
13716 /* AIX XL C 1.02.0.0 rejects this.
13717 It does not let you subtract one const X* pointer from another in
13718 an arm of an if-expression whose if-part is not a constant
13719 expression */
13720 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013722 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723 ++pcpcc;
13724 ppc = (char**) pcpcc;
13725 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013726 { /* SCO 3.2v4 cc rejects this sort of thing. */
13727 char tx;
13728 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013730
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013732 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 }
13734 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13735 int x[] = {25, 17};
13736 const int *foo = &x[0];
13737 ++foo;
13738 }
13739 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13740 typedef const int *iptr;
13741 iptr p = 0;
13742 ++p;
13743 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013744 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013746 struct s { int j; const int *ap[3]; } bx;
13747 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 }
13749 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13750 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013754#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013755
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 ;
13757 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013758}
Martin v. Löwis11437992002-04-12 09:54:03 +000013759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761 ac_cv_c_const=yes
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13768$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772
13773fi
13774
Michael W. Hudson54241132001-12-07 15:38:26 +000013775
Guido van Rossumda88dad1995-01-26 00:46:29 +000013776works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13778$as_echo_n "checking for working signed char... " >&6; }
13779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013780/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013781
Martin v. Löwis11437992002-04-12 09:54:03 +000013782int
13783main ()
13784{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ;
13787 return 0;
13788}
13789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013790if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013791 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013792else
Skip Montanaro6dead952003-09-25 14:50:04 +000013793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013795
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013796
Guido van Rossum7f43da71994-08-01 12:15:30 +000013797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13800$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013801
Guido van Rossumda88dad1995-01-26 00:46:29 +000013802have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13804$as_echo_n "checking for prototypes... " >&6; }
13805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013806/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013807int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013808int
13809main ()
13810{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ;
13813 return 0;
13814}
13815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013816if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Matthias Kloseb159a552010-04-25 21:00:44 +000013820 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13824$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825
Guido van Rossumda88dad1995-01-26 00:46:29 +000013826works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13828$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013830/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013831
13832#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013833int foo(int x, ...) {
13834 va_list va;
13835 va_start(va, x);
13836 va_arg(va, int);
13837 va_arg(va, char *);
13838 va_arg(va, double);
13839 return 0;
13840}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013841
Martin v. Löwis11437992002-04-12 09:54:03 +000013842int
13843main ()
13844{
Guido van Rossum90eea071996-08-30 20:58:57 +000013845return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ;
13847 return 0;
13848}
13849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013851
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013855 works=yes
13856
Guido van Rossum627b2d71993-12-24 10:39:16 +000013857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13860$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861
Martin v. Löwisd6320502004-08-12 13:45:08 +000013862# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13864$as_echo_n "checking for socketpair... " >&6; }
13865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013866/* end confdefs.h. */
13867
13868#include <sys/types.h>
13869#include <sys/socket.h>
13870
13871int
13872main ()
13873{
13874void *x=socketpair
13875 ;
13876 return 0;
13877}
13878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013880
Matthias Kloseb9621712010-04-24 17:59:49 +000013881$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013882
Matthias Kloseb159a552010-04-25 21:00:44 +000013883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013884$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013885else
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13887$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013888
13889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013891
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013892# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13894$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013896/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013897#include <sys/types.h>
13898#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013899int
13900main ()
13901{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013902struct sockaddr x;
13903x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013908if ac_fn_c_try_compile "$LINENO"; then :
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13910$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913
13914else
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13916$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013917
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013920
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013921# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
13923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013925if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13930$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931 OLD_CFLAGS=$CFLAGS
13932 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013934/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013935
13936# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Martin v. Löwis11437992002-04-12 09:54:03 +000013938int
13939main ()
13940{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013941
13942 char *name;
13943 struct hostent *he, *res;
13944 char buffer[2048];
13945 int buflen = 2048;
13946 int h_errnop;
13947
13948 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
13950 ;
13951 return 0;
13952}
13953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013954if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013957
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13962$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964else
Skip Montanaro6dead952003-09-25 14:50:04 +000013965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13967$as_echo "no" >&6; }
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13969$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013972
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013973# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013978
13979 char *name;
13980 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013981 char buffer[2048];
13982 int buflen = 2048;
13983 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984
Matthias Kloseb159a552010-04-25 21:00:44 +000013985 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
13987 ;
13988 return 0;
13989}
13990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013994
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Matthias Kloseb159a552010-04-25 21:00:44 +000013996$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13999$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014001else
Skip Montanaro6dead952003-09-25 14:50:04 +000014002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14006$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008/* end confdefs.h. */
14009
14010# include <netdb.h>
14011
14012int
14013main ()
14014{
14015
14016 char *name;
14017 struct hostent *he;
14018 struct hostent_data data;
14019
14020 (void) gethostbyname_r(name, he, &data);
14021
14022 ;
14023 return 0;
14024}
14025_ACEOF
14026if ac_fn_c_try_compile "$LINENO"; then :
14027
14028 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14029
14030
14031$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14032
14033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14034$as_echo "yes" >&6; }
14035
14036else
14037
14038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14039$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049 CFLAGS=$OLD_CFLAGS
14050
14051else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 for ac_func in gethostbyname
14054do :
14055 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014056if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014058#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014059_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014062done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Michael W. Hudson54241132001-12-07 15:38:26 +000014064
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014065fi
14066
Michael W. Hudson54241132001-12-07 15:38:26 +000014067
14068
14069
14070
14071
14072
Guido van Rossum627b2d71993-12-24 10:39:16 +000014073# checks for system services
14074# (none yet)
14075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014076# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014077ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014078if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014079
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014080else
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14082$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085else
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014087LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091/* Override any GCC internal prototype to avoid an error.
14092 Use char because int might match the return type of a GCC
14093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014094#ifdef __cplusplus
14095extern "C"
14096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014097char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014098int
14099main ()
14100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ;
14103 return 0;
14104}
14105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014106if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014108else
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014111rm -f core conftest.err conftest.$ac_objext \
14112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014113LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14116$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014117if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 cat >>confdefs.h <<_ACEOF
14119#define HAVE_LIBIEEE 1
14120_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014122 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123
Guido van Rossum627b2d71993-12-24 10:39:16 +000014124fi
14125
Michael W. Hudson54241132001-12-07 15:38:26 +000014126
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014127fi
14128
Michael W. Hudson54241132001-12-07 15:38:26 +000014129
Guido van Rossum7f43da71994-08-01 12:15:30 +000014130# check for --with-libm=...
14131
Guido van Rossum563e7081996-09-10 18:20:48 +000014132case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014133Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014134*) LIBM=-lm
14135esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14137$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014140if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014142if test "$withval" = no
14143then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14145$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014146elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014147then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14149$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014150else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014151fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014152else
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14154$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155fi
14156
Guido van Rossum7f43da71994-08-01 12:15:30 +000014157
14158# check for --with-libc=...
14159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14161$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014164if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014166if test "$withval" = no
14167then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14169$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014170elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014171then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14173$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014174else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014175fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014176else
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14178$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179fi
14180
Guido van Rossum7f43da71994-08-01 12:15:30 +000014181
Stefan Krah1919b7e2012-03-21 18:25:23 +010014182# **************************************
14183# * Check for gcc x64 inline assembler *
14184# **************************************
14185
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14187$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14189/* end confdefs.h. */
14190
14191int
14192main ()
14193{
14194
14195 __asm__ __volatile__ ("movq %rcx, %rax");
14196
14197 ;
14198 return 0;
14199}
14200_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014201if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014202 have_gcc_asm_for_x64=yes
14203else
14204 have_gcc_asm_for_x64=no
14205fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014206rm -f core conftest.err conftest.$ac_objext \
14207 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14209$as_echo "$have_gcc_asm_for_x64" >&6; }
14210if test "$have_gcc_asm_for_x64" = yes
14211then
14212
14213$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14214
14215fi
14216
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014217# **************************************************
14218# * Check for various properties of floating point *
14219# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014220
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14222$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14223if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014225else
14226
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014227
14228ax_cv_c_float_words_bigendian=unknown
14229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014230/* end confdefs.h. */
14231
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014232
14233double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14234
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014235
14236_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014237if ac_fn_c_try_compile "$LINENO"; then :
14238
14239
14240if grep noonsees conftest.$ac_objext >/dev/null ; then
14241 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014242fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014243if grep seesnoon conftest.$ac_objext >/dev/null ; then
14244 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14245 ax_cv_c_float_words_bigendian=no
14246 else
14247 ax_cv_c_float_words_bigendian=unknown
14248 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014249fi
14250
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014251
14252fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014254fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14256$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014257
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014258case $ax_cv_c_float_words_bigendian in
14259 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014260
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014261$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14262 ;;
14263 no)
14264 ;;
14265 *)
14266 as_fn_error $? "
14267
14268Unknown float word ordering. You need to manually preset
14269ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14270
14271 " "$LINENO" 5 ;;
14272esac
14273
14274
14275if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014276then
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014280elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014281then
14282
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014283$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14284
14285else
14286 # Some ARM platforms use a mixed-endian representation for doubles.
14287 # While Python doesn't currently have full support for these platforms
14288 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14289 # conversions work.
14290 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14291 # or little, then it must be this?
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014294
14295fi
14296
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014297# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014298# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014299# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014300# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014301# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014302# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014303
14304# This inline assembler syntax may also work for suncc and icc,
14305# so we try it on all platforms.
14306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14308$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014310/* end confdefs.h. */
14311
14312int
14313main ()
14314{
14315
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014316 unsigned short cw;
14317 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14318 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014319
14320 ;
14321 return 0;
14322}
14323_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014324if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325 have_gcc_asm_for_x87=yes
14326else
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014329rm -f core conftest.err conftest.$ac_objext \
14330 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14332$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014333if test "$have_gcc_asm_for_x87" = yes
14334then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014335
Matthias Kloseb9621712010-04-24 17:59:49 +000014336$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014337
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14341$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14343/* end confdefs.h. */
14344
14345int
14346main ()
14347{
14348
14349 unsigned int fpcr;
14350 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14351 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14352
14353 ;
14354 return 0;
14355}
14356_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014357if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014358 have_gcc_asm_for_mc68881=yes
14359else
14360 have_gcc_asm_for_mc68881=no
14361fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014362rm -f core conftest.err conftest.$ac_objext \
14363 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14365$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14366if test "$have_gcc_asm_for_mc68881" = yes
14367then
14368
14369$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14370
14371fi
14372
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014373# Detect whether system arithmetic is subject to x87-style double
14374# rounding issues. The result of this test has little meaning on non
14375# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14376# mode is round-to-nearest and double rounding issues are present, and
14377# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14379$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014380# $BASECFLAGS may affect the result
14381ac_save_cc="$CC"
14382CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014383if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014384 ac_cv_x87_double_rounding=no
14385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014387/* end confdefs.h. */
14388
14389#include <stdlib.h>
14390#include <math.h>
14391int main() {
14392 volatile double x, y, z;
14393 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14394 x = 0.99999999999999989; /* 1-2**-53 */
14395 y = 1./x;
14396 if (y != 1.)
14397 exit(0);
14398 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14399 x = 1e16;
14400 y = 2.99999;
14401 z = x + y;
14402 if (z != 1e16+4.)
14403 exit(0);
14404 /* both tests show evidence of double rounding */
14405 exit(1);
14406}
14407
14408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014409if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014410 ac_cv_x87_double_rounding=no
14411else
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14415 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014416fi
14417
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014418CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14420$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014421if test "$ac_cv_x87_double_rounding" = yes
14422then
14423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014425
14426fi
14427
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014428# ************************************
14429# * Check for mathematical functions *
14430# ************************************
14431
14432LIBS_SAVE=$LIBS
14433LIBS="$LIBS $LIBM"
14434
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014435for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14436do :
14437 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14438ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014439if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014440 cat >>confdefs.h <<_ACEOF
14441#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14442_ACEOF
14443
14444fi
14445done
14446
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014447for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014448do :
14449 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14450ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014451if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014452 cat >>confdefs.h <<_ACEOF
14453#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14454_ACEOF
14455
14456fi
14457done
14458
14459ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14460"
Victor Stinnere0be4232011-10-25 13:06:09 +020014461if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014462 ac_have_decl=1
14463else
14464 ac_have_decl=0
14465fi
14466
14467cat >>confdefs.h <<_ACEOF
14468#define HAVE_DECL_ISINF $ac_have_decl
14469_ACEOF
14470ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14471"
Victor Stinnere0be4232011-10-25 13:06:09 +020014472if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014473 ac_have_decl=1
14474else
14475 ac_have_decl=0
14476fi
14477
14478cat >>confdefs.h <<_ACEOF
14479#define HAVE_DECL_ISNAN $ac_have_decl
14480_ACEOF
14481ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14482"
Victor Stinnere0be4232011-10-25 13:06:09 +020014483if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014484 ac_have_decl=1
14485else
14486 ac_have_decl=0
14487fi
14488
14489cat >>confdefs.h <<_ACEOF
14490#define HAVE_DECL_ISFINITE $ac_have_decl
14491_ACEOF
14492
14493
Mark Dickinsona614f042009-11-28 12:48:43 +000014494# For multiprocessing module, check that sem_open
14495# actually works. For FreeBSD versions <= 7.2,
14496# the kernel module that provides POSIX semaphores
14497# isn't loaded by default, so an attempt to call
14498# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14500$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014501if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014503else
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014505 ac_cv_posix_semaphores_enabled=yes
14506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014508/* end confdefs.h. */
14509
14510#include <unistd.h>
14511#include <fcntl.h>
14512#include <stdio.h>
14513#include <semaphore.h>
14514#include <sys/stat.h>
14515
14516int main(void) {
14517 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14518 if (a == SEM_FAILED) {
14519 perror("sem_open");
14520 return 1;
14521 }
14522 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014523 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014524 return 0;
14525}
14526
14527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014528if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014529 ac_cv_posix_semaphores_enabled=yes
14530else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014535fi
14536
14537
Mark Dickinsona614f042009-11-28 12:48:43 +000014538fi
14539
Matthias Kloseb9621712010-04-24 17:59:49 +000014540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14541$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014542if test $ac_cv_posix_semaphores_enabled = no
14543then
14544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014546
14547fi
14548
Mark Dickinson10683072009-04-18 21:18:19 +000014549# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14551$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014552if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014554else
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014556 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014559/* end confdefs.h. */
14560
14561#include <unistd.h>
14562#include <fcntl.h>
14563#include <stdio.h>
14564#include <semaphore.h>
14565#include <sys/stat.h>
14566
14567int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014568 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014569 int count;
14570 int res;
14571 if(a==SEM_FAILED){
14572 perror("sem_open");
14573 return 1;
14574
14575 }
14576 res = sem_getvalue(a, &count);
14577 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014578 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014579 return res==-1 ? 1 : 0;
14580}
14581
Mark Dickinson10683072009-04-18 21:18:19 +000014582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014583if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014584 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014585else
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014590fi
14591
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014593fi
14594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14596$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014597if test $ac_cv_broken_sem_getvalue = yes
14598then
14599
Matthias Kloseb9621712010-04-24 17:59:49 +000014600$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014601
14602fi
14603
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014604ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14605"
14606if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14607 ac_have_decl=1
14608else
14609 ac_have_decl=0
14610fi
14611
14612cat >>confdefs.h <<_ACEOF
14613#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14614_ACEOF
14615ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14616"
14617if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14618 ac_have_decl=1
14619else
14620 ac_have_decl=0
14621fi
14622
14623cat >>confdefs.h <<_ACEOF
14624#define HAVE_DECL_RTLD_NOW $ac_have_decl
14625_ACEOF
14626ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14627"
14628if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14629 ac_have_decl=1
14630else
14631 ac_have_decl=0
14632fi
14633
14634cat >>confdefs.h <<_ACEOF
14635#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14636_ACEOF
14637ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14638"
14639if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14640 ac_have_decl=1
14641else
14642 ac_have_decl=0
14643fi
14644
14645cat >>confdefs.h <<_ACEOF
14646#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14647_ACEOF
14648ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14649"
14650if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14651 ac_have_decl=1
14652else
14653 ac_have_decl=0
14654fi
14655
14656cat >>confdefs.h <<_ACEOF
14657#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14658_ACEOF
14659ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14660"
14661if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14662 ac_have_decl=1
14663else
14664 ac_have_decl=0
14665fi
14666
14667cat >>confdefs.h <<_ACEOF
14668#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14669_ACEOF
14670ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14671"
14672if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14673 ac_have_decl=1
14674else
14675 ac_have_decl=0
14676fi
14677
14678cat >>confdefs.h <<_ACEOF
14679#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14680_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014681ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14682"
14683if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14684 ac_have_decl=1
14685else
14686 ac_have_decl=0
14687fi
14688
14689cat >>confdefs.h <<_ACEOF
14690#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14691_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014692
14693
Mark Dickinsonbd792642009-03-18 20:06:12 +000014694# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14696$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014697# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014698if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014699 enableval=$enable_big_digits; case $enable_big_digits in
14700yes)
14701 enable_big_digits=30 ;;
14702no)
14703 enable_big_digits=15 ;;
1470415|30)
14705 ;;
14706*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014707 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 +000014708esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14710$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014711
14712cat >>confdefs.h <<_ACEOF
14713#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14714_ACEOF
14715
14716
14717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14719$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014720fi
14721
14722
Guido van Rossumef2255b2000-03-10 22:30:29 +000014723# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014724ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014725if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014726
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014730 wchar_h="yes"
14731
Guido van Rossumef2255b2000-03-10 22:30:29 +000014732else
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014734
14735fi
14736
Michael W. Hudson54241132001-12-07 15:38:26 +000014737
Martin v. Löwis11437992002-04-12 09:54:03 +000014738
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014739# determine wchar_t size
14740if test "$wchar_h" = yes
14741then
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14745# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14747$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014748if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14752"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754else
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 if test "$ac_cv_type_wchar_t" = yes; then
14756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014758as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014759See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760 else
14761 ac_cv_sizeof_wchar_t=0
14762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014764
Martin v. Löwis11437992002-04-12 09:54:03 +000014765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14767$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014768
14769
14770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014772#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014773_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014774
Michael W. Hudson54241132001-12-07 15:38:26 +000014775
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014776fi
14777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14779$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014780have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014782/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014783
14784#include <tcl.h>
14785#if TCL_UTF_MAX != 6
14786# error "NOT UCS4_TCL"
14787#endif
14788int
14789main ()
14790{
14791
14792 ;
14793 return 0;
14794}
14795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014797
14798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014800
14801 have_ucs4_tcl=yes
14802
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14806$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014807
Skip Montanaro6dead952003-09-25 14:50:04 +000014808# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014809if test "$wchar_h" = yes
14810then
14811 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14813$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014814 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014816else
14817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014819 ac_cv_wchar_t_signed=yes
14820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014822/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014823
14824 #include <wchar.h>
14825 int main()
14826 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014827 /* Success: exit code 0 */
14828 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014829 }
14830
14831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014833 ac_cv_wchar_t_signed=yes
14834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014839fi
14840
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014841fi
14842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14844$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845fi
14846
Michael Osipov3738fad2018-08-24 18:17:19 +020014847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14848$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014849# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014850if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014851 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014852then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014855
Michael Osipov3738fad2018-08-24 18:17:19 +020014856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14857$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014858else
Michael Osipov3738fad2018-08-24 18:17:19 +020014859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14860$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014861fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014862
14863# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14865$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014866if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014868else
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 ac_cv_c_bigendian=unknown
14870 # See if we're dealing with a universal compiler.
14871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14872/* end confdefs.h. */
14873#ifndef __APPLE_CC__
14874 not a universal capable compiler
14875 #endif
14876 typedef int dummy;
14877
Skip Montanaro6dead952003-09-25 14:50:04 +000014878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_compile "$LINENO"; then :
14880
14881 # Check for potential -arch flags. It is not universal unless
14882 # there are at least two -arch flags with different values.
14883 ac_arch=
14884 ac_prev=
14885 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14886 if test -n "$ac_prev"; then
14887 case $ac_word in
14888 i?86 | x86_64 | ppc | ppc64)
14889 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14890 ac_arch=$ac_word
14891 else
14892 ac_cv_c_bigendian=universal
14893 break
14894 fi
14895 ;;
14896 esac
14897 ac_prev=
14898 elif test "x$ac_word" = "x-arch"; then
14899 ac_prev=arch
14900 fi
14901 done
14902fi
14903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14904 if test $ac_cv_c_bigendian = unknown; then
14905 # See if sys/param.h defines the BYTE_ORDER macro.
14906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014907/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014908#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014910
Martin v. Löwis11437992002-04-12 09:54:03 +000014911int
14912main ()
14913{
Matthias Kloseb9621712010-04-24 17:59:49 +000014914#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14915 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14916 && LITTLE_ENDIAN)
14917 bogus endian macros
14918 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
14920 ;
14921 return 0;
14922}
14923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014924if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014927/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014928#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014930
Martin v. Löwis11437992002-04-12 09:54:03 +000014931int
14932main ()
14933{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014934#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 not big endian
14936 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
14938 ;
14939 return 0;
14940}
14941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014942if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014943 ac_cv_c_bigendian=yes
14944else
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014948fi
14949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14950 fi
14951 if test $ac_cv_c_bigendian = unknown; then
14952 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014955#include <limits.h>
14956
Martin v. Löwis11437992002-04-12 09:54:03 +000014957int
14958main ()
14959{
Matthias Kloseb9621712010-04-24 17:59:49 +000014960#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14961 bogus endian macros
14962 #endif
14963
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 ;
14965 return 0;
14966}
14967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014968if ac_fn_c_try_compile "$LINENO"; then :
14969 # It does; now see whether it defined to _BIG_ENDIAN or not.
14970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971/* end confdefs.h. */
14972#include <limits.h>
14973
14974int
14975main ()
14976{
14977#ifndef _BIG_ENDIAN
14978 not big endian
14979 #endif
14980
14981 ;
14982 return 0;
14983}
14984_ACEOF
14985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014987else
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14991fi
14992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14993 fi
14994 if test $ac_cv_c_bigendian = unknown; then
14995 # Compile a test program.
14996 if test "$cross_compiling" = yes; then :
14997 # Try to guess by grepping values from an object file.
14998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14999/* end confdefs.h. */
15000short int ascii_mm[] =
15001 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15002 short int ascii_ii[] =
15003 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15004 int use_ascii (int i) {
15005 return ascii_mm[i] + ascii_ii[i];
15006 }
15007 short int ebcdic_ii[] =
15008 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15009 short int ebcdic_mm[] =
15010 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15011 int use_ebcdic (int i) {
15012 return ebcdic_mm[i] + ebcdic_ii[i];
15013 }
15014 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016int
15017main ()
15018{
15019return use_ascii (foo) == use_ebcdic (foo);
15020 ;
15021 return 0;
15022}
15023_ACEOF
15024if ac_fn_c_try_compile "$LINENO"; then :
15025 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15026 ac_cv_c_bigendian=yes
15027 fi
15028 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15029 if test "$ac_cv_c_bigendian" = unknown; then
15030 ac_cv_c_bigendian=no
15031 else
15032 # finding both strings is unlikely to happen, but who knows?
15033 ac_cv_c_bigendian=unknown
15034 fi
15035 fi
15036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 /* Are we little or big endian? From Harbison&Steele. */
15047 union
15048 {
15049 long int l;
15050 char c[sizeof (long int)];
15051 } u;
15052 u.l = 1;
15053 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054
15055 ;
15056 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015057}
Martin v. Löwis11437992002-04-12 09:54:03 +000015058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015059if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015060 ac_cv_c_bigendian=no
15061else
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15065 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15071$as_echo "$ac_cv_c_bigendian" >&6; }
15072 case $ac_cv_c_bigendian in #(
15073 yes)
15074 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15075;; #(
15076 no)
15077 ;; #(
15078 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015081
Matthias Kloseb9621712010-04-24 17:59:49 +000015082 ;; #(
15083 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015084 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015085 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015087
Michael W. Hudson54241132001-12-07 15:38:26 +000015088
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015089# ABI version string for Python extension modules. This appears between the
15090# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15091# from the following attributes which affect the ABI of this Python build (in
15092# this order):
15093#
15094# * The Python implementation (always 'cpython-' for us)
15095# * The major and minor version numbers
15096# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015097#
15098# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015099# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15100# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015101#
15102# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15103# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015104
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15106$as_echo_n "checking ABIFLAGS... " >&6; }
15107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15108$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15110$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015111SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15113$as_echo "$SOABI" >&6; }
15114
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015115# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15116if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015117 # Similar to SOABI but remove "d" flag from ABIFLAGS
15118
15119 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15120
15121cat >>confdefs.h <<_ACEOF
15122#define ALT_SOABI "${ALT_SOABI}"
15123_ACEOF
15124
15125fi
15126
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015127
15128case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015129 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015130 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15131 *)
15132 EXT_SUFFIX=${SHLIB_SUFFIX};;
15133esac
15134
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15136$as_echo_n "checking LDVERSION... " >&6; }
15137LDVERSION='$(VERSION)$(ABIFLAGS)'
15138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15139$as_echo "$LDVERSION" >&6; }
15140
E. M. Brayc994c8f2019-05-24 17:33:47 +020015141# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015142
E. M. Brayb1fc4172019-05-24 18:39:39 +020015143if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015144 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015145else
15146 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015147fi
15148
doko@python.org87421192013-01-26 11:39:31 +010015149
doko@ubuntu.com55532312016-06-14 08:55:19 +020015150if test x$PLATFORM_TRIPLET = x; then
15151 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15152else
15153 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15154fi
doko@python.org87421192013-01-26 11:39:31 +010015155
15156
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015157# Check whether right shifting a negative integer extends the sign bit
15158# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15160$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015161if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015163else
Martin v. Löwis11437992002-04-12 09:54:03 +000015164
Matthias Kloseb9621712010-04-24 17:59:49 +000015165if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015166 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015169/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015170
15171int main()
15172{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015173 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015174}
15175
Martin v. Löwis11437992002-04-12 09:54:03 +000015176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015177if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015178 ac_cv_rshift_extends_sign=yes
15179else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15183 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015184fi
15185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186fi
15187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15189$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015190if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015191then
Martin v. Löwis11437992002-04-12 09:54:03 +000015192
Matthias Kloseb9621712010-04-24 17:59:49 +000015193$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015194
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015195fi
15196
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015197# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15199$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015200if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015202else
Martin v. Löwis11437992002-04-12 09:54:03 +000015203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015205/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015206#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015207int
15208main ()
15209{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015210
15211 FILE *f = fopen("/dev/null", "r");
15212 flockfile(f);
15213 getc_unlocked(f);
15214 funlockfile(f);
15215
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ;
15217 return 0;
15218}
15219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015220if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015221 ac_cv_have_getc_unlocked=yes
15222else
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 ac_cv_have_getc_unlocked=no
15224fi
15225rm -f core conftest.err conftest.$ac_objext \
15226 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228
Matthias Kloseb9621712010-04-24 17:59:49 +000015229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15230$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015231if test "$ac_cv_have_getc_unlocked" = yes
15232then
Martin v. Löwis11437992002-04-12 09:54:03 +000015233
Matthias Kloseb9621712010-04-24 17:59:49 +000015234$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015235
15236fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015237
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015238# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015239# save the value of LIBS so we don't actually link Python with readline
15240LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015241
Gregory P. Smith18820942008-09-07 06:24:49 +000015242# On some systems we need to link readline to a termcap compatible
15243# library. NOTE: Keep the precedence of listed libraries synchronised
15244# with setup.py.
15245py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15247$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015248for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015249 if test -z "$py_libtermcap"; then
15250 READLINE_LIBS="-lreadline"
15251 else
15252 READLINE_LIBS="-lreadline -l$py_libtermcap"
15253 fi
15254 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015256/* end confdefs.h. */
15257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258/* Override any GCC internal prototype to avoid an error.
15259 Use char because int might match the return type of a GCC
15260 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015261#ifdef __cplusplus
15262extern "C"
15263#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015264char readline ();
15265int
15266main ()
15267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015269 ;
15270 return 0;
15271}
15272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015273if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015274 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015276rm -f core conftest.err conftest.$ac_objext \
15277 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015278 if test $py_cv_lib_readline = yes; then
15279 break
15280 fi
15281done
15282# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15283#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015284if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15286$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15289$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015292
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015293fi
15294
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015295# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015297/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015298#include <readline/readline.h>
15299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015300if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015301 have_readline=yes
15302else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015303 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015304
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015305fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015306rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015307if test $have_readline = yes
15308then
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015311#include <readline/readline.h>
15312
15313_ACEOF
15314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015318
15319fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015320rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015323/* end confdefs.h. */
15324#include <readline/readline.h>
15325
15326_ACEOF
15327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015329
Matthias Kloseb9621712010-04-24 17:59:49 +000015330$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015331
15332fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015333rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015334
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015335fi
15336
Martin v. Löwis0daad592001-09-30 21:09:59 +000015337# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15339$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015340if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015342else
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015344LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348/* Override any GCC internal prototype to avoid an error.
15349 Use char because int might match the return type of a GCC
15350 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015351#ifdef __cplusplus
15352extern "C"
15353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015354char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015355int
15356main ()
15357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ;
15360 return 0;
15361}
15362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015363if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015365else
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015368rm -f core conftest.err conftest.$ac_objext \
15369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015370LIBS=$ac_check_lib_save_LIBS
15371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15373$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015374if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015377
Martin v. Löwis0daad592001-09-30 21:09:59 +000015378fi
15379
Michael W. Hudson54241132001-12-07 15:38:26 +000015380
Thomas Wouters89d996e2007-09-08 17:39:28 +000015381# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15383$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015384if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015386else
15387 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015388LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015390/* end confdefs.h. */
15391
15392/* Override any GCC internal prototype to avoid an error.
15393 Use char because int might match the return type of a GCC
15394 builtin and then its argument prototype would still apply. */
15395#ifdef __cplusplus
15396extern "C"
15397#endif
15398char rl_completion_display_matches_hook ();
15399int
15400main ()
15401{
15402return rl_completion_display_matches_hook ();
15403 ;
15404 return 0;
15405}
15406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015407if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015408 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15409else
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015412rm -f core conftest.err conftest.$ac_objext \
15413 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015414LIBS=$ac_check_lib_save_LIBS
15415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15417$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015418if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015421
15422fi
15423
15424
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015425# also in 4.0, but not in editline
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15427$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15428if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15429 $as_echo_n "(cached) " >&6
15430else
15431 ac_check_lib_save_LIBS=$LIBS
15432LIBS="-lreadline $READLINE_LIBS $LIBS"
15433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15434/* end confdefs.h. */
15435
15436/* Override any GCC internal prototype to avoid an error.
15437 Use char because int might match the return type of a GCC
15438 builtin and then its argument prototype would still apply. */
15439#ifdef __cplusplus
15440extern "C"
15441#endif
15442char rl_resize_terminal ();
15443int
15444main ()
15445{
15446return rl_resize_terminal ();
15447 ;
15448 return 0;
15449}
15450_ACEOF
15451if ac_fn_c_try_link "$LINENO"; then :
15452 ac_cv_lib_readline_rl_resize_terminal=yes
15453else
15454 ac_cv_lib_readline_rl_resize_terminal=no
15455fi
15456rm -f core conftest.err conftest.$ac_objext \
15457 conftest$ac_exeext conftest.$ac_ext
15458LIBS=$ac_check_lib_save_LIBS
15459fi
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15461$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15462if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15463
15464$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15465
15466fi
15467
15468
Martin v. Löwis0daad592001-09-30 21:09:59 +000015469# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15471$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015472if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015474else
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015476LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480/* Override any GCC internal prototype to avoid an error.
15481 Use char because int might match the return type of a GCC
15482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015483#ifdef __cplusplus
15484extern "C"
15485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015486char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015487int
15488main ()
15489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 ;
15492 return 0;
15493}
15494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015497else
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015500rm -f core conftest.err conftest.$ac_objext \
15501 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015502LIBS=$ac_check_lib_save_LIBS
15503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15505$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015506if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015507
Matthias Kloseb9621712010-04-24 17:59:49 +000015508$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015509
Guido van Rossum353ae582001-07-10 16:45:32 +000015510fi
15511
Jack Jansendd19cf82001-12-06 22:36:17 +000015512
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015513# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015515/* end confdefs.h. */
15516#include <readline/readline.h>
15517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015518if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015519 have_readline=yes
15520else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015521 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015522
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015523fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015524rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015525if test $have_readline = yes
15526then
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015528/* end confdefs.h. */
15529#include <readline/readline.h>
15530
15531_ACEOF
15532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015536
15537fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015538rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015539
15540fi
15541
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15543$as_echo_n "checking for append_history in -lreadline... " >&6; }
15544if ${ac_cv_lib_readline_append_history+:} false; then :
15545 $as_echo_n "(cached) " >&6
15546else
15547 ac_check_lib_save_LIBS=$LIBS
15548LIBS="-lreadline $READLINE_LIBS $LIBS"
15549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15550/* end confdefs.h. */
15551
15552/* Override any GCC internal prototype to avoid an error.
15553 Use char because int might match the return type of a GCC
15554 builtin and then its argument prototype would still apply. */
15555#ifdef __cplusplus
15556extern "C"
15557#endif
15558char append_history ();
15559int
15560main ()
15561{
15562return append_history ();
15563 ;
15564 return 0;
15565}
15566_ACEOF
15567if ac_fn_c_try_link "$LINENO"; then :
15568 ac_cv_lib_readline_append_history=yes
15569else
15570 ac_cv_lib_readline_append_history=no
15571fi
15572rm -f core conftest.err conftest.$ac_objext \
15573 conftest$ac_exeext conftest.$ac_ext
15574LIBS=$ac_check_lib_save_LIBS
15575fi
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15577$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15578if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15579
15580$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15581
15582fi
15583
15584
Martin v. Löwis82bca632006-02-10 20:49:30 +000015585# End of readline checks: restore LIBS
15586LIBS=$LIBS_no_readline
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15589$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015590if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015591 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015592else
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015595 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015596else
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015598/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015599
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015600#include <stdlib.h>
15601#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015602int main()
15603{
15604 int val1 = nice(1);
15605 if (val1 != -1 && val1 == nice(2))
15606 exit(0);
15607 exit(1);
15608}
15609
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015611if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015612 ac_cv_broken_nice=yes
15613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015618fi
15619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620fi
15621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15623$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015624if test "$ac_cv_broken_nice" = yes
15625then
Martin v. Löwis11437992002-04-12 09:54:03 +000015626
Matthias Kloseb9621712010-04-24 17:59:49 +000015627$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015628
15629fi
15630
Matthias Kloseb9621712010-04-24 17:59:49 +000015631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15632$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015633if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015635else
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015637 ac_cv_broken_poll=no
15638else
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015640/* end confdefs.h. */
15641
15642#include <poll.h>
15643
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015644int main()
15645{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015646 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015647 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015648
15649 close (42);
15650
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015651 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015652 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015653 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015654 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015655 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015656 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015657 return 1;
15658}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659
15660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015661if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015662 ac_cv_broken_poll=yes
15663else
Matthias Kloseb9621712010-04-24 17:59:49 +000015664 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15667 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015670fi
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15673$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015674if test "$ac_cv_broken_poll" = yes
15675then
15676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015678
15679fi
15680
Martin v. Löwis1d459062005-03-14 21:23:33 +000015681# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15683$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015684if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015686else
15687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015689 ac_cv_working_tzset=no
15690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015693
15694#include <stdlib.h>
15695#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015696#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015697
15698#if HAVE_TZNAME
15699extern char *tzname[];
15700#endif
15701
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015702int main()
15703{
Brett Cannon18367812003-09-19 00:59:16 +000015704 /* Note that we need to ensure that not only does tzset(3)
15705 do 'something' with localtime, but it works as documented
15706 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015707 This includes making sure that tzname is set properly if
15708 tm->tm_zone does not exist since it is the alternative way
15709 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015710
15711 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015712 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015713 */
15714
Martin v. Löwis1d459062005-03-14 21:23:33 +000015715 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015716 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15717
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015718 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015720 if (localtime(&groundhogday)->tm_hour != 0)
15721 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015722#if HAVE_TZNAME
15723 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15724 if (strcmp(tzname[0], "UTC") ||
15725 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15726 exit(1);
15727#endif
Brett Cannon18367812003-09-19 00:59:16 +000015728
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015729 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015730 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015731 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015732 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015733#if HAVE_TZNAME
15734 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15735 exit(1);
15736#endif
Brett Cannon18367812003-09-19 00:59:16 +000015737
15738 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15739 tzset();
15740 if (localtime(&groundhogday)->tm_hour != 11)
15741 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015742#if HAVE_TZNAME
15743 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15744 exit(1);
15745#endif
15746
15747#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015748 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15749 exit(1);
15750 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15751 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015752#endif
Brett Cannon18367812003-09-19 00:59:16 +000015753
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754 exit(0);
15755}
15756
15757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015758if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015759 ac_cv_working_tzset=yes
15760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015765fi
15766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767fi
15768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15770$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015771if test "$ac_cv_working_tzset" = yes
15772then
15773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015775
15776fi
15777
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015778# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15780$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015781if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015783else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015785/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015786#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015787int
15788main ()
15789{
15790
15791struct stat st;
15792st.st_mtim.tv_nsec = 1;
15793
15794 ;
15795 return 0;
15796}
15797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015799 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015800else
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15804fi
15805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15807$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015808if test "$ac_cv_stat_tv_nsec" = yes
15809then
15810
Matthias Kloseb9621712010-04-24 17:59:49 +000015811$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015812
15813fi
15814
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015815# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15817$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015818if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015819 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015820else
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015822/* end confdefs.h. */
15823#include <sys/stat.h>
15824int
15825main ()
15826{
15827
15828struct stat st;
15829st.st_mtimespec.tv_nsec = 1;
15830
15831 ;
15832 return 0;
15833}
15834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015835if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015836 ac_cv_stat_tv_nsec2=yes
15837else
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15841fi
15842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15844$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015845if test "$ac_cv_stat_tv_nsec2" = yes
15846then
15847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015849
15850fi
15851
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015852# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015853ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015854if test "$cross_compiling" = no; then
15855 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15856fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015857
15858for ac_header in curses.h ncurses.h
15859do :
15860 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15861ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15863 cat >>confdefs.h <<_ACEOF
15864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15865_ACEOF
15866
15867fi
15868
15869done
15870
15871
15872# On Solaris, term.h requires curses.h
15873for ac_header in term.h
15874do :
15875 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15876#ifdef HAVE_CURSES_H
15877#include <curses.h>
15878#endif
15879
15880"
15881if test "x$ac_cv_header_term_h" = xyes; then :
15882 cat >>confdefs.h <<_ACEOF
15883#define HAVE_TERM_H 1
15884_ACEOF
15885
15886fi
15887
15888done
15889
15890
Jack Jansen666b1e72001-10-31 12:11:48 +000015891# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15893$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015894if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015896else
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015898/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015899#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015900int
15901main ()
15902{
Jack Jansen666b1e72001-10-31 12:11:48 +000015903
15904 int rtn;
15905 rtn = mvwdelch(0,0,0);
15906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907 ;
15908 return 0;
15909}
15910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015911if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015912 ac_cv_mvwdelch_is_expression=yes
15913else
Matthias Kloseb9621712010-04-24 17:59:49 +000015914 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15917fi
15918
Matthias Kloseb9621712010-04-24 17:59:49 +000015919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15920$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015921
15922if test "$ac_cv_mvwdelch_is_expression" = yes
15923then
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015926
15927fi
15928
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015929# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15930# structs since version 5.7. If the macro is defined as zero before including
15931# [n]curses.h, ncurses will expose fields of the structs regardless of the
15932# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15934$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015935if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015937else
Matthias Kloseb9621712010-04-24 17:59:49 +000015938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015939/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015940
15941 #define NCURSES_OPAQUE 0
15942 #include <curses.h>
15943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944int
15945main ()
15946{
Jack Jansen666b1e72001-10-31 12:11:48 +000015947
15948 WINDOW *w;
15949 w->_flags = 0;
15950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ;
15952 return 0;
15953}
15954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015956 ac_cv_window_has_flags=yes
15957else
Matthias Kloseb9621712010-04-24 17:59:49 +000015958 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15961fi
15962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15964$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015965
Jack Jansen666b1e72001-10-31 12:11:48 +000015966
15967if test "$ac_cv_window_has_flags" = yes
15968then
Martin v. Löwis11437992002-04-12 09:54:03 +000015969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015971
15972fi
15973
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15975$as_echo_n "checking for is_pad... " >&6; }
15976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15977/* end confdefs.h. */
15978#include <curses.h>
15979int
15980main ()
15981{
15982
15983#ifndef is_pad
15984void *x=is_pad
15985#endif
15986
15987 ;
15988 return 0;
15989}
15990_ACEOF
15991if ac_fn_c_try_compile "$LINENO"; then :
15992
15993$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15994
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15996$as_echo "yes" >&6; }
15997else
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15999$as_echo "no" >&6; }
16000
16001fi
16002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16005$as_echo_n "checking for is_term_resized... " >&6; }
16006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016007/* end confdefs.h. */
16008#include <curses.h>
16009int
16010main ()
16011{
16012void *x=is_term_resized
16013 ;
16014 return 0;
16015}
16016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016018
Matthias Kloseb9621712010-04-24 17:59:49 +000016019$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020
Matthias Kloseb159a552010-04-25 21:00:44 +000016021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016023else
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16025$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016026
16027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16029
Matthias Kloseb9621712010-04-24 17:59:49 +000016030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16031$as_echo_n "checking for resize_term... " >&6; }
16032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016033/* end confdefs.h. */
16034#include <curses.h>
16035int
16036main ()
16037{
16038void *x=resize_term
16039 ;
16040 return 0;
16041}
16042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016043if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016046
Matthias Kloseb159a552010-04-25 21:00:44 +000016047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016048$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016049else
Matthias Kloseb9621712010-04-24 17:59:49 +000016050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16051$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016052
16053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16057$as_echo_n "checking for resizeterm... " >&6; }
16058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016059/* end confdefs.h. */
16060#include <curses.h>
16061int
16062main ()
16063{
16064void *x=resizeterm
16065 ;
16066 return 0;
16067}
16068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016069if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016072
Matthias Kloseb159a552010-04-25 21:00:44 +000016073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016074$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016075else
Matthias Kloseb9621712010-04-24 17:59:49 +000016076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16077$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016078
16079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016081
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16083$as_echo_n "checking for immedok... " >&6; }
16084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16085/* end confdefs.h. */
16086#include <curses.h>
16087int
16088main ()
16089{
16090
16091#ifndef immedok
16092void *x=immedok
16093#endif
16094
16095 ;
16096 return 0;
16097}
16098_ACEOF
16099if ac_fn_c_try_compile "$LINENO"; then :
16100
16101$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16102
16103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16104$as_echo "yes" >&6; }
16105else
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16107$as_echo "no" >&6; }
16108
16109fi
16110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16111
16112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16113$as_echo_n "checking for syncok... " >&6; }
16114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115/* end confdefs.h. */
16116#include <curses.h>
16117int
16118main ()
16119{
16120
16121#ifndef syncok
16122void *x=syncok
16123#endif
16124
16125 ;
16126 return 0;
16127}
16128_ACEOF
16129if ac_fn_c_try_compile "$LINENO"; then :
16130
16131$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16132
16133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16134$as_echo "yes" >&6; }
16135else
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16137$as_echo "no" >&6; }
16138
16139fi
16140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16141
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16143$as_echo_n "checking for wchgat... " >&6; }
16144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16145/* end confdefs.h. */
16146#include <curses.h>
16147int
16148main ()
16149{
16150
16151#ifndef wchgat
16152void *x=wchgat
16153#endif
16154
16155 ;
16156 return 0;
16157}
16158_ACEOF
16159if ac_fn_c_try_compile "$LINENO"; then :
16160
16161$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16162
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16164$as_echo "yes" >&6; }
16165else
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16167$as_echo "no" >&6; }
16168
16169fi
16170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16171
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16173$as_echo_n "checking for filter... " >&6; }
16174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16175/* end confdefs.h. */
16176#include <curses.h>
16177int
16178main ()
16179{
16180
16181#ifndef filter
16182void *x=filter
16183#endif
16184
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189if ac_fn_c_try_compile "$LINENO"; then :
16190
16191$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16192
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16194$as_echo "yes" >&6; }
16195else
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16197$as_echo "no" >&6; }
16198
16199fi
16200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16201
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16203$as_echo_n "checking for has_key... " >&6; }
16204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205/* end confdefs.h. */
16206#include <curses.h>
16207int
16208main ()
16209{
16210
16211#ifndef has_key
16212void *x=has_key
16213#endif
16214
16215 ;
16216 return 0;
16217}
16218_ACEOF
16219if ac_fn_c_try_compile "$LINENO"; then :
16220
16221$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16222
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16224$as_echo "yes" >&6; }
16225else
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16227$as_echo "no" >&6; }
16228
16229fi
16230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16231
16232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16233$as_echo_n "checking for typeahead... " >&6; }
16234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16235/* end confdefs.h. */
16236#include <curses.h>
16237int
16238main ()
16239{
16240
16241#ifndef typeahead
16242void *x=typeahead
16243#endif
16244
16245 ;
16246 return 0;
16247}
16248_ACEOF
16249if ac_fn_c_try_compile "$LINENO"; then :
16250
16251$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16252
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16254$as_echo "yes" >&6; }
16255else
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16257$as_echo "no" >&6; }
16258
16259fi
16260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16261
16262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16263$as_echo_n "checking for use_env... " >&6; }
16264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265/* end confdefs.h. */
16266#include <curses.h>
16267int
16268main ()
16269{
16270
16271#ifndef use_env
16272void *x=use_env
16273#endif
16274
16275 ;
16276 return 0;
16277}
16278_ACEOF
16279if ac_fn_c_try_compile "$LINENO"; then :
16280
16281$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16282
16283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16284$as_echo "yes" >&6; }
16285else
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16287$as_echo "no" >&6; }
16288
16289fi
16290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016291# last curses configure check
16292CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16295$as_echo "$as_me: checking for device files" >&6;}
16296
16297if test "x$cross_compiling" = xyes; then
16298 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16300$as_echo_n "checking for /dev/ptmx... " >&6; }
16301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16302$as_echo "not set" >&6; }
16303 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16304 fi
16305 if test "${ac_cv_file__dev_ptc+set}" != set; then
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16307$as_echo_n "checking for /dev/ptc... " >&6; }
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16309$as_echo "not set" >&6; }
16310 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16311 fi
16312fi
16313
Matthias Kloseb9621712010-04-24 17:59:49 +000016314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16315$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016316if ${ac_cv_file__dev_ptmx+:} false; then :
16317 $as_echo_n "(cached) " >&6
16318else
16319 test "$cross_compiling" = yes &&
16320 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16321if test -r "/dev/ptmx"; then
16322 ac_cv_file__dev_ptmx=yes
16323else
16324 ac_cv_file__dev_ptmx=no
16325fi
16326fi
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16328$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16329if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016330
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016331fi
16332
16333if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016334
Matthias Kloseb9621712010-04-24 17:59:49 +000016335$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016336
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16339$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016340if ${ac_cv_file__dev_ptc+:} false; then :
16341 $as_echo_n "(cached) " >&6
16342else
16343 test "$cross_compiling" = yes &&
16344 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16345if test -r "/dev/ptc"; then
16346 ac_cv_file__dev_ptc=yes
16347else
16348 ac_cv_file__dev_ptc=no
16349fi
16350fi
16351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16352$as_echo "$ac_cv_file__dev_ptc" >&6; }
16353if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016354
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016355fi
16356
16357if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016358
Matthias Kloseb9621712010-04-24 17:59:49 +000016359$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016360
Neal Norwitz865400f2003-03-21 01:42:58 +000016361fi
16362
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016363if test $ac_sys_system = Darwin
16364then
16365 LIBS="$LIBS -framework CoreFoundation"
16366fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016367
Matthias Kloseb9621712010-04-24 17:59:49 +000016368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16369$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016370if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016372else
Matthias Kloseb9621712010-04-24 17:59:49 +000016373 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016374 ac_cv_have_size_t_format="cross -- assuming yes"
16375
Thomas Wouters477c8d52006-05-27 19:21:47 +000016376else
Matthias Kloseb9621712010-04-24 17:59:49 +000016377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016378/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016379
Thomas Wouters477c8d52006-05-27 19:21:47 +000016380#include <stdio.h>
16381#include <stddef.h>
16382#include <string.h>
16383
Christian Heimes2c181612007-12-17 20:04:13 +000016384#ifdef HAVE_SYS_TYPES_H
16385#include <sys/types.h>
16386#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016387
16388#ifdef HAVE_SSIZE_T
16389typedef ssize_t Py_ssize_t;
16390#elif SIZEOF_VOID_P == SIZEOF_LONG
16391typedef long Py_ssize_t;
16392#else
16393typedef int Py_ssize_t;
16394#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016395
Christian Heimes2c181612007-12-17 20:04:13 +000016396int main()
16397{
16398 char buffer[256];
16399
Thomas Wouters477c8d52006-05-27 19:21:47 +000016400 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16401 return 1;
16402
Thomas Wouters89f507f2006-12-13 04:49:30 +000016403 if (strcmp(buffer, "123"))
16404 return 1;
16405
16406 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16407 return 1;
16408
16409 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016410 return 1;
16411
16412 return 0;
16413}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016414
Thomas Wouters477c8d52006-05-27 19:21:47 +000016415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016416if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016417 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016418else
Matthias Kloseb9621712010-04-24 17:59:49 +000016419 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016423fi
16424
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16427$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016428if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016429
Matthias Kloseb9621712010-04-24 17:59:49 +000016430$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016431
16432fi
16433
Matthias Kloseb9621712010-04-24 17:59:49 +000016434ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016435#ifdef HAVE_SYS_TYPES_H
16436#include <sys/types.h>
16437#endif
16438#ifdef HAVE_SYS_SOCKET_H
16439#include <sys/socket.h>
16440#endif
16441
Matthias Kloseb9621712010-04-24 17:59:49 +000016442"
Victor Stinnere0be4232011-10-25 13:06:09 +020016443if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016444
Martin v. Löwis11437992002-04-12 09:54:03 +000016445else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016446
Matthias Kloseb9621712010-04-24 17:59:49 +000016447$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016448
16449fi
16450
Michael W. Hudson54241132001-12-07 15:38:26 +000016451
Matthias Kloseb9621712010-04-24 17:59:49 +000016452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16453$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016454if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016456else
Matthias Kloseb9621712010-04-24 17:59:49 +000016457 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016458 ac_cv_broken_mbstowcs=no
16459else
Matthias Kloseb9621712010-04-24 17:59:49 +000016460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016461/* end confdefs.h. */
16462
Stefan Krah19c21392012-11-22 23:47:32 +010016463#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016464#include<stdlib.h>
16465int main() {
16466 size_t len = -1;
16467 const char *str = "text";
16468 len = mbstowcs(NULL, str, 0);
16469 return (len != 4);
16470}
16471
16472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016473if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016474 ac_cv_broken_mbstowcs=no
16475else
Matthias Kloseb9621712010-04-24 17:59:49 +000016476 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016480fi
16481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016482fi
16483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16485$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016486if test "$ac_cv_broken_mbstowcs" = yes
16487then
16488
Matthias Kloseb9621712010-04-24 17:59:49 +000016489$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016490
16491fi
16492
Antoine Pitroub52ec782009-01-25 16:34:23 +000016493# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16495$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016496
16497# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016498if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016499 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016500if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016501then
16502
Matthias Kloseb9621712010-04-24 17:59:49 +000016503$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016504
Matthias Kloseb9621712010-04-24 17:59:49 +000016505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16506$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016507fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016508if test "$withval" = no
16509then
16510
16511$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16512
Matthias Kloseb9621712010-04-24 17:59:49 +000016513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16514$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016515fi
16516
Antoine Pitrou042b1282010-08-13 21:15:58 +000016517else
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16519$as_echo "no value specified" >&6; }
16520fi
16521
Antoine Pitroub52ec782009-01-25 16:34:23 +000016522
Matthias Kloseb17289e2012-03-15 19:51:34 +010016523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16524$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16525if ${ac_cv_computed_gotos+:} false; then :
16526 $as_echo_n "(cached) " >&6
16527else
16528 if test "$cross_compiling" = yes; then :
16529 if test "${with_computed_gotos+set}" = set; then
16530 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16531 else
16532 ac_cv_computed_gotos=no
16533 fi
16534else
16535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16536/* end confdefs.h. */
16537
16538int main(int argc, char **argv)
16539{
16540 static void *targets[1] = { &&LABEL1 };
16541 goto LABEL2;
16542LABEL1:
16543 return 0;
16544LABEL2:
16545 goto *targets[0];
16546 return 1;
16547}
16548
16549_ACEOF
16550if ac_fn_c_try_run "$LINENO"; then :
16551 ac_cv_computed_gotos=yes
16552else
16553 ac_cv_computed_gotos=no
16554fi
16555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16556 conftest.$ac_objext conftest.beam conftest.$ac_ext
16557fi
16558
16559fi
16560
16561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16562$as_echo "$ac_cv_computed_gotos" >&6; }
16563case "$ac_cv_computed_gotos" in yes*)
16564
16565$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16566
16567esac
16568
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016569case $ac_sys_system in
16570AIX*)
16571
16572$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16573 ;;
16574esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016575
Michael W. Hudson54241132001-12-07 15:38:26 +000016576
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016577
16578
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016579for h in `(cd $srcdir;echo Python/thread_*.h)`
16580do
16581 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16582done
16583
Michael W. Hudson54241132001-12-07 15:38:26 +000016584
Victor Stinner21a74a92019-04-11 22:28:12 +020016585SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16587$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016588for dir in $SRCDIRS; do
16589 if test ! -d $dir; then
16590 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016591 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016592done
Matthias Kloseb9621712010-04-24 17:59:49 +000016593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16594$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016595
Stefan Krah1919b7e2012-03-21 18:25:23 +010016596# Availability of -O2:
16597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16598$as_echo_n "checking for -O2... " >&6; }
16599saved_cflags="$CFLAGS"
16600CFLAGS="-O2"
16601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16602/* end confdefs.h. */
16603
16604int
16605main ()
16606{
16607
16608
16609 ;
16610 return 0;
16611}
16612_ACEOF
16613if ac_fn_c_try_compile "$LINENO"; then :
16614 have_O2=yes
16615else
16616 have_O2=no
16617fi
16618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16620$as_echo "$have_O2" >&6; }
16621CFLAGS="$saved_cflags"
16622
16623# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16624# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16626$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16627saved_cflags="$CFLAGS"
16628CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16629if test "$have_O2" = no; then
16630 CFLAGS=""
16631fi
16632if test "$cross_compiling" = yes; then :
16633 have_glibc_memmove_bug=undefined
16634else
16635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16636/* end confdefs.h. */
16637
16638#include <stdio.h>
16639#include <stdlib.h>
16640#include <string.h>
16641void foo(void *p, void *q) { memmove(p, q, 19); }
16642int main() {
16643 char a[32] = "123456789000000000";
16644 foo(&a[9], a);
16645 if (strcmp(a, "123456789123456789000000000") != 0)
16646 return 1;
16647 foo(a, &a[9]);
16648 if (strcmp(a, "123456789000000000") != 0)
16649 return 1;
16650 return 0;
16651}
16652
16653_ACEOF
16654if ac_fn_c_try_run "$LINENO"; then :
16655 have_glibc_memmove_bug=no
16656else
16657 have_glibc_memmove_bug=yes
16658fi
16659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16660 conftest.$ac_objext conftest.beam conftest.$ac_ext
16661fi
16662
16663CFLAGS="$saved_cflags"
16664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16665$as_echo "$have_glibc_memmove_bug" >&6; }
16666if test "$have_glibc_memmove_bug" = yes; then
16667
16668$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16669
16670fi
16671
16672if test "$have_gcc_asm_for_x87" = yes; then
16673 # Some versions of gcc miscompile inline asm:
16674 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16675 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16676 case $CC in
16677 *gcc*)
16678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16679$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16680 saved_cflags="$CFLAGS"
16681 CFLAGS="-O2"
16682 if test "$cross_compiling" = yes; then :
16683 have_ipa_pure_const_bug=undefined
16684else
16685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16686/* end confdefs.h. */
16687
16688 __attribute__((noinline)) int
16689 foo(int *p) {
16690 int r;
16691 asm ( "movl \$6, (%1)\n\t"
16692 "xorl %0, %0\n\t"
16693 : "=r" (r) : "r" (p) : "memory"
16694 );
16695 return r;
16696 }
16697 int main() {
16698 int p = 8;
16699 if ((foo(&p) ? : p) != 6)
16700 return 1;
16701 return 0;
16702 }
16703
16704_ACEOF
16705if ac_fn_c_try_run "$LINENO"; then :
16706 have_ipa_pure_const_bug=no
16707else
16708 have_ipa_pure_const_bug=yes
16709fi
16710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16711 conftest.$ac_objext conftest.beam conftest.$ac_ext
16712fi
16713
16714 CFLAGS="$saved_cflags"
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16716$as_echo "$have_ipa_pure_const_bug" >&6; }
16717 if test "$have_ipa_pure_const_bug" = yes; then
16718
16719$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16720
16721 fi
16722 ;;
16723 esac
16724fi
16725
Victor Stinner4f5366e2015-01-09 02:13:19 +010016726# Check for stdatomic.h
16727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16728$as_echo_n "checking for stdatomic.h... " >&6; }
16729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16730/* end confdefs.h. */
16731
16732
16733 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016734 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016735 int main() {
16736 int loaded_value = atomic_load(&value);
16737 return 0;
16738 }
16739
16740
16741_ACEOF
16742if ac_fn_c_try_link "$LINENO"; then :
16743 have_stdatomic_h=yes
16744else
16745 have_stdatomic_h=no
16746fi
16747rm -f core conftest.err conftest.$ac_objext \
16748 conftest$ac_exeext conftest.$ac_ext
16749
16750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16751$as_echo "$have_stdatomic_h" >&6; }
16752
16753if test "$have_stdatomic_h" = yes; then
16754
16755$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16756
16757fi
16758
16759# Check for GCC >= 4.7 __atomic builtins
16760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16761$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763/* end confdefs.h. */
16764
16765
16766 volatile int val = 1;
16767 int main() {
16768 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16769 return 0;
16770 }
16771
16772
16773_ACEOF
16774if ac_fn_c_try_link "$LINENO"; then :
16775 have_builtin_atomic=yes
16776else
16777 have_builtin_atomic=no
16778fi
16779rm -f core conftest.err conftest.$ac_objext \
16780 conftest$ac_exeext conftest.$ac_ext
16781
16782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16783$as_echo "$have_builtin_atomic" >&6; }
16784
16785if test "$have_builtin_atomic" = yes; then
16786
16787$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16788
16789fi
16790
Ned Deily322f5ba2013-11-21 23:01:59 -080016791# ensurepip option
16792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16793$as_echo_n "checking for ensurepip... " >&6; }
16794
16795# Check whether --with-ensurepip was given.
16796if test "${with_ensurepip+set}" = set; then :
16797 withval=$with_ensurepip;
16798else
16799 with_ensurepip=upgrade
16800fi
16801
16802case $with_ensurepip in #(
16803 yes|upgrade) :
16804 ENSUREPIP=upgrade ;; #(
16805 install) :
16806 ENSUREPIP=install ;; #(
16807 no) :
16808 ENSUREPIP=no ;; #(
16809 *) :
16810 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16811esac
16812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16813$as_echo "$ENSUREPIP" >&6; }
16814
16815
Victor Stinner35a97c02015-03-08 02:59:09 +010016816# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16818$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16820/* end confdefs.h. */
16821
16822
16823 #include <dirent.h>
16824
16825 int main() {
16826 struct dirent entry;
16827 return entry.d_type == DT_UNKNOWN;
16828 }
16829
16830
16831_ACEOF
16832if ac_fn_c_try_link "$LINENO"; then :
16833 have_dirent_d_type=yes
16834else
16835 have_dirent_d_type=no
16836fi
16837rm -f core conftest.err conftest.$ac_objext \
16838 conftest$ac_exeext conftest.$ac_ext
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16840$as_echo "$have_dirent_d_type" >&6; }
16841
16842if test "$have_dirent_d_type" = yes; then
16843
16844$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16845
16846fi
16847
Victor Stinner9eb57c52015-03-19 22:21:49 +010016848# check if the Linux getrandom() syscall is available
16849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16850$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16852/* end confdefs.h. */
16853
16854
Victor Stinner1b80b242016-04-12 22:34:58 +020016855 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016856 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016857 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016858
16859 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016860 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016861 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016862 const int flags = GRND_NONBLOCK;
16863 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016864 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016865 return 0;
16866 }
16867
16868
16869_ACEOF
16870if ac_fn_c_try_link "$LINENO"; then :
16871 have_getrandom_syscall=yes
16872else
16873 have_getrandom_syscall=no
16874fi
16875rm -f core conftest.err conftest.$ac_objext \
16876 conftest$ac_exeext conftest.$ac_ext
16877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16878$as_echo "$have_getrandom_syscall" >&6; }
16879
16880if test "$have_getrandom_syscall" = yes; then
16881
16882$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16883
16884fi
16885
Victor Stinner3abf44e2015-09-18 15:38:37 +020016886# check if the getrandom() function is available
16887# the test was written for the Solaris function of <sys/random.h>
16888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16889$as_echo_n "checking for the getrandom() function... " >&6; }
16890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16891/* end confdefs.h. */
16892
16893
16894 #include <sys/random.h>
16895
16896 int main() {
16897 char buffer[1];
16898 const size_t buflen = sizeof(buffer);
16899 const int flags = 0;
16900 /* ignore the result, Python checks for ENOSYS at runtime */
16901 (void)getrandom(buffer, buflen, flags);
16902 return 0;
16903 }
16904
16905
16906_ACEOF
16907if ac_fn_c_try_link "$LINENO"; then :
16908 have_getrandom=yes
16909else
16910 have_getrandom=no
16911fi
16912rm -f core conftest.err conftest.$ac_objext \
16913 conftest$ac_exeext conftest.$ac_ext
16914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16915$as_echo "$have_getrandom" >&6; }
16916
16917if test "$have_getrandom" = yes; then
16918
16919$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16920
16921fi
16922
Neil Schemenauer5741c452019-02-08 10:48:46 -080016923# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16924# shm_* may only be available if linking against librt
16925save_LIBS="$LIBS"
16926save_includes_default="$ac_includes_default"
16927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16928$as_echo_n "checking for library containing shm_open... " >&6; }
16929if ${ac_cv_search_shm_open+:} false; then :
16930 $as_echo_n "(cached) " >&6
16931else
16932 ac_func_search_save_LIBS=$LIBS
16933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16934/* end confdefs.h. */
16935
16936/* Override any GCC internal prototype to avoid an error.
16937 Use char because int might match the return type of a GCC
16938 builtin and then its argument prototype would still apply. */
16939#ifdef __cplusplus
16940extern "C"
16941#endif
16942char shm_open ();
16943int
16944main ()
16945{
16946return shm_open ();
16947 ;
16948 return 0;
16949}
16950_ACEOF
16951for ac_lib in '' rt; do
16952 if test -z "$ac_lib"; then
16953 ac_res="none required"
16954 else
16955 ac_res=-l$ac_lib
16956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16957 fi
16958 if ac_fn_c_try_link "$LINENO"; then :
16959 ac_cv_search_shm_open=$ac_res
16960fi
16961rm -f core conftest.err conftest.$ac_objext \
16962 conftest$ac_exeext
16963 if ${ac_cv_search_shm_open+:} false; then :
16964 break
16965fi
16966done
16967if ${ac_cv_search_shm_open+:} false; then :
16968
16969else
16970 ac_cv_search_shm_open=no
16971fi
16972rm conftest.$ac_ext
16973LIBS=$ac_func_search_save_LIBS
16974fi
16975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16976$as_echo "$ac_cv_search_shm_open" >&6; }
16977ac_res=$ac_cv_search_shm_open
16978if test "$ac_res" != no; then :
16979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16980
16981fi
16982
16983if test "$ac_cv_search_shm_open" = "-lrt"; then
16984
16985$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16986
16987fi
16988for ac_header in sys/mman.h
16989do :
16990 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16991if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16992 cat >>confdefs.h <<_ACEOF
16993#define HAVE_SYS_MMAN_H 1
16994_ACEOF
16995
16996fi
16997
16998done
16999
17000# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17001ac_includes_default="\
17002${ac_includes_default}
17003#ifndef __cplusplus
17004# ifdef HAVE_SYS_MMAN_H
17005# include <sys/mman.h>
17006# endif
17007#endif
17008"
17009for ac_func in shm_open shm_unlink
17010do :
17011 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17012ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17013if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17014 cat >>confdefs.h <<_ACEOF
17015#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17016_ACEOF
17017
17018fi
17019done
17020
17021# we don't want to link with librt always, restore LIBS
17022LIBS="$save_LIBS"
17023ac_includes_default="$save_includes_default"
17024
Christian Heimesff5be6e2018-01-20 13:19:21 +010017025# Check for usable OpenSSL
17026
17027 found=false
17028
17029# Check whether --with-openssl was given.
17030if test "${with_openssl+set}" = set; then :
17031 withval=$with_openssl;
17032 case "$withval" in
17033 "" | y | ye | yes | n | no)
17034 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17035 ;;
17036 *) ssldirs="$withval"
17037 ;;
17038 esac
17039
17040else
17041
17042 # if pkg-config is installed and openssl has installed a .pc file,
17043 # then use that information and don't search ssldirs
17044 if test -n "$ac_tool_prefix"; then
17045 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17046set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17048$as_echo_n "checking for $ac_word... " >&6; }
17049if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17050 $as_echo_n "(cached) " >&6
17051else
17052 if test -n "$PKG_CONFIG"; then
17053 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17054else
17055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17056for as_dir in $PATH
17057do
17058 IFS=$as_save_IFS
17059 test -z "$as_dir" && as_dir=.
17060 for ac_exec_ext in '' $ac_executable_extensions; do
17061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17062 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17064 break 2
17065 fi
17066done
17067 done
17068IFS=$as_save_IFS
17069
17070fi
17071fi
17072PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17073if test -n "$PKG_CONFIG"; then
17074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17075$as_echo "$PKG_CONFIG" >&6; }
17076else
17077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17078$as_echo "no" >&6; }
17079fi
17080
17081
17082fi
17083if test -z "$ac_cv_prog_PKG_CONFIG"; then
17084 ac_ct_PKG_CONFIG=$PKG_CONFIG
17085 # Extract the first word of "pkg-config", so it can be a program name with args.
17086set dummy pkg-config; ac_word=$2
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17088$as_echo_n "checking for $ac_word... " >&6; }
17089if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17090 $as_echo_n "(cached) " >&6
17091else
17092 if test -n "$ac_ct_PKG_CONFIG"; then
17093 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17094else
17095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17096for as_dir in $PATH
17097do
17098 IFS=$as_save_IFS
17099 test -z "$as_dir" && as_dir=.
17100 for ac_exec_ext in '' $ac_executable_extensions; do
17101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17102 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17104 break 2
17105 fi
17106done
17107 done
17108IFS=$as_save_IFS
17109
17110fi
17111fi
17112ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17113if test -n "$ac_ct_PKG_CONFIG"; then
17114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17115$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17116else
17117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17118$as_echo "no" >&6; }
17119fi
17120
17121 if test "x$ac_ct_PKG_CONFIG" = x; then
17122 PKG_CONFIG=""
17123 else
17124 case $cross_compiling:$ac_tool_warned in
17125yes:)
17126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17128ac_tool_warned=yes ;;
17129esac
17130 PKG_CONFIG=$ac_ct_PKG_CONFIG
17131 fi
17132else
17133 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17134fi
17135
17136 if test x"$PKG_CONFIG" != x""; then
17137 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17138 if test $? = 0; then
17139 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17140 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17141 found=true
17142 fi
17143 fi
17144
17145 # no such luck; use some default ssldirs
17146 if ! $found; then
17147 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17148 fi
17149
17150
17151fi
17152
17153
17154
17155 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17156 # an 'openssl' subdirectory
17157
17158 if ! $found; then
17159 OPENSSL_INCLUDES=
17160 for ssldir in $ssldirs; do
17161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17162$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17163 if test -f "$ssldir/include/openssl/ssl.h"; then
17164 OPENSSL_INCLUDES="-I$ssldir/include"
17165 OPENSSL_LDFLAGS="-L$ssldir/lib"
17166 OPENSSL_LIBS="-lssl -lcrypto"
17167 found=true
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17169$as_echo "yes" >&6; }
17170 break
17171 else
17172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17173$as_echo "no" >&6; }
17174 fi
17175 done
17176
17177 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17178 # it will just work!
17179 fi
17180
17181 # try the preprocessor and linker with our new flags,
17182 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17183
17184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17185$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17186 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17187 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17188
17189 save_LIBS="$LIBS"
17190 save_LDFLAGS="$LDFLAGS"
17191 save_CPPFLAGS="$CPPFLAGS"
17192 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17193 LIBS="$OPENSSL_LIBS $LIBS"
17194 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17196/* end confdefs.h. */
17197#include <openssl/ssl.h>
17198int
17199main ()
17200{
17201SSL_new(NULL)
17202 ;
17203 return 0;
17204}
17205_ACEOF
17206if ac_fn_c_try_link "$LINENO"; then :
17207
17208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17209$as_echo "yes" >&6; }
17210 have_openssl=yes
17211
17212else
17213
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215$as_echo "no" >&6; }
17216 have_openssl=no
17217
17218fi
17219rm -f core conftest.err conftest.$ac_objext \
17220 conftest$ac_exeext conftest.$ac_ext
17221 CPPFLAGS="$save_CPPFLAGS"
17222 LDFLAGS="$save_LDFLAGS"
17223 LIBS="$save_LIBS"
17224
17225
17226
17227
17228
17229
17230if test "$have_openssl" = yes; then
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17232$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17233
17234 save_LIBS="$LIBS"
17235 save_LDFLAGS="$LDFLAGS"
17236 save_CPPFLAGS="$CPPFLAGS"
17237 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17238 LIBS="$OPENSSL_LIBS $LIBS"
17239 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17240
17241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17242/* end confdefs.h. */
17243
17244 #include <openssl/x509_vfy.h>
17245
17246int
17247main ()
17248{
17249
17250 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17251 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17252 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17253 X509_VERIFY_PARAM_set_hostflags(p, 0);
17254
17255 ;
17256 return 0;
17257}
17258
17259_ACEOF
17260if ac_fn_c_try_link "$LINENO"; then :
17261
17262 ac_cv_has_x509_verify_param_set1_host=yes
17263
17264else
17265
17266 ac_cv_has_x509_verify_param_set1_host=no
17267
17268fi
17269rm -f core conftest.err conftest.$ac_objext \
17270 conftest$ac_exeext conftest.$ac_ext
17271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17272$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17273 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17274
17275$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17276
17277 fi
17278
17279 CPPFLAGS="$save_CPPFLAGS"
17280 LDFLAGS="$save_LDFLAGS"
17281 LIBS="$save_LIBS"
17282fi
17283
Christian Heimes892d66e2018-01-29 14:10:18 +010017284# ssl module default cipher suite string
17285
17286
17287
17288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17289$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17290
17291# Check whether --with-ssl-default-suites was given.
17292if test "${with_ssl_default_suites+set}" = set; then :
17293 withval=$with_ssl_default_suites;
17294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17295$as_echo "$withval" >&6; }
17296case "$withval" in
17297 python)
17298 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17299
17300 ;;
17301 openssl)
17302 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17303
17304 ;;
17305 *)
17306 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17307
17308 cat >>confdefs.h <<_ACEOF
17309#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17310_ACEOF
17311
17312 ;;
17313esac
17314
17315else
17316
17317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17318$as_echo "python" >&6; }
17319$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17320
17321
17322fi
17323
17324
17325
Guido van Rossum627b2d71993-12-24 10:39:16 +000017326# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017327ac_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 +000017328
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017329ac_config_files="$ac_config_files Modules/ld_so_aix"
17330
Martin v. Löwis11437992002-04-12 09:54:03 +000017331cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017332# This file is a shell script that caches the results of configure
17333# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017334# scripts and configure runs, see configure's option --config-cache.
17335# It is not useful on other systems. If it contains results you don't
17336# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017337#
Martin v. Löwis11437992002-04-12 09:54:03 +000017338# config.status only pays attention to the cache file if you give it
17339# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017340#
Skip Montanaro6dead952003-09-25 14:50:04 +000017341# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017342# loading this file, other *unset* `ac_cv_foo' will be assigned the
17343# following values.
17344
17345_ACEOF
17346
Guido van Rossumf78abae1997-01-21 22:02:36 +000017347# The following way of writing the cache mishandles newlines in values,
17348# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017350# Ultrix sh set writes to stderr and can't be redirected directly,
17351# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352(
17353 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17354 eval ac_val=\$$ac_var
17355 case $ac_val in #(
17356 *${as_nl}*)
17357 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17359$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 esac
17361 case $ac_var in #(
17362 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017363 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17364 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 esac ;;
17366 esac
17367 done
17368
Martin v. Löwis11437992002-04-12 09:54:03 +000017369 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17371 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 # `set' does not quote correctly, so add quotes: double-quote
17373 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017375 "s/'/'\\\\''/g;
17376 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017378 *)
17379 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 esac |
17383 sort
17384) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017387 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17390 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17392 :end' >>confcache
17393if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17394 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017395 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017396 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17397$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017398 if test ! -f "$cache_file" || test -h "$cache_file"; then
17399 cat confcache >"$cache_file"
17400 else
17401 case $cache_file in #(
17402 */* | ?:*)
17403 mv -f confcache "$cache_file"$$ &&
17404 mv -f "$cache_file"$$ "$cache_file" ;; #(
17405 *)
17406 mv -f confcache "$cache_file" ;;
17407 esac
17408 fi
17409 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017410 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017411 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17412$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017413 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017414fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017415rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017416
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017417test "x$prefix" = xNONE && prefix=$ac_default_prefix
17418# Let make expand exec_prefix.
17419test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017421DEFS=-DHAVE_CONFIG_H
17422
Skip Montanaro6dead952003-09-25 14:50:04 +000017423ac_libobjs=
17424ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017425U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017426for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17427 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17431 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17433 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017434done
17435LIBOBJS=$ac_libobjs
17436
17437LTLIBOBJS=$ac_ltlibobjs
17438
17439
Martin v. Löwis11437992002-04-12 09:54:03 +000017440
Matthias Kloseb9621712010-04-24 17:59:49 +000017441
Victor Stinnere0be4232011-10-25 13:06:09 +020017442: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017443ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017444ac_clean_files_save=$ac_clean_files
17445ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017446{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17447$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17448as_write_fail=0
17449cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017450#! $SHELL
17451# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017452# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017453# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017454# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017455
Martin v. Löwis11437992002-04-12 09:54:03 +000017456debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017457ac_cs_recheck=false
17458ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017459
Matthias Kloseb9621712010-04-24 17:59:49 +000017460SHELL=\${CONFIG_SHELL-$SHELL}
17461export SHELL
17462_ASEOF
17463cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17464## -------------------- ##
17465## M4sh Initialization. ##
17466## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468# Be more Bourne compatible
17469DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017470if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 emulate sh
17472 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017474 # is contrary to our usage. Disable this feature.
17475 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017477else
Matthias Kloseb9621712010-04-24 17:59:49 +000017478 case `(set -o) 2>/dev/null` in #(
17479 *posix*) :
17480 set -o posix ;; #(
17481 *) :
17482 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017484fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017485
17486
Matthias Kloseb9621712010-04-24 17:59:49 +000017487as_nl='
17488'
17489export as_nl
17490# Printing a long string crashes Solaris 7 /usr/bin/printf.
17491as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17492as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17493as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17494# Prefer a ksh shell builtin over an external printf program on Solaris,
17495# but without wasting forks for bash or zsh.
17496if test -z "$BASH_VERSION$ZSH_VERSION" \
17497 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17498 as_echo='print -r --'
17499 as_echo_n='print -rn --'
17500elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17501 as_echo='printf %s\n'
17502 as_echo_n='printf %s'
17503else
17504 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17505 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17506 as_echo_n='/usr/ucb/echo -n'
17507 else
17508 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17509 as_echo_n_body='eval
17510 arg=$1;
17511 case $arg in #(
17512 *"$as_nl"*)
17513 expr "X$arg" : "X\\(.*\\)$as_nl";
17514 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17515 esac;
17516 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17517 '
17518 export as_echo_n_body
17519 as_echo_n='sh -c $as_echo_n_body as_echo'
17520 fi
17521 export as_echo_body
17522 as_echo='sh -c $as_echo_body as_echo'
17523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017524
17525# The user is always right.
17526if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017527 PATH_SEPARATOR=:
17528 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17529 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17530 PATH_SEPARATOR=';'
17531 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534
17535# IFS
17536# We need space, tab and new line, in precisely that order. Quoting is
17537# there to prevent editors from complaining about space-tab.
17538# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17539# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540IFS=" "" $as_nl"
17541
17542# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017543as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017544case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 *[\\/]* ) as_myself=$0 ;;
17546 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017547for as_dir in $PATH
17548do
17549 IFS=$as_save_IFS
17550 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017551 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17552 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 ;;
17556esac
17557# We did not find ourselves, most probably we were run as `sh COMMAND'
17558# in which case we are not to be found in the path.
17559if test "x$as_myself" = x; then
17560 as_myself=$0
17561fi
17562if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017563 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17564 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565fi
17566
Matthias Kloseb9621712010-04-24 17:59:49 +000017567# Unset variables that we do not need and which cause bugs (e.g. in
17568# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17569# suppresses any "Segmentation fault" message there. '((' could
17570# trigger a bug in pdksh 5.2.14.
17571for as_var in BASH_ENV ENV MAIL MAILPATH
17572do eval test x\${$as_var+set} = xset \
17573 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017574done
17575PS1='$ '
17576PS2='> '
17577PS4='+ '
17578
17579# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017580LC_ALL=C
17581export LC_ALL
17582LANGUAGE=C
17583export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584
Matthias Kloseb9621712010-04-24 17:59:49 +000017585# CDPATH.
17586(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17587
17588
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017589# as_fn_error STATUS ERROR [LINENO LOG_FD]
17590# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017591# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17592# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017593# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017594as_fn_error ()
17595{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017596 as_status=$1; test $as_status -eq 0 && as_status=1
17597 if test "$4"; then
17598 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17599 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017600 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017601 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017602 as_fn_exit $as_status
17603} # as_fn_error
17604
17605
17606# as_fn_set_status STATUS
17607# -----------------------
17608# Set $? to STATUS, without forking.
17609as_fn_set_status ()
17610{
17611 return $1
17612} # as_fn_set_status
17613
17614# as_fn_exit STATUS
17615# -----------------
17616# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17617as_fn_exit ()
17618{
17619 set +e
17620 as_fn_set_status $1
17621 exit $1
17622} # as_fn_exit
17623
17624# as_fn_unset VAR
17625# ---------------
17626# Portably unset VAR.
17627as_fn_unset ()
17628{
17629 { eval $1=; unset $1;}
17630}
17631as_unset=as_fn_unset
17632# as_fn_append VAR VALUE
17633# ----------------------
17634# Append the text in VALUE to the end of the definition contained in VAR. Take
17635# advantage of any shell optimizations that allow amortized linear growth over
17636# repeated appends, instead of the typical quadratic growth present in naive
17637# implementations.
17638if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17639 eval 'as_fn_append ()
17640 {
17641 eval $1+=\$2
17642 }'
17643else
17644 as_fn_append ()
17645 {
17646 eval $1=\$$1\$2
17647 }
17648fi # as_fn_append
17649
17650# as_fn_arith ARG...
17651# ------------------
17652# Perform arithmetic evaluation on the ARGs, and store the result in the
17653# global $as_val. Take advantage of shells that can avoid forks. The arguments
17654# must be portable across $(()) and expr.
17655if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17656 eval 'as_fn_arith ()
17657 {
17658 as_val=$(( $* ))
17659 }'
17660else
17661 as_fn_arith ()
17662 {
17663 as_val=`expr "$@" || test $? -eq 1`
17664 }
17665fi # as_fn_arith
17666
17667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668if expr a : '\(a\)' >/dev/null 2>&1 &&
17669 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17670 as_expr=expr
17671else
17672 as_expr=false
17673fi
17674
17675if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17676 as_basename=basename
17677else
17678 as_basename=false
17679fi
17680
Matthias Kloseb9621712010-04-24 17:59:49 +000017681if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17682 as_dirname=dirname
17683else
17684 as_dirname=false
17685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687as_me=`$as_basename -- "$0" ||
17688$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17689 X"$0" : 'X\(//\)$' \| \
17690 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017691$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692 sed '/^.*\/\([^/][^/]*\)\/*$/{
17693 s//\1/
17694 q
17695 }
17696 /^X\/\(\/\/\)$/{
17697 s//\1/
17698 q
17699 }
17700 /^X\/\(\/\).*/{
17701 s//\1/
17702 q
17703 }
17704 s/.*/./; q'`
17705
Matthias Kloseb9621712010-04-24 17:59:49 +000017706# Avoid depending upon Character Ranges.
17707as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17708as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17709as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17710as_cr_digits='0123456789'
17711as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712
17713ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017714case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017716 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 xy) ECHO_C='\c';;
17719 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17720 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 esac;;
17722*)
17723 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017725
Martin v. Löwis11437992002-04-12 09:54:03 +000017726rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727if test -d conf$$.dir; then
17728 rm -f conf$$.dir/conf$$.file
17729else
17730 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017731 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017733if (echo >conf$$.file) 2>/dev/null; then
17734 if ln -s conf$$.file conf$$ 2>/dev/null; then
17735 as_ln_s='ln -s'
17736 # ... but there are two gotchas:
17737 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17738 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017739 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017740 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017741 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 elif ln conf$$.file conf$$ 2>/dev/null; then
17743 as_ln_s=ln
17744 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017745 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017747else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017748 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17751rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017752
Matthias Kloseb9621712010-04-24 17:59:49 +000017753
17754# as_fn_mkdir_p
17755# -------------
17756# Create "$as_dir" as a directory, including parents if necessary.
17757as_fn_mkdir_p ()
17758{
17759
17760 case $as_dir in #(
17761 -*) as_dir=./$as_dir;;
17762 esac
17763 test -d "$as_dir" || eval $as_mkdir_p || {
17764 as_dirs=
17765 while :; do
17766 case $as_dir in #(
17767 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17768 *) as_qdir=$as_dir;;
17769 esac
17770 as_dirs="'$as_qdir' $as_dirs"
17771 as_dir=`$as_dirname -- "$as_dir" ||
17772$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17773 X"$as_dir" : 'X\(//\)[^/]' \| \
17774 X"$as_dir" : 'X\(//\)$' \| \
17775 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17776$as_echo X"$as_dir" |
17777 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17778 s//\1/
17779 q
17780 }
17781 /^X\(\/\/\)[^/].*/{
17782 s//\1/
17783 q
17784 }
17785 /^X\(\/\/\)$/{
17786 s//\1/
17787 q
17788 }
17789 /^X\(\/\).*/{
17790 s//\1/
17791 q
17792 }
17793 s/.*/./; q'`
17794 test -d "$as_dir" && break
17795 done
17796 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017797 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017798
17799
17800} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017801if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017802 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017803else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017804 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017805 as_mkdir_p=false
17806fi
17807
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017808
17809# as_fn_executable_p FILE
17810# -----------------------
17811# Test if FILE is an executable regular file.
17812as_fn_executable_p ()
17813{
17814 test -f "$1" && test -x "$1"
17815} # as_fn_executable_p
17816as_test_x='test -x'
17817as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017818
17819# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017820as_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 +000017821
17822# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017823as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017824
17825
Martin v. Löwis11437992002-04-12 09:54:03 +000017826exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017827## ----------------------------------- ##
17828## Main body of $CONFIG_STATUS script. ##
17829## ----------------------------------- ##
17830_ASEOF
17831test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017832
Matthias Kloseb9621712010-04-24 17:59:49 +000017833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17834# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017835# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017836# values after options handling.
17837ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017838This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017839generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017840
17841 CONFIG_FILES = $CONFIG_FILES
17842 CONFIG_HEADERS = $CONFIG_HEADERS
17843 CONFIG_LINKS = $CONFIG_LINKS
17844 CONFIG_COMMANDS = $CONFIG_COMMANDS
17845 $ $0 $@
17846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847on `(hostname || uname -n) 2>/dev/null | sed 1q`
17848"
17849
Martin v. Löwis11437992002-04-12 09:54:03 +000017850_ACEOF
17851
Matthias Kloseb9621712010-04-24 17:59:49 +000017852case $ac_config_files in *"
17853"*) set x $ac_config_files; shift; ac_config_files=$*;;
17854esac
17855
17856case $ac_config_headers in *"
17857"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17858esac
17859
17860
17861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017862# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017863config_files="$ac_config_files"
17864config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017869ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017870\`$as_me' instantiates files and other configuration actions
17871from templates according to the current configuration. Unless the files
17872and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
Matthias Kloseb9621712010-04-24 17:59:49 +000017874Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017878 --config print configuration, then exit
17879 -q, --quiet, --silent
17880 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 -d, --debug don't remove temporary files
17882 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017883 --file=FILE[:TEMPLATE]
17884 instantiate the configuration file FILE
17885 --header=FILE[:TEMPLATE]
17886 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017887
17888Configuration files:
17889$config_files
17890
17891Configuration headers:
17892$config_headers
17893
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017894Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017897cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17898ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017899ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017900python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017901configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017902 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017903
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017904Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017905This config.status script is free software; the Free Software Foundation
17906gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907
17908ac_pwd='$ac_pwd'
17909srcdir='$srcdir'
17910INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017911MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017912test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017913_ACEOF
17914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17916# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017917ac_need_defaults=:
17918while test $# != 0
17919do
17920 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017921 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17923 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017924 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017926 --*=)
17927 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17928 ac_optarg=
17929 ac_shift=:
17930 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017932 ac_option=$1
17933 ac_optarg=$2
17934 ac_shift=shift
17935 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 esac
17937
Skip Montanaro6dead952003-09-25 14:50:04 +000017938 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017939 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017940 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17941 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017943 $as_echo "$ac_cs_version"; exit ;;
17944 --config | --confi | --conf | --con | --co | --c )
17945 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 debug=: ;;
17948 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017949 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017950 case $ac_optarg in
17951 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017952 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 esac
17954 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ac_need_defaults=false;;
17956 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017957 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017958 case $ac_optarg in
17959 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17960 esac
17961 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 --he | --h)
17964 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017965 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017966Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017968 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017969 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17970 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17971 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017972
17973 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017974 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017975Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017976
Matthias Kloseb9621712010-04-24 17:59:49 +000017977 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017979
17980 esac
17981 shift
17982done
17983
Skip Montanaro6dead952003-09-25 14:50:04 +000017984ac_configure_extra_args=
17985
17986if $ac_cs_silent; then
17987 exec 6>/dev/null
17988 ac_configure_extra_args="$ac_configure_extra_args --silent"
17989fi
17990
17991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017993if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017994 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017995 shift
17996 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17997 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017999 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018000fi
18001
Martin v. Löwis11437992002-04-12 09:54:03 +000018002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004exec 5>>config.log
18005{
18006 echo
18007 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18008## Running $as_me. ##
18009_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018016
Matthias Kloseb9621712010-04-24 17:59:49 +000018017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018
18019# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018020for ac_config_target in $ac_config_targets
18021do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 case $ac_config_target in
18023 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18024 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18025 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018026 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18027 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018029 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018030 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018031 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018032 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033
Victor Stinnere0be4232011-10-25 13:06:09 +020018034 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 esac
18036done
18037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038
Martin v. Löwis11437992002-04-12 09:54:03 +000018039# If the user did not use the arguments to specify the items to instantiate,
18040# then the envvar interface is used. Set only those that are not.
18041# We use the long form for the default assignment because of an extremely
18042# bizarre bug on SunOS 4.1.3.
18043if $ac_need_defaults; then
18044 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18045 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18046fi
18047
Skip Montanaro6dead952003-09-25 14:50:04 +000018048# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018050# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051# Hook for its removal unless debugging.
18052# Note that there is a small window in which the directory will not be cleaned:
18053# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018054$debug ||
18055{
Victor Stinnere0be4232011-10-25 13:06:09 +020018056 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018058 : "${ac_tmp:=$tmp}"
18059 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018061 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018062}
Martin v. Löwis11437992002-04-12 09:54:03 +000018063# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018064
Martin v. Löwis11437992002-04-12 09:54:03 +000018065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018067 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018068} ||
18069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070 tmp=./conf$$-$RANDOM
18071 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018072} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018073ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018074
Matthias Kloseb9621712010-04-24 17:59:49 +000018075# Set up the scripts for CONFIG_FILES section.
18076# No need to generate them if there are no CONFIG_FILES.
18077# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018079
Matthias Kloseb9621712010-04-24 17:59:49 +000018080
18081ac_cr=`echo X | tr X '\015'`
18082# On cygwin, bash can eat \r inside `` if the user requested igncr.
18083# But we know of no other shell where ac_cr would be empty at this
18084# point, so we can use a bashism as a fallback.
18085if test "x$ac_cr" = x; then
18086 eval ac_cr=\$\'\\r\'
18087fi
18088ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18089if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018090 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018091else
18092 ac_cs_awk_cr=$ac_cr
18093fi
18094
Victor Stinnere0be4232011-10-25 13:06:09 +020018095echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018096_ACEOF
18097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098
Matthias Kloseb9621712010-04-24 17:59:49 +000018099{
18100 echo "cat >conf$$subs.awk <<_ACEOF" &&
18101 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18102 echo "_ACEOF"
18103} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018104 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18105ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106ac_delim='%!_!# '
18107for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018109 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110
Matthias Kloseb9621712010-04-24 17:59:49 +000018111 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18112 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113 break
18114 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018115 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116 else
18117 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018118 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119done
Matthias Kloseb9621712010-04-24 17:59:49 +000018120rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121
Matthias Kloseb9621712010-04-24 17:59:49 +000018122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018123cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018125sed -n '
18126h
18127s/^/S["/; s/!.*/"]=/
18128p
18129g
18130s/^[^!]*!//
18131:repl
18132t repl
18133s/'"$ac_delim"'$//
18134t delim
18135:nl
18136h
18137s/\(.\{148\}\)..*/\1/
18138t more1
18139s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18140p
18141n
18142b repl
18143:more1
18144s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18145p
18146g
18147s/.\{148\}//
18148t nl
18149:delim
18150h
18151s/\(.\{148\}\)..*/\1/
18152t more2
18153s/["\\]/\\&/g; s/^/"/; s/$/"/
18154p
18155b
18156:more2
18157s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18158p
18159g
18160s/.\{148\}//
18161t delim
18162' <conf$$subs.awk | sed '
18163/^[^""]/{
18164 N
18165 s/\n//
18166}
18167' >>$CONFIG_STATUS || ac_write_fail=1
18168rm -f conf$$subs.awk
18169cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18170_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018171cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018172 for (key in S) S_is_set[key] = 1
18173 FS = ""
18174
18175}
18176{
18177 line = $ 0
18178 nfields = split(line, field, "@")
18179 substed = 0
18180 len = length(field[1])
18181 for (i = 2; i < nfields; i++) {
18182 key = field[i]
18183 keylen = length(key)
18184 if (S_is_set[key]) {
18185 value = S[key]
18186 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18187 len += length(value) + length(field[++i])
18188 substed = 1
18189 } else
18190 len += 1 + keylen
18191 }
18192
18193 print line
18194}
18195
18196_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18199if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18200 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18201else
18202 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018203fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018204 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018205_ACEOF
18206
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018207# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18208# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018209# trailing colons and then remove the whole line if VPATH becomes empty
18210# (actually we leave an empty line to preserve line numbers).
18211if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018212 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18213h
18214s///
18215s/^/:/
18216s/[ ]*$/:/
18217s/:\$(srcdir):/:/g
18218s/:\${srcdir}:/:/g
18219s/:@srcdir@:/:/g
18220s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018221s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018222x
18223s/\(=[ ]*\).*/\1/
18224G
18225s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226s/^[^=]*=[ ]*$//
18227}'
18228fi
18229
Matthias Kloseb9621712010-04-24 17:59:49 +000018230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018231fi # test -n "$CONFIG_FILES"
18232
Matthias Kloseb9621712010-04-24 17:59:49 +000018233# Set up the scripts for CONFIG_HEADERS section.
18234# No need to generate them if there are no CONFIG_HEADERS.
18235# This happens for instance with `./config.status Makefile'.
18236if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018237cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018238BEGIN {
18239_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018240
Matthias Kloseb9621712010-04-24 17:59:49 +000018241# Transform confdefs.h into an awk script `defines.awk', embedded as
18242# here-document in config.status, that substitutes the proper values into
18243# config.h.in to produce config.h.
18244
18245# Create a delimiter string that does not exist in confdefs.h, to ease
18246# handling of long lines.
18247ac_delim='%!_!# '
18248for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018249 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18250 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018251 break
18252 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018253 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018254 else
18255 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18256 fi
18257done
18258
18259# For the awk script, D is an array of macro values keyed by name,
18260# likewise P contains macro parameters if any. Preserve backslash
18261# newline sequences.
18262
18263ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18264sed -n '
18265s/.\{148\}/&'"$ac_delim"'/g
18266t rset
18267:rset
18268s/^[ ]*#[ ]*define[ ][ ]*/ /
18269t def
18270d
18271:def
18272s/\\$//
18273t bsnl
18274s/["\\]/\\&/g
18275s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18276D["\1"]=" \3"/p
18277s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18278d
18279:bsnl
18280s/["\\]/\\&/g
18281s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18282D["\1"]=" \3\\\\\\n"\\/p
18283t cont
18284s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18285t cont
18286d
18287:cont
18288n
18289s/.\{148\}/&'"$ac_delim"'/g
18290t clear
18291:clear
18292s/\\$//
18293t bsnlc
18294s/["\\]/\\&/g; s/^/"/; s/$/"/p
18295d
18296:bsnlc
18297s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18298b cont
18299' <confdefs.h | sed '
18300s/'"$ac_delim"'/"\\\
18301"/g' >>$CONFIG_STATUS || ac_write_fail=1
18302
18303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18304 for (key in D) D_is_set[key] = 1
18305 FS = ""
18306}
18307/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18308 line = \$ 0
18309 split(line, arg, " ")
18310 if (arg[1] == "#") {
18311 defundef = arg[2]
18312 mac1 = arg[3]
18313 } else {
18314 defundef = substr(arg[1], 2)
18315 mac1 = arg[2]
18316 }
18317 split(mac1, mac2, "(") #)
18318 macro = mac2[1]
18319 prefix = substr(line, 1, index(line, defundef) - 1)
18320 if (D_is_set[macro]) {
18321 # Preserve the white space surrounding the "#".
18322 print prefix "define", macro P[macro] D[macro]
18323 next
18324 } else {
18325 # Replace #undef with comments. This is necessary, for example,
18326 # in the case of _POSIX_SOURCE, which is predefined and required
18327 # on some systems where configure will not decide to define it.
18328 if (defundef == "undef") {
18329 print "/*", prefix defundef, macro, "*/"
18330 next
18331 }
18332 }
18333}
18334{ print }
18335_ACAWK
18336_ACEOF
18337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018338 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018339fi # test -n "$CONFIG_HEADERS"
18340
18341
18342eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18343shift
18344for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345do
18346 case $ac_tag in
18347 :[FHLC]) ac_mode=$ac_tag; continue;;
18348 esac
18349 case $ac_mode$ac_tag in
18350 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018351 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018352 :[FH]-) ac_tag=-:-;;
18353 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18354 esac
18355 ac_save_IFS=$IFS
18356 IFS=:
18357 set x $ac_tag
18358 IFS=$ac_save_IFS
18359 shift
18360 ac_file=$1
18361 shift
18362
18363 case $ac_mode in
18364 :L) ac_source=$1;;
18365 :[FH])
18366 ac_file_inputs=
18367 for ac_f
18368 do
18369 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018370 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018371 *) # Look for the file first in the build tree, then in the source tree
18372 # (if the path is not absolute). The absolute path cannot be DOS-style,
18373 # because $ac_f cannot contain `:'.
18374 test -f "$ac_f" ||
18375 case $ac_f in
18376 [\\/$]*) false;;
18377 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18378 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018379 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018381 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18382 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383 done
18384
18385 # Let's still pretend it is `configure' which instantiates (i.e., don't
18386 # use $as_me), people would be surprised to read:
18387 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018388 configure_input='Generated from '`
18389 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18390 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018391 if test x"$ac_file" != x-; then
18392 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018393 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18394$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018396 # Neutralize special characters interpreted by sed in replacement strings.
18397 case $configure_input in #(
18398 *\&* | *\|* | *\\* )
18399 ac_sed_conf_input=`$as_echo "$configure_input" |
18400 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18401 *) ac_sed_conf_input=$configure_input;;
18402 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403
18404 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018405 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18406 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407 esac
18408 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018409 esac
18410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018412$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018413 X"$ac_file" : 'X\(//\)[^/]' \| \
18414 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018416$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18418 s//\1/
18419 q
18420 }
18421 /^X\(\/\/\)[^/].*/{
18422 s//\1/
18423 q
18424 }
18425 /^X\(\/\/\)$/{
18426 s//\1/
18427 q
18428 }
18429 /^X\(\/\).*/{
18430 s//\1/
18431 q
18432 }
18433 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018434 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018435 ac_builddir=.
18436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437case "$ac_dir" in
18438.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18439*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018440 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018441 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018442 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443 case $ac_top_builddir_sub in
18444 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18445 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18446 esac ;;
18447esac
18448ac_abs_top_builddir=$ac_pwd
18449ac_abs_builddir=$ac_pwd$ac_dir_suffix
18450# for backward compatibility:
18451ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018452
18453case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456 ac_top_srcdir=$ac_top_builddir_sub
18457 ac_abs_top_srcdir=$ac_pwd ;;
18458 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460 ac_top_srcdir=$srcdir
18461 ac_abs_top_srcdir=$srcdir ;;
18462 *) # Relative name.
18463 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18464 ac_top_srcdir=$ac_top_build_prefix$srcdir
18465 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018466esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018468
Martin v. Löwis11437992002-04-12 09:54:03 +000018469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470 case $ac_mode in
18471 :F)
18472 #
18473 # CONFIG_FILE
18474 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018475
18476 case $INSTALL in
18477 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018479 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018480 ac_MKDIR_P=$MKDIR_P
18481 case $MKDIR_P in
18482 [\\/$]* | ?:[\\/]* ) ;;
18483 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18484 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018485_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486
Matthias Kloseb9621712010-04-24 17:59:49 +000018487cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488# If the template does not know about datarootdir, expand it.
18489# FIXME: This hack should be removed a few years after 2.60.
18490ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018491ac_sed_dataroot='
18492/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018493 p
18494 q
18495}
18496/@datadir@/p
18497/@docdir@/p
18498/@infodir@/p
18499/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018500/@mandir@/p'
18501case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502*datarootdir*) ac_datarootdir_seen=yes;;
18503*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18505$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508 ac_datarootdir_hack='
18509 s&@datadir@&$datadir&g
18510 s&@docdir@&$docdir&g
18511 s&@infodir@&$infodir&g
18512 s&@localedir@&$localedir&g
18513 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515esac
18516_ACEOF
18517
18518# Neutralize VPATH when `$srcdir' = `.'.
18519# Shell code in configure.ac might set extrasub.
18520# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018521cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18522ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018523$extrasub
18524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018525cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018526:t
18527/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018528s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018530s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531s&@srcdir@&$ac_srcdir&;t t
18532s&@abs_srcdir@&$ac_abs_srcdir&;t t
18533s&@top_srcdir@&$ac_top_srcdir&;t t
18534s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18535s&@builddir@&$ac_builddir&;t t
18536s&@abs_builddir@&$ac_abs_builddir&;t t
18537s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18538s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018539s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018541"
Victor Stinnere0be4232011-10-25 13:06:09 +020018542eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18543 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018546 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18547 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18548 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018550which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018551$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018552which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018553
Victor Stinnere0be4232011-10-25 13:06:09 +020018554 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018556 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18557 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018558 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018559 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560 ;;
18561 :H)
18562 #
18563 # CONFIG_HEADER
18564 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018566 {
18567 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018568 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18569 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018570 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018571 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018572 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18573$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018575 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018576 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018577 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 fi
18579 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018580 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018581 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018582 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018583 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018584 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018586
18587 esac
18588
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018589
18590 case $ac_file$ac_mode in
18591 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18592
18593 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594done # for ac_tag
18595
Guido van Rossum627b2d71993-12-24 10:39:16 +000018596
Matthias Kloseb9621712010-04-24 17:59:49 +000018597as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018598_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018599ac_clean_files=$ac_clean_files_save
18600
Matthias Kloseb9621712010-04-24 17:59:49 +000018601test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018602 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018603
Martin v. Löwis11437992002-04-12 09:54:03 +000018604
18605# configure is writing to config.log, and then calls config.status.
18606# config.status does its own redirection, appending to config.log.
18607# Unfortunately, on DOS this fails, as config.log is still kept open
18608# by configure, so config.status won't be able to write to it; its
18609# output is simply discarded. So we exec the FD to /dev/null,
18610# effectively closing config.log, so it can be properly (re)opened and
18611# appended to by config.status. When coming back to configure, we
18612# need to make the FD available again.
18613if test "$no_create" != yes; then
18614 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018615 ac_config_status_args=
18616 test "$silent" = yes &&
18617 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018619 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018620 exec 5>>config.log
18621 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18622 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018623 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018624fi
18625if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18627$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018628fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018629
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018630
Christian Heimes75ed8902013-11-20 01:11:18 +010018631echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018632if test ! -f Modules/Setup.local
18633then
18634 echo "# Edit this file for local setup changes" >Modules/Setup.local
18635fi
18636
Christian Heimes75ed8902013-11-20 01:11:18 +010018637echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018638$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018639 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018640 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018641mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018642
18643if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18644 echo "" >&6
18645 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018646 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 +000018647 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018648 echo "" >&6
18649 echo "" >&6
18650fi
18651