blob: f1979c1b8124c1db51bbb03f3604bf49d509b78c [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
Jesús Cea52d1b862019-09-28 03:44:32 +020010503 if test "$ac_sys_system" = "SunOS"; then
10504 CFLAGS="$CFLAGS -D_REENTRANT"
10505 fi
Martin v. Löwis130fb172001-07-19 11:00:41 +000010506elif test "$ac_cv_kpthread" = "yes"
10507then
10508 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010509 if test "$ac_cv_cxx_thread" = "yes"; then
10510 CXX="$CXX -Kpthread"
10511 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010512 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010513elif test "$ac_cv_kthread" = "yes"
10514then
10515 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010516 if test "$ac_cv_cxx_thread" = "yes"; then
10517 CXX="$CXX -Kthread"
10518 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010519 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010520elif test "$ac_cv_pthread" = "yes"
10521then
10522 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010523 if test "$ac_cv_cxx_thread" = "yes"; then
10524 CXX="$CXX -pthread"
10525 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010526 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010527else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010528 if test ! -z "$withval" -a -d "$withval"
10529 then LDFLAGS="$LDFLAGS -L$withval"
10530 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010531
10532 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010533 # define _POSIX_THREADS in unistd.h. Some apparently don't
10534 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10536$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010539
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010540#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010541#ifdef _POSIX_THREADS
10542yes
10543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010544
10545_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010548 unistd_defines_pthreads=yes
10549else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010550 unistd_defines_pthreads=no
10551fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010552rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10555$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010558
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010559 # Just looking for pthread_create in libpthread is not enough:
10560 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10561 # So we really have to include pthread.h, and then link.
10562 _libs=$LIBS
10563 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10565$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010568
10569#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010570#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010571
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010572void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010573int
10574main ()
10575{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010576
10577pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ;
10579 return 0;
10580}
10581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010582if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10585$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010586 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010587
Guido van Rossum02a1c402000-02-25 19:26:31 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010590 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010592if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010593
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010594 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010595
Guido van Rossumad678af1998-10-02 14:42:15 +000010596else
Guido van Rossumad678af1998-10-02 14:42:15 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10599$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010600if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602else
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010604LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608/* Override any GCC internal prototype to avoid an error.
10609 Use char because int might match the return type of a GCC
10610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010611#ifdef __cplusplus
10612extern "C"
10613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010614char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010615int
10616main ()
10617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010618return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ;
10620 return 0;
10621}
10622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010628rm -f core conftest.err conftest.$ac_objext \
10629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010630LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10633$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010634if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010635
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010636 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010637 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010638
Greg Steinadf63d62000-07-05 10:38:09 +000010639else
Greg Steinadf63d62000-07-05 10:38:09 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10642$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010643if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010645else
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010647LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651/* Override any GCC internal prototype to avoid an error.
10652 Use char because int might match the return type of a GCC
10653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010654#ifdef __cplusplus
10655extern "C"
10656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010657char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010658int
10659main ()
10660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ;
10663 return 0;
10664}
10665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010668else
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010671rm -f core conftest.err conftest.$ac_objext \
10672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010673LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10676$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010677if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010678
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010679 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010680 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010681
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010682else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10685$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010686if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010690LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694/* Override any GCC internal prototype to avoid an error.
10695 Use char because int might match the return type of a GCC
10696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010697#ifdef __cplusplus
10698extern "C"
10699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010700char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010701int
10702main ()
10703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010709if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010710 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010711else
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010714rm -f core conftest.err conftest.$ac_objext \
10715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010716LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10719$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010720if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010722 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010723 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010724
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010725else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10728$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010729if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010731else
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010733LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737/* Override any GCC internal prototype to avoid an error.
10738 Use char because int might match the return type of a GCC
10739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010740#ifdef __cplusplus
10741extern "C"
10742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010743char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010744int
10745main ()
10746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 ;
10749 return 0;
10750}
10751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010754else
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010757rm -f core conftest.err conftest.$ac_objext \
10758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010759LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10762$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010763if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010764
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010765 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010766 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010767
Guido van Rossumb93a8621998-05-07 13:27:32 +000010768else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010769
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010770 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10771
Guido van Rossum2d38f911996-06-26 19:47:01 +000010772fi
10773
Guido van Rossum627b2d71993-12-24 10:39:16 +000010774
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010775fi
10776
Guido van Rossum0be3e491997-05-22 20:33:33 +000010777fi
10778
Guido van Rossum49545951997-12-02 19:28:29 +000010779fi
10780
Guido van Rossumb93a8621998-05-07 13:27:32 +000010781fi
10782
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010784rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010786
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10788$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010789if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791else
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010793LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797/* Override any GCC internal prototype to avoid an error.
10798 Use char because int might match the return type of a GCC
10799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010800#ifdef __cplusplus
10801extern "C"
10802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010803char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010804int
10805main ()
10806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010817rm -f core conftest.err conftest.$ac_objext \
10818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010819LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10822$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010823if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010824
Martin v. Löwis130fb172001-07-19 11:00:41 +000010825 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010826
Guido van Rossum627b2d71993-12-24 10:39:16 +000010827fi
10828
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010829
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010830fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010831
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010832if test "$posix_threads" = "yes"; then
10833 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010836
10837 fi
10838
10839 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10840 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010841 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010842$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010843
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844 ;;
10845 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010846$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847
10848 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010849 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010851
10852 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010853 esac
10854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10856$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010857 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859else
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861 ac_cv_pthread_system_supported=no
10862else
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010864/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010865
10866 #include <stdio.h>
10867 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868 void *foo(void *parm) {
10869 return NULL;
10870 }
10871 main() {
10872 pthread_attr_t attr;
10873 pthread_t id;
10874 if (pthread_attr_init(&attr)) exit(-1);
10875 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10876 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10877 exit(0);
10878 }
10879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010880if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010881 ac_cv_pthread_system_supported=yes
10882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010887fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889
Guido van Rossum627b2d71993-12-24 10:39:16 +000010890fi
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10893$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894 if test "$ac_cv_pthread_system_supported" = "yes"; then
10895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897
10898 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 for ac_func in pthread_sigmask
10900do :
10901 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010902if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010903 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010905_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010906 case $ac_sys_system in
10907 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010910
10911 ;;
10912 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913fi
10914done
10915
pdoxe14679c2017-10-05 00:01:56 -070010916 for ac_func in pthread_getcpuclockid
10917do :
10918 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10919if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10920 cat >>confdefs.h <<_ACEOF
10921#define HAVE_PTHREAD_GETCPUCLOCKID 1
10922_ACEOF
10923
10924fi
10925done
10926
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010927fi
10928
10929
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10933$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010935if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10939$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940 ipv6=no
10941 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10943$as_echo "yes" >&6; }
10944 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945
10946 ipv6=yes
10947 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949else
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953 /* AF_INET6 available check */
10954#include <sys/types.h>
10955#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010956int
10957main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010959int domain = AF_INET6;
10960 ;
10961 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962}
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010964if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10967$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970else
Matthias Kloseb159a552010-04-25 21:00:44 +000010971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010979if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10981$as_echo_n "checking if RFC2553 API is available... " >&6; }
10982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010983/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010984
10985 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010986#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010987int
10988main ()
10989{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010990struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010991 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ;
10993 return 0;
10994}
Matthias Kloseb159a552010-04-25 21:00:44 +000010995
Martin v. Löwis11437992002-04-12 09:54:03 +000010996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010998
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011000$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011001 ipv6=yes
11002
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011003else
Matthias Kloseb159a552010-04-25 21:00:44 +000011004
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011007 ipv6=no
11008
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011011fi
11012
11013if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011015
11016fi
11017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018fi
11019
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011020
11021ipv6type=unknown
11022ipv6lib=none
11023ipv6trylibc=no
11024
11025if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11027$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011028 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11029 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030 case $i in
11031 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035#include <netinet/in.h>
11036#ifdef IPV6_INRIA_VERSION
11037yes
11038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011042 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011044rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045
11046 ;;
11047 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051#include <netinet/in.h>
11052#ifdef __KAME__
11053yes
11054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058 ipv6type=$i;
11059 ipv6lib=inet6
11060 ipv6libdir=/usr/local/v6/lib
11061 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011063rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011064
11065 ;;
11066 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070#include <features.h>
11071#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11072yes
11073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011074_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077 ipv6type=$i;
11078 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081
11082 ;;
11083 linux-inet6)
11084 if test -d /usr/inet6; then
11085 ipv6type=$i
11086 ipv6lib=inet6
11087 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011088 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089 fi
11090 ;;
11091 solaris)
11092 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011093 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094 ipv6type=$i
11095 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096 fi
11097 fi
11098 ;;
11099 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103#include <sys/param.h>
11104#ifdef _TOSHIBA_INET6
11105yes
11106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011107_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110 ipv6type=$i;
11111 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011112 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011114rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115
11116 ;;
11117 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011119/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121#include </usr/local/v6/include/sys/v6config.h>
11122#ifdef __V6D__
11123yes
11124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011125_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011127 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128 ipv6type=$i;
11129 ipv6lib=v6;
11130 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011131 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011133rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134
11135 ;;
11136 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140#include <sys/param.h>
11141#ifdef _ZETA_MINAMI_INET6
11142yes
11143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011144_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147 ipv6type=$i;
11148 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011149 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011151rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152
11153 ;;
11154 esac
11155 if test "$ipv6type" != "unknown"; then
11156 break
11157 fi
11158 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11160$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161fi
11162
11163if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11164 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11165 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11166 echo "using lib$ipv6lib"
11167 else
11168 if test $ipv6trylibc = "yes"; then
11169 echo "using libc"
11170 else
11171 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11172 echo "You need to fetch lib$ipv6lib.a from appropriate"
11173 echo 'ipv6 kit and compile beforehand.'
11174 exit 1
11175 fi
11176 fi
11177fi
11178
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11180$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11182/* end confdefs.h. */
11183 /* CAN_RAW_FD_FRAMES available check */
11184#include <linux/can/raw.h>
11185int
11186main ()
11187{
11188int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11189 ;
11190 return 0;
11191}
11192_ACEOF
11193if ac_fn_c_try_compile "$LINENO"; then :
11194
11195
11196$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11197
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11199$as_echo "yes" >&6; }
11200
11201else
11202
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
11205
11206fi
11207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11208
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011209# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11211$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011214if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215 withval=$with_doc_strings;
11216fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011217
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011218
11219if test -z "$with_doc_strings"
11220then with_doc_strings="yes"
11221fi
11222if test "$with_doc_strings" != "no"
11223then
11224
Matthias Kloseb9621712010-04-24 17:59:49 +000011225$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011226
11227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11229$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011230
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011231# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11233$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011236if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237 withval=$with_pymalloc;
11238fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011239
Neil Schemenauera35c6882001-02-27 04:45:05 +000011240
Neil Schemenauer16c22972002-03-22 15:34:49 +000011241if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011242then
11243 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011244fi
11245if test "$with_pymalloc" != "no"
11246then
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011249
11250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11252$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011253
Nick Coghlan6ea41862017-06-11 13:16:15 +100011254# Check for --with-c-locale-coercion
11255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11256$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11257
11258# Check whether --with-c-locale-coercion was given.
11259if test "${with_c_locale_coercion+set}" = set; then :
11260 withval=$with_c_locale_coercion;
11261fi
11262
11263
11264if test -z "$with_c_locale_coercion"
11265then
11266 with_c_locale_coercion="yes"
11267fi
11268if test "$with_c_locale_coercion" != "no"
11269then
11270
11271$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11272
11273fi
11274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11275$as_echo "$with_c_locale_coercion" >&6; }
11276
Benjamin Peterson05159c42009-12-03 03:01:27 +000011277# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11279$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011280
11281# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011282if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011283 withval=$with_valgrind;
11284else
11285 with_valgrind=no
11286fi
11287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11289$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011290if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 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 +020011292if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295
11296else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011297 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011298
11299fi
11300
11301
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011302 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011303fi
11304
Łukasz Langaa785c872016-09-09 17:37:37 -070011305# Check for DTrace support
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11307$as_echo_n "checking for --with-dtrace... " >&6; }
11308
11309# Check whether --with-dtrace was given.
11310if test "${with_dtrace+set}" = set; then :
11311 withval=$with_dtrace;
11312else
11313 with_dtrace=no
11314fi
11315
11316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11317$as_echo "$with_dtrace" >&6; }
11318
11319
11320
11321
11322
11323DTRACE=
11324DFLAGS=
11325DTRACE_HEADERS=
11326DTRACE_OBJS=
11327
11328if test "$with_dtrace" = "yes"
11329then
11330 # Extract the first word of "dtrace", so it can be a program name with args.
11331set dummy dtrace; ac_word=$2
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11333$as_echo_n "checking for $ac_word... " >&6; }
11334if ${ac_cv_path_DTRACE+:} false; then :
11335 $as_echo_n "(cached) " >&6
11336else
11337 case $DTRACE in
11338 [\\/]* | ?:[\\/]*)
11339 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11340 ;;
11341 *)
11342 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11343for as_dir in $PATH
11344do
11345 IFS=$as_save_IFS
11346 test -z "$as_dir" && as_dir=.
11347 for ac_exec_ext in '' $ac_executable_extensions; do
11348 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11349 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11350 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11351 break 2
11352 fi
11353done
11354 done
11355IFS=$as_save_IFS
11356
11357 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11358 ;;
11359esac
11360fi
11361DTRACE=$ac_cv_path_DTRACE
11362if test -n "$DTRACE"; then
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11364$as_echo "$DTRACE" >&6; }
11365else
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368fi
11369
11370
11371 if test "$DTRACE" = "not found"; then
11372 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11373 fi
11374
11375$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11376
11377 DTRACE_HEADERS="Include/pydtrace_probes.h"
11378
11379 # On OS X, DTrace providers do not need to be explicitly compiled and
11380 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11381 # generation flag '-G'. We check for presence of this flag, rather than
11382 # hardcoding support by OS, in the interest of robustness.
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11384$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11385if ${ac_cv_dtrace_link+:} false; then :
11386 $as_echo_n "(cached) " >&6
11387else
11388 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011389 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011390 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11391 ac_cv_dtrace_link=yes
11392
11393fi
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11395$as_echo "$ac_cv_dtrace_link" >&6; }
11396 if test "$ac_cv_dtrace_link" = "yes"; then
11397 DTRACE_OBJS="Python/pydtrace.o"
11398 fi
11399fi
11400
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011401# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011402
Guido van Rossum98935bf2001-09-05 19:13:16 +000011403DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011404
Guido van Rossume97ee181999-12-20 21:27:22 +000011405# the dlopen() function means we might want to use dynload_shlib.o. some
11406# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011407for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011408do :
11409 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011410if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011413_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011414
Guido van Rossume97ee181999-12-20 21:27:22 +000011415fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011416done
Guido van Rossume97ee181999-12-20 21:27:22 +000011417
Michael W. Hudson54241132001-12-07 15:38:26 +000011418
Guido van Rossume97ee181999-12-20 21:27:22 +000011419# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11420# loading of modules.
11421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11423$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011424if test -z "$DYNLOADFILE"
11425then
11426 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011427 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11428 if test "$ac_cv_func_dlopen" = yes
11429 then DYNLOADFILE="dynload_shlib.o"
11430 else DYNLOADFILE="dynload_aix.o"
11431 fi
11432 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011433 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011434 *)
11435 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11436 # out any dynamic loading
11437 if test "$ac_cv_func_dlopen" = yes
11438 then DYNLOADFILE="dynload_shlib.o"
11439 else DYNLOADFILE="dynload_stub.o"
11440 fi
11441 ;;
11442 esac
11443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11445$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011446if test "$DYNLOADFILE" != "dynload_stub.o"
11447then
Martin v. Löwis11437992002-04-12 09:54:03 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011450
11451fi
11452
Neil Schemenauer4e425612001-06-19 15:44:15 +000011453# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11454
Michael W. Hudson54241132001-12-07 15:38:26 +000011455
Matthias Kloseb9621712010-04-24 17:59:49 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11457$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011458if test -z "$MACHDEP_OBJS"
11459then
Jack Jansene578a632001-08-15 01:27:14 +000011460 MACHDEP_OBJS=$extra_machdep_objs
11461else
11462 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011463fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011464if test -z "$MACHDEP_OBJS"; then
11465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11466$as_echo "none" >&6; }
11467else
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11469$as_echo "$MACHDEP_OBJS" >&6; }
11470fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011471
Guido van Rossum627b2d71993-12-24 10:39:16 +000011472# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011473for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011474 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11475 faccessat fchmod fchmodat fchown fchownat \
Jakub Kulíke20134f2019-09-11 17:11:57 +020011476 fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011477 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011478 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011479 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011480 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011481 if_nameindex \
Benjamin Petersonbed04b62019-09-09 05:13:00 -070011482 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011483 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011484 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011485 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011486 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11487 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011488 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011489 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011490 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011491 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11492 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011493 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011494 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011495 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011496 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011497 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011498do :
11499 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11500ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011501if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011504_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011506fi
11507done
11508
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Benjamin Peterson40caa052018-09-12 15:52:40 -070011510# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11511# links. Some libc implementations have a stub lchmod implementation that always
11512# returns an error.
11513if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011514 for ac_func in lchmod
11515do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011516 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11517if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011518 cat >>confdefs.h <<_ACEOF
11519#define HAVE_LCHMOD 1
11520_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011521
11522fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011523done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011524
11525fi
11526
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011527ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11528 #include <dirent.h>
11529"
11530if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11531
11532$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11533
11534fi
11535
11536
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011537# For some functions, having a definition is not sufficient, since
11538# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11540$as_echo_n "checking for chroot... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011544int
11545main ()
11546{
11547void *x=chroot
11548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011555
Matthias Kloseb159a552010-04-25 21:00:44 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011561
11562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11565$as_echo_n "checking for link... " >&6; }
11566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011567/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569int
11570main ()
11571{
11572void *x=link
11573 ;
11574 return 0;
11575}
11576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011580
Matthias Kloseb159a552010-04-25 21:00:44 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011582$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583else
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11585$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011586
11587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11590$as_echo_n "checking for symlink... " >&6; }
11591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011592/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594int
11595main ()
11596{
11597void *x=symlink
11598 ;
11599 return 0;
11600}
11601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011602if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011605
Matthias Kloseb159a552010-04-25 21:00:44 +000011606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011607$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011611
11612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11615$as_echo_n "checking for fchdir... " >&6; }
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011617/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011618#include <unistd.h>
11619int
11620main ()
11621{
11622void *x=fchdir
11623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011630
Matthias Kloseb159a552010-04-25 21:00:44 +000011631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011632$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11635$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011636
11637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11640$as_echo_n "checking for fsync... " >&6; }
11641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643#include <unistd.h>
11644int
11645main ()
11646{
11647void *x=fsync
11648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011655
Matthias Kloseb159a552010-04-25 21:00:44 +000011656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011657$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011658else
Matthias Kloseb9621712010-04-24 17:59:49 +000011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011661
11662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11665$as_echo_n "checking for fdatasync... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668#include <unistd.h>
11669int
11670main ()
11671{
11672void *x=fdatasync
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011680
Matthias Kloseb159a552010-04-25 21:00:44 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011682$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011686
11687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11690$as_echo_n "checking for epoll... " >&6; }
11691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011692/* end confdefs.h. */
11693#include <sys/epoll.h>
11694int
11695main ()
11696{
11697void *x=epoll_create
11698 ;
11699 return 0;
11700}
11701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011703
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011705
Matthias Kloseb159a552010-04-25 21:00:44 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011707$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011711
11712fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11715$as_echo_n "checking for epoll_create1... " >&6; }
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717/* end confdefs.h. */
11718#include <sys/epoll.h>
11719int
11720main ()
11721{
11722void *x=epoll_create1
11723 ;
11724 return 0;
11725}
11726_ACEOF
11727if ac_fn_c_try_compile "$LINENO"; then :
11728
11729$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11730
11731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11732$as_echo "yes" >&6; }
11733else
11734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
11736
11737fi
11738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11740$as_echo_n "checking for kqueue... " >&6; }
11741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011742/* end confdefs.h. */
11743
11744#include <sys/types.h>
11745#include <sys/event.h>
11746
11747int
11748main ()
11749{
11750int x=kqueue()
11751 ;
11752 return 0;
11753}
11754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011755if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011758
Matthias Kloseb159a552010-04-25 21:00:44 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011761else
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011764
11765fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11768$as_echo_n "checking for prlimit... " >&6; }
11769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11770/* end confdefs.h. */
11771
11772#include <sys/time.h>
11773#include <sys/resource.h>
11774
11775int
11776main ()
11777{
11778void *x=prlimit
11779 ;
11780 return 0;
11781}
11782_ACEOF
11783if ac_fn_c_try_compile "$LINENO"; then :
11784
11785$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11786
11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11788$as_echo "yes" >&6; }
11789else
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
11792
11793fi
11794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11795
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11797$as_echo_n "checking for memfd_create... " >&6; }
11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799/* end confdefs.h. */
11800
11801#ifdef HAVE_SYS_MMAN_H
11802#include <sys/mman.h>
11803#endif
11804#ifdef HAVE_SYS_MEMFD_H
11805#include <sys/memfd.h>
11806#endif
11807
11808int
11809main ()
11810{
11811void *x=memfd_create
11812 ;
11813 return 0;
11814}
11815_ACEOF
11816if ac_fn_c_try_compile "$LINENO"; then :
11817
11818$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11819
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11821$as_echo "yes" >&6; }
11822else
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825
11826fi
11827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11828
Martin v. Löwisd5843682002-11-21 20:41:28 +000011829# On some systems (eg. FreeBSD 5), we would find a definition of the
11830# functions ctermid_r, setgroups in the library, but no prototype
11831# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11832# address to avoid compiler warnings and potential miscompilations
11833# because of the missing prototypes.
11834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11836$as_echo_n "checking for ctermid_r... " >&6; }
11837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011838/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839
Martin v. Löwisd5843682002-11-21 20:41:28 +000011840#include <stdio.h>
11841
Martin v. Löwisd5843682002-11-21 20:41:28 +000011842int
11843main ()
11844{
11845void* p = ctermid_r
11846 ;
11847 return 0;
11848}
11849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011853
Matthias Kloseb159a552010-04-25 21:00:44 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011856else
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11858$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011859
11860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11862
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11864$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011865if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011866 $as_echo_n "(cached) " >&6
11867else
11868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011870#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011871int
11872main ()
11873{
11874void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011875
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011881 ac_cv_flock_decl=yes
11882else
11883 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011884
11885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011887
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011888fi
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11890$as_echo "$ac_cv_flock_decl" >&6; }
11891if test "x${ac_cv_flock_decl}" = xyes; then
11892 for ac_func in flock
11893do :
11894 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011896 cat >>confdefs.h <<_ACEOF
11897#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011898_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011899
Antoine Pitroua3000072010-09-07 14:52:42 +000011900else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011902$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011903if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011904 $as_echo_n "(cached) " >&6
11905else
11906 ac_check_lib_save_LIBS=$LIBS
11907LIBS="-lbsd $LIBS"
11908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11909/* end confdefs.h. */
11910
11911/* Override any GCC internal prototype to avoid an error.
11912 Use char because int might match the return type of a GCC
11913 builtin and then its argument prototype would still apply. */
11914#ifdef __cplusplus
11915extern "C"
11916#endif
11917char flock ();
11918int
11919main ()
11920{
11921return flock ();
11922 ;
11923 return 0;
11924}
11925_ACEOF
11926if ac_fn_c_try_link "$LINENO"; then :
11927 ac_cv_lib_bsd_flock=yes
11928else
11929 ac_cv_lib_bsd_flock=no
11930fi
11931rm -f core conftest.err conftest.$ac_objext \
11932 conftest$ac_exeext conftest.$ac_ext
11933LIBS=$ac_check_lib_save_LIBS
11934fi
11935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11936$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011937if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011938 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011939
11940
11941$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11942
11943
11944fi
11945
11946
11947fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011948done
11949
Antoine Pitroua3000072010-09-07 14:52:42 +000011950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11953$as_echo_n "checking for getpagesize... " >&6; }
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011955/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011957#include <unistd.h>
11958
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011959int
11960main ()
11961{
11962void* p = getpagesize
11963 ;
11964 return 0;
11965}
11966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011970
Matthias Kloseb159a552010-04-25 21:00:44 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011976
11977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011979
Victor Stinner984890f2011-11-24 13:53:38 +010011980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11981$as_echo_n "checking for broken unsetenv... " >&6; }
11982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11983/* end confdefs.h. */
11984
11985#include <stdlib.h>
11986
11987int
11988main ()
11989{
11990int res = unsetenv("DUMMY")
11991 ;
11992 return 0;
11993}
11994_ACEOF
11995if ac_fn_c_try_compile "$LINENO"; then :
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11997$as_echo "no" >&6; }
11998else
11999
12000$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12001
12002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12003$as_echo "yes" >&6; }
12004
12005fi
12006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12007
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012008for ac_prog in true
12009do
12010 # Extract the first word of "$ac_prog", so it can be a program name with args.
12011set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012016else
12017 if test -n "$TRUE"; then
12018 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12019else
12020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12021for as_dir in $PATH
12022do
12023 IFS=$as_save_IFS
12024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012027 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 $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 +000012029 break 2
12030 fi
12031done
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012034
12035fi
12036fi
12037TRUE=$ac_cv_prog_TRUE
12038if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12040$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012044fi
12045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012047 test -n "$TRUE" && break
12048done
12049test -n "$TRUE" || TRUE="/bin/true"
12050
12051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12053$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056else
12057 ac_check_lib_save_LIBS=$LIBS
12058LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062/* Override any GCC internal prototype to avoid an error.
12063 Use char because int might match the return type of a GCC
12064 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065#ifdef __cplusplus
12066extern "C"
12067#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012068char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069int
12070main ()
12071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078 ac_cv_lib_c_inet_aton=yes
12079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012082rm -f core conftest.err conftest.$ac_objext \
12083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012084LIBS=$ac_check_lib_save_LIBS
12085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12087$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012088if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012089 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12092$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012095else
12096 ac_check_lib_save_LIBS=$LIBS
12097LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101/* Override any GCC internal prototype to avoid an error.
12102 Use char because int might match the return type of a GCC
12103 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012104#ifdef __cplusplus
12105extern "C"
12106#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012107char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108int
12109main ()
12110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012112 ;
12113 return 0;
12114}
12115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012117 ac_cv_lib_resolv_inet_aton=yes
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core conftest.err conftest.$ac_objext \
12122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012123LIBS=$ac_check_lib_save_LIBS
12124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12126$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012128 cat >>confdefs.h <<_ACEOF
12129#define HAVE_LIBRESOLV 1
12130_ACEOF
12131
12132 LIBS="-lresolv $LIBS"
12133
12134fi
12135
12136
12137fi
12138
12139
Christian Heimesd0764e22007-12-04 15:00:33 +000012140# On Tru64, chflags seems to be present, but calling it will
12141# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12143$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012148 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012151/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012152
Christian Heimesd0764e22007-12-04 15:00:33 +000012153#include <sys/stat.h>
12154#include <unistd.h>
12155int main(int argc, char*argv[])
12156{
12157 if(chflags(argv[0], 0) != 0)
12158 return 1;
12159 return 0;
12160}
Ned Deily3eb67d52011-06-28 00:00:28 -070012161
Christian Heimesd0764e22007-12-04 15:00:33 +000012162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012164 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12169 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012170fi
12171
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12175$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012176if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012179 ac_cv_have_chflags="yes"
12180else
12181 ac_cv_have_chflags="no"
12182fi
12183
12184fi
12185if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188
12189fi
12190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12192$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012197 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012200/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012201
Christian Heimesd0764e22007-12-04 15:00:33 +000012202#include <sys/stat.h>
12203#include <unistd.h>
12204int main(int argc, char*argv[])
12205{
12206 if(lchflags(argv[0], 0) != 0)
12207 return 1;
12208 return 0;
12209}
Ned Deily3eb67d52011-06-28 00:00:28 -070012210
Christian Heimesd0764e22007-12-04 15:00:33 +000012211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012213 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012214else
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012219fi
12220
12221
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12224$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012225if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012227if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012228 ac_cv_have_lchflags="yes"
12229else
12230 ac_cv_have_lchflags="no"
12231fi
12232
12233fi
12234if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012237
12238fi
12239
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012240case $ac_sys_system/$ac_sys_release in
12241Darwin/*)
12242 _CUR_CFLAGS="${CFLAGS}"
12243 _CUR_LDFLAGS="${LDFLAGS}"
12244 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12245 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12246 ;;
12247esac
12248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12250$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012253else
12254 ac_check_lib_save_LIBS=$LIBS
12255LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012257/* end confdefs.h. */
12258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259/* Override any GCC internal prototype to avoid an error.
12260 Use char because int might match the return type of a GCC
12261 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012262#ifdef __cplusplus
12263extern "C"
12264#endif
12265char inflateCopy ();
12266int
12267main ()
12268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012270 ;
12271 return 0;
12272}
12273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012275 ac_cv_lib_z_inflateCopy=yes
12276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012279rm -f core conftest.err conftest.$ac_objext \
12280 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012281LIBS=$ac_check_lib_save_LIBS
12282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12284$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012288
12289fi
12290
12291
12292case $ac_sys_system/$ac_sys_release in
12293Darwin/*)
12294 CFLAGS="${_CUR_CFLAGS}"
12295 LDFLAGS="${_CUR_LDFLAGS}"
12296 ;;
12297esac
12298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12300$as_echo_n "checking for hstrerror... " >&6; }
12301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012303
Martin v. Löwise9416172003-05-03 10:12:45 +000012304#include <netdb.h>
12305
Martin v. Löwise9416172003-05-03 10:12:45 +000012306int
12307main ()
12308{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012309void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012310 ;
12311 return 0;
12312}
12313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012317
Matthias Kloseb159a552010-04-25 21:00:44 +000012318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012320else
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12322$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012323
12324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325rm -f core conftest.err conftest.$ac_objext \
12326 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12329$as_echo_n "checking for inet_aton... " >&6; }
12330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012332
Martin v. Löwis86d66262006-02-17 08:40:11 +000012333#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012334#include <sys/socket.h>
12335#include <netinet/in.h>
12336#include <arpa/inet.h>
12337
Martin v. Löwise9416172003-05-03 10:12:45 +000012338int
12339main ()
12340{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012341void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012342 ;
12343 return 0;
12344}
12345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012349
Matthias Kloseb159a552010-04-25 21:00:44 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012355
12356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012357rm -f core conftest.err conftest.$ac_objext \
12358 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359
Matthias Kloseb9621712010-04-24 17:59:49 +000012360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12361$as_echo_n "checking for inet_pton... " >&6; }
12362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012363/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012365#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012366#include <sys/socket.h>
12367#include <netinet/in.h>
12368#include <arpa/inet.h>
12369
Martin v. Löwise9416172003-05-03 10:12:45 +000012370int
12371main ()
12372{
12373void* p = inet_pton
12374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012379
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012381
Matthias Kloseb159a552010-04-25 21:00:44 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012384else
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12386$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012387
12388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012390
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012391# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12393$as_echo_n "checking for setgroups... " >&6; }
12394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012396
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012397#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012398#ifdef HAVE_GRP_H
12399#include <grp.h>
12400#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012401
Martin v. Löwisd5843682002-11-21 20:41:28 +000012402int
12403main ()
12404{
12405void* p = setgroups
12406 ;
12407 return 0;
12408}
12409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012413
Matthias Kloseb159a552010-04-25 21:00:44 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012419
12420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012422
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012423# check for openpty and forkpty
12424
12425for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012426do :
12427 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012428if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012431_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012432
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012433else
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12435$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012436if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012438else
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444/* Override any GCC internal prototype to avoid an error.
12445 Use char because int might match the return type of a GCC
12446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012447#ifdef __cplusplus
12448extern "C"
12449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012450char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012451int
12452main ()
12453{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 ;
12456 return 0;
12457}
12458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012466LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12469$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012472 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012473else
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12475$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012476if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012478else
12479 ac_check_lib_save_LIBS=$LIBS
12480LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012482/* end confdefs.h. */
12483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484/* Override any GCC internal prototype to avoid an error.
12485 Use char because int might match the return type of a GCC
12486 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012487#ifdef __cplusplus
12488extern "C"
12489#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012490char openpty ();
12491int
12492main ()
12493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012500 ac_cv_lib_bsd_openpty=yes
12501else
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012504rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012506LIBS=$ac_check_lib_save_LIBS
12507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12509$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012512 LIBS="$LIBS -lbsd"
12513fi
12514
12515
12516fi
12517
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518
12519fi
12520done
12521
12522for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012523do :
12524 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012525if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012528_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012529
Fred Drake8cef4cf2000-06-28 16:40:38 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12532$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012533if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012535else
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012537LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541/* Override any GCC internal prototype to avoid an error.
12542 Use char because int might match the return type of a GCC
12543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012544#ifdef __cplusplus
12545extern "C"
12546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012547char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012548int
12549main ()
12550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012561rm -f core conftest.err conftest.$ac_objext \
12562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012563LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12566$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012567if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012569 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012570else
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12572$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012573if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012575else
12576 ac_check_lib_save_LIBS=$LIBS
12577LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012579/* end confdefs.h. */
12580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581/* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012584#ifdef __cplusplus
12585extern "C"
12586#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012587char forkpty ();
12588int
12589main ()
12590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012592 ;
12593 return 0;
12594}
12595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012596if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012597 ac_cv_lib_bsd_forkpty=yes
12598else
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012601rm -f core conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012603LIBS=$ac_check_lib_save_LIBS
12604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12606$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012609 LIBS="$LIBS -lbsd"
12610fi
12611
12612
12613fi
12614
Fred Drake8cef4cf2000-06-28 16:40:38 +000012615
12616fi
12617done
12618
Jack Jansendd19cf82001-12-06 22:36:17 +000012619
Michael W. Hudson54241132001-12-07 15:38:26 +000012620# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012621for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012622do :
12623 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12624ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012625if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012628_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012629
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631done
12632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012634ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012635if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012636 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012637
Martin v. Löwis1142de32002-03-29 16:28:31 +000012638else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012640 *" dup2.$ac_objext "* ) ;;
12641 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012643esac
12644
Martin v. Löwis1142de32002-03-29 16:28:31 +000012645fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012646
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012647ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012649 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12650
12651else
12652 case " $LIBOBJS " in
12653 *" strdup.$ac_objext "* ) ;;
12654 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12655 ;;
12656esac
12657
12658fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012659
12660
12661for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012662do :
12663 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012671int
12672main ()
12673{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012682
Guido van Rossum627b2d71993-12-24 10:39:16 +000012683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012685
Guido van Rossum627b2d71993-12-24 10:39:16 +000012686fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012687done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012688
Jack Jansen150753c2003-03-29 22:07:47 +000012689for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012690do :
12691 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012692if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012693 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012694#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012697/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012698#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012699int
12700main ()
12701{
12702setpgrp(0,0);
12703 ;
12704 return 0;
12705}
12706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Matthias Kloseb9621712010-04-24 17:59:49 +000012709$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012710
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012713
12714fi
12715done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012716
Michael W. Hudson54241132001-12-07 15:38:26 +000012717
Gregory P. Smith387512c2018-12-30 15:42:32 -080012718# We search for both crypt and crypt_r as one or the other may be defined
12719# This gets us our -lcrypt in LIBS when required on the target platform.
12720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12721$as_echo_n "checking for library containing crypt... " >&6; }
12722if ${ac_cv_search_crypt+:} false; then :
12723 $as_echo_n "(cached) " >&6
12724else
12725 ac_func_search_save_LIBS=$LIBS
12726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727/* end confdefs.h. */
12728
12729/* Override any GCC internal prototype to avoid an error.
12730 Use char because int might match the return type of a GCC
12731 builtin and then its argument prototype would still apply. */
12732#ifdef __cplusplus
12733extern "C"
12734#endif
12735char crypt ();
12736int
12737main ()
12738{
12739return crypt ();
12740 ;
12741 return 0;
12742}
12743_ACEOF
12744for ac_lib in '' crypt; do
12745 if test -z "$ac_lib"; then
12746 ac_res="none required"
12747 else
12748 ac_res=-l$ac_lib
12749 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12750 fi
12751 if ac_fn_c_try_link "$LINENO"; then :
12752 ac_cv_search_crypt=$ac_res
12753fi
12754rm -f core conftest.err conftest.$ac_objext \
12755 conftest$ac_exeext
12756 if ${ac_cv_search_crypt+:} false; then :
12757 break
12758fi
12759done
12760if ${ac_cv_search_crypt+:} false; then :
12761
12762else
12763 ac_cv_search_crypt=no
12764fi
12765rm conftest.$ac_ext
12766LIBS=$ac_func_search_save_LIBS
12767fi
12768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12769$as_echo "$ac_cv_search_crypt" >&6; }
12770ac_res=$ac_cv_search_crypt
12771if test "$ac_res" != no; then :
12772 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12773
12774fi
12775
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12777$as_echo_n "checking for library containing crypt_r... " >&6; }
12778if ${ac_cv_search_crypt_r+:} false; then :
12779 $as_echo_n "(cached) " >&6
12780else
12781 ac_func_search_save_LIBS=$LIBS
12782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12783/* end confdefs.h. */
12784
12785/* Override any GCC internal prototype to avoid an error.
12786 Use char because int might match the return type of a GCC
12787 builtin and then its argument prototype would still apply. */
12788#ifdef __cplusplus
12789extern "C"
12790#endif
12791char crypt_r ();
12792int
12793main ()
12794{
12795return crypt_r ();
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800for ac_lib in '' crypt; do
12801 if test -z "$ac_lib"; then
12802 ac_res="none required"
12803 else
12804 ac_res=-l$ac_lib
12805 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12806 fi
12807 if ac_fn_c_try_link "$LINENO"; then :
12808 ac_cv_search_crypt_r=$ac_res
12809fi
12810rm -f core conftest.err conftest.$ac_objext \
12811 conftest$ac_exeext
12812 if ${ac_cv_search_crypt_r+:} false; then :
12813 break
12814fi
12815done
12816if ${ac_cv_search_crypt_r+:} false; then :
12817
12818else
12819 ac_cv_search_crypt_r=no
12820fi
12821rm conftest.$ac_ext
12822LIBS=$ac_func_search_save_LIBS
12823fi
12824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12825$as_echo "$ac_cv_search_crypt_r" >&6; }
12826ac_res=$ac_cv_search_crypt_r
12827if test "$ac_res" != no; then :
12828 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12829
12830fi
12831
12832
12833ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12834if test "x$ac_cv_func_crypt_r" = xyes; then :
12835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12836/* end confdefs.h. */
12837
12838#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12839#include <crypt.h>
12840
12841int
12842main ()
12843{
12844
12845struct crypt_data d;
12846char *r = crypt_r("", "", &d);
12847
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852if ac_fn_c_try_compile "$LINENO"; then :
12853
12854$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12855
12856fi
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12858
12859fi
12860
12861
Victor Stinnere0be4232011-10-25 13:06:09 +020012862for ac_func in clock_gettime
12863do :
12864 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12865if test "x$ac_cv_func_clock_gettime" = xyes; then :
12866 cat >>confdefs.h <<_ACEOF
12867#define HAVE_CLOCK_GETTIME 1
12868_ACEOF
12869
12870else
12871
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12873$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12874if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12875 $as_echo_n "(cached) " >&6
12876else
12877 ac_check_lib_save_LIBS=$LIBS
12878LIBS="-lrt $LIBS"
12879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880/* end confdefs.h. */
12881
12882/* Override any GCC internal prototype to avoid an error.
12883 Use char because int might match the return type of a GCC
12884 builtin and then its argument prototype would still apply. */
12885#ifdef __cplusplus
12886extern "C"
12887#endif
12888char clock_gettime ();
12889int
12890main ()
12891{
12892return clock_gettime ();
12893 ;
12894 return 0;
12895}
12896_ACEOF
12897if ac_fn_c_try_link "$LINENO"; then :
12898 ac_cv_lib_rt_clock_gettime=yes
12899else
12900 ac_cv_lib_rt_clock_gettime=no
12901fi
12902rm -f core conftest.err conftest.$ac_objext \
12903 conftest$ac_exeext conftest.$ac_ext
12904LIBS=$ac_check_lib_save_LIBS
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12907$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12908if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12909
Victor Stinner7efb8332014-08-29 15:41:08 +020012910 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012911 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12912
12913
12914$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12915
12916
12917fi
12918
12919
12920fi
12921done
12922
12923
12924for ac_func in clock_getres
12925do :
12926 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12927if test "x$ac_cv_func_clock_getres" = xyes; then :
12928 cat >>confdefs.h <<_ACEOF
12929#define HAVE_CLOCK_GETRES 1
12930_ACEOF
12931
12932else
12933
12934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12935$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12936if ${ac_cv_lib_rt_clock_getres+:} false; then :
12937 $as_echo_n "(cached) " >&6
12938else
12939 ac_check_lib_save_LIBS=$LIBS
12940LIBS="-lrt $LIBS"
12941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12942/* end confdefs.h. */
12943
12944/* Override any GCC internal prototype to avoid an error.
12945 Use char because int might match the return type of a GCC
12946 builtin and then its argument prototype would still apply. */
12947#ifdef __cplusplus
12948extern "C"
12949#endif
12950char clock_getres ();
12951int
12952main ()
12953{
12954return clock_getres ();
12955 ;
12956 return 0;
12957}
12958_ACEOF
12959if ac_fn_c_try_link "$LINENO"; then :
12960 ac_cv_lib_rt_clock_getres=yes
12961else
12962 ac_cv_lib_rt_clock_getres=no
12963fi
12964rm -f core conftest.err conftest.$ac_objext \
12965 conftest$ac_exeext conftest.$ac_ext
12966LIBS=$ac_check_lib_save_LIBS
12967fi
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12969$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12970if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12971
12972 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12973
12974
12975fi
12976
12977
12978fi
12979done
12980
12981
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012982for ac_func in clock_settime
12983do :
12984 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12985if test "x$ac_cv_func_clock_settime" = xyes; then :
12986 cat >>confdefs.h <<_ACEOF
12987#define HAVE_CLOCK_SETTIME 1
12988_ACEOF
12989
12990else
12991
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12993$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12994if ${ac_cv_lib_rt_clock_settime+:} false; then :
12995 $as_echo_n "(cached) " >&6
12996else
12997 ac_check_lib_save_LIBS=$LIBS
12998LIBS="-lrt $LIBS"
12999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13000/* end confdefs.h. */
13001
13002/* Override any GCC internal prototype to avoid an error.
13003 Use char because int might match the return type of a GCC
13004 builtin and then its argument prototype would still apply. */
13005#ifdef __cplusplus
13006extern "C"
13007#endif
13008char clock_settime ();
13009int
13010main ()
13011{
13012return clock_settime ();
13013 ;
13014 return 0;
13015}
13016_ACEOF
13017if ac_fn_c_try_link "$LINENO"; then :
13018 ac_cv_lib_rt_clock_settime=yes
13019else
13020 ac_cv_lib_rt_clock_settime=no
13021fi
13022rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext conftest.$ac_ext
13024LIBS=$ac_check_lib_save_LIBS
13025fi
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13027$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13028if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13029
13030 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13031
13032
13033fi
13034
13035
13036fi
13037done
13038
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13041$as_echo_n "checking for major... " >&6; }
13042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013043/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013044
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013045#if defined(MAJOR_IN_MKDEV)
13046#include <sys/mkdev.h>
13047#elif defined(MAJOR_IN_SYSMACROS)
13048#include <sys/sysmacros.h>
13049#else
13050#include <sys/types.h>
13051#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013052
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013053int
13054main ()
13055{
13056
13057 makedev(major(0),minor(0));
13058
13059 ;
13060 return 0;
13061}
13062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013064
13065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13069$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013070
13071else
Skip Montanaro6dead952003-09-25 14:50:04 +000013072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13074$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013075
13076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013077rm -f core conftest.err conftest.$ac_objext \
13078 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013079
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013080# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013081# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13083$as_echo_n "checking for getaddrinfo... " >&6; }
13084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013085/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013086
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013087#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013088#include <sys/socket.h>
13089#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013090#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013091
Martin v. Löwis11437992002-04-12 09:54:03 +000013092int
13093main ()
13094{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013095getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 ;
13097 return 0;
13098}
13099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101 have_getaddrinfo=yes
13102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013105rm -f core conftest.err conftest.$ac_objext \
13106 conftest$ac_exeext conftest.$ac_ext
13107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13108$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109if test $have_getaddrinfo = yes
13110then
Matthias Kloseb9621712010-04-24 17:59:49 +000013111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13112$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013113 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013117
13118if test "${enable_ipv6+set}" = set; then
13119 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13120else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013122fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126
Stefan Krah19c21392012-11-22 23:47:32 +010013127#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013128#include <sys/types.h>
13129#include <netdb.h>
13130#include <string.h>
13131#include <sys/socket.h>
13132#include <netinet/in.h>
13133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135{
13136 int passive, gaierr, inet4 = 0, inet6 = 0;
13137 struct addrinfo hints, *ai, *aitop;
13138 char straddr[INET6_ADDRSTRLEN], strport[16];
13139
13140 for (passive = 0; passive <= 1; passive++) {
13141 memset(&hints, 0, sizeof(hints));
13142 hints.ai_family = AF_UNSPEC;
13143 hints.ai_flags = passive ? AI_PASSIVE : 0;
13144 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013145 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013146 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13147 (void)gai_strerror(gaierr);
13148 goto bad;
13149 }
13150 for (ai = aitop; ai; ai = ai->ai_next) {
13151 if (ai->ai_addr == NULL ||
13152 ai->ai_addrlen == 0 ||
13153 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13154 straddr, sizeof(straddr), strport, sizeof(strport),
13155 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13156 goto bad;
13157 }
13158 switch (ai->ai_family) {
13159 case AF_INET:
13160 if (strcmp(strport, "54321") != 0) {
13161 goto bad;
13162 }
13163 if (passive) {
13164 if (strcmp(straddr, "0.0.0.0") != 0) {
13165 goto bad;
13166 }
13167 } else {
13168 if (strcmp(straddr, "127.0.0.1") != 0) {
13169 goto bad;
13170 }
13171 }
13172 inet4++;
13173 break;
13174 case AF_INET6:
13175 if (strcmp(strport, "54321") != 0) {
13176 goto bad;
13177 }
13178 if (passive) {
13179 if (strcmp(straddr, "::") != 0) {
13180 goto bad;
13181 }
13182 } else {
13183 if (strcmp(straddr, "::1") != 0) {
13184 goto bad;
13185 }
13186 }
13187 inet6++;
13188 break;
13189 case AF_UNSPEC:
13190 goto bad;
13191 break;
13192 default:
13193 /* another family support? */
13194 break;
13195 }
13196 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013197 freeaddrinfo(aitop);
13198 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199 }
13200
13201 if (!(inet4 == 0 || inet4 == 2))
13202 goto bad;
13203 if (!(inet6 == 0 || inet6 == 2))
13204 goto bad;
13205
13206 if (aitop)
13207 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013208 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209
13210 bad:
13211 if (aitop)
13212 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013213 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013214}
13215
Martin v. Löwis11437992002-04-12 09:54:03 +000013216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013217if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013226fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013229
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13231$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13232
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013233if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013234then
13235 if test $ipv6 = yes
13236 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013237 echo 'Fatal: You must get working getaddrinfo() function.'
13238 echo ' or you can specify "--disable-ipv6"'.
13239 exit 1
13240 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013241else
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013244
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013246
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013247for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013248do :
13249 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013250if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013252#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013253_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013255fi
13256done
13257
Michael W. Hudson54241132001-12-07 15:38:26 +000013258
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013259# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13261$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013262if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013266/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267#include <sys/types.h>
13268#include <sys/time.h>
13269#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271int
13272main ()
13273{
13274if ((struct tm *) 0)
13275return 0;
13276 ;
13277 return 0;
13278}
13279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13288$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013289if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292
13293fi
13294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13296$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013301/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302#include <sys/types.h>
13303#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305int
13306main ()
13307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308struct tm tm;
13309 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 ;
13312 return 0;
13313}
13314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316 ac_cv_struct_tm=time.h
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13323$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013324if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327
13328fi
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330ac_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 +000013331#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333"
Victor Stinnere0be4232011-10-25 13:06:09 +020013334if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
13336cat >>confdefs.h <<_ACEOF
13337#define HAVE_STRUCT_TM_TM_ZONE 1
13338_ACEOF
13339
13340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013342
Martin v. Löwis11437992002-04-12 09:54:03 +000013343if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346
13347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13349"
Victor Stinnere0be4232011-10-25 13:06:09 +020013350if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354fi
13355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013357#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358_ACEOF
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13361$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368#if !HAVE_DECL_TZNAME
13369extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
13373main ()
13374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381 ac_cv_var_tzname=yes
13382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385rm -f core conftest.err conftest.$ac_objext \
13386 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13389$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013390 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013393
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394 fi
13395fi
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397ac_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 +020013398if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
13400cat >>confdefs.h <<_ACEOF
13401#define HAVE_STRUCT_STAT_ST_RDEV 1
13402_ACEOF
13403
13404
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013405fi
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407ac_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 +020013408if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410cat >>confdefs.h <<_ACEOF
13411#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13412_ACEOF
13413
13414
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013415fi
13416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417ac_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 +020013418if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013419
13420cat >>confdefs.h <<_ACEOF
13421#define HAVE_STRUCT_STAT_ST_FLAGS 1
13422_ACEOF
13423
13424
13425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427ac_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 +020013428if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013429
13430cat >>confdefs.h <<_ACEOF
13431#define HAVE_STRUCT_STAT_ST_GEN 1
13432_ACEOF
13433
13434
13435fi
13436
Matthias Kloseb9621712010-04-24 17:59:49 +000013437ac_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 +020013438if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013439
13440cat >>confdefs.h <<_ACEOF
13441#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13442_ACEOF
13443
13444
13445fi
13446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447ac_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 +020013448if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013449
Martin v. Löwis11437992002-04-12 09:54:03 +000013450cat >>confdefs.h <<_ACEOF
13451#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13452_ACEOF
13453
13454
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013455fi
13456
Stefan Krah267b6392016-04-26 01:09:18 +020013457ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13458 #include <sys/types.h>
13459 #include <pwd.h>
13460
13461"
13462if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13463
13464cat >>confdefs.h <<_ACEOF
13465#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13466_ACEOF
13467
13468
13469fi
13470ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13471 #include <sys/types.h>
13472 #include <pwd.h>
13473
13474"
13475if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13476
13477cat >>confdefs.h <<_ACEOF
13478#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13479_ACEOF
13480
13481
13482fi
13483
Zachary Ware6a6967e2016-10-01 00:47:27 -050013484# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13485ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13486"
13487if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13488
13489cat >>confdefs.h <<_ACEOF
13490#define HAVE_SIGINFO_T_SI_BAND 1
13491_ACEOF
13492
13493
13494fi
13495
Michael W. Hudson54241132001-12-07 15:38:26 +000013496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13498$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013499if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013501else
Matthias Kloseb159a552010-04-25 21:00:44 +000013502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013505#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515 ac_cv_header_time_altzone=yes
13516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521fi
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13524$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528
13529fi
13530
Guido van Rossumda88dad1995-01-26 00:46:29 +000013531was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13533$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013536
13537#include <sys/types.h>
13538#include <sys/select.h>
13539#include <sys/time.h>
13540
Martin v. Löwis11437992002-04-12 09:54:03 +000013541int
13542main ()
13543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013544;
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ;
13546 return 0;
13547}
13548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
13551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013554 was_it_defined=yes
13555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13559$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13562$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013563if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013567/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013568#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013569int
13570main ()
13571{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013572struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 ;
13574 return 0;
13575}
13576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013578 ac_cv_struct_addrinfo=yes
13579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13583fi
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13586$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013587if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013590
13591fi
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13594$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013595if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013599/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600
13601# include <sys/types.h>
13602# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013603int
13604main ()
13605{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013606struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 ;
13608 return 0;
13609}
13610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612 ac_cv_struct_sockaddr_storage=yes
13613else
Matthias Kloseb9621712010-04-24 17:59:49 +000013614 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13617fi
13618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13620$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624
13625fi
13626
Christian Heimesdffa3942016-09-05 23:54:41 +020013627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13628$as_echo_n "checking for sockaddr_alg... " >&6; }
13629if ${ac_cv_struct_sockaddr_alg+:} false; then :
13630 $as_echo_n "(cached) " >&6
13631else
13632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13633/* end confdefs.h. */
13634
13635# include <sys/types.h>
13636# include <sys/socket.h>
13637# include <linux/if_alg.h>
13638int
13639main ()
13640{
13641struct sockaddr_alg s
13642 ;
13643 return 0;
13644}
13645_ACEOF
13646if ac_fn_c_try_compile "$LINENO"; then :
13647 ac_cv_struct_sockaddr_alg=yes
13648else
13649 ac_cv_struct_sockaddr_alg=no
13650fi
13651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13652fi
13653
13654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13655$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13656if test $ac_cv_struct_sockaddr_alg = yes; then
13657
13658$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13659
13660fi
13661
Guido van Rossum627b2d71993-12-24 10:39:16 +000013662# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13665$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013666if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013671$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013672int
13673main ()
13674{
13675static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013676test_array [0] = 0;
13677return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
13679 ;
13680 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013681}
Martin v. Löwis11437992002-04-12 09:54:03 +000013682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013683if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013684 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013685else
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13691$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694
13695fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13698$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013699if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013701else
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013703/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704
Martin v. Löwis11437992002-04-12 09:54:03 +000013705int
13706main ()
13707{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013708
Martin v. Löwis11437992002-04-12 09:54:03 +000013709#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013710 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013712 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714 char const *const *pcpcc;
13715 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 /* NEC SVR4.0.2 mips cc rejects this. */
13717 struct point {int x, y;};
13718 static struct point const zero = {0,0};
13719 /* AIX XL C 1.02.0.0 rejects this.
13720 It does not let you subtract one const X* pointer from another in
13721 an arm of an if-expression whose if-part is not a constant
13722 expression */
13723 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726 ++pcpcc;
13727 ppc = (char**) pcpcc;
13728 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013729 { /* SCO 3.2v4 cc rejects this sort of thing. */
13730 char tx;
13731 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013735 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 }
13737 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13738 int x[] = {25, 17};
13739 const int *foo = &x[0];
13740 ++foo;
13741 }
13742 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13743 typedef const int *iptr;
13744 iptr p = 0;
13745 ++p;
13746 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013747 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013749 struct s { int j; const int *ap[3]; } bx;
13750 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 }
13752 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13753 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013754 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013757#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013758
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 ;
13760 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013761}
Martin v. Löwis11437992002-04-12 09:54:03 +000013762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013764 ac_cv_c_const=yes
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13771$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775
13776fi
13777
Michael W. Hudson54241132001-12-07 15:38:26 +000013778
Guido van Rossumda88dad1995-01-26 00:46:29 +000013779works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13781$as_echo_n "checking for working signed char... " >&6; }
13782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785int
13786main ()
13787{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 ;
13790 return 0;
13791}
13792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013793if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013794 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013795else
Skip Montanaro6dead952003-09-25 14:50:04 +000013796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013798
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013799
Guido van Rossum7f43da71994-08-01 12:15:30 +000013800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13803$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013804
Guido van Rossumda88dad1995-01-26 00:46:29 +000013805have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13807$as_echo_n "checking for prototypes... " >&6; }
13808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013809/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013810int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013811int
13812main ()
13813{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013814return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 ;
13816 return 0;
13817}
13818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013819if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Matthias Kloseb159a552010-04-25 21:00:44 +000013823 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13827$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828
Guido van Rossumda88dad1995-01-26 00:46:29 +000013829works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13831$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834
13835#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013836int foo(int x, ...) {
13837 va_list va;
13838 va_start(va, x);
13839 va_arg(va, int);
13840 va_arg(va, char *);
13841 va_arg(va, double);
13842 return 0;
13843}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845int
13846main ()
13847{
Guido van Rossum90eea071996-08-30 20:58:57 +000013848return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 ;
13850 return 0;
13851}
13852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
13855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013858 works=yes
13859
Guido van Rossum627b2d71993-12-24 10:39:16 +000013860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13863$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013864
Martin v. Löwisd6320502004-08-12 13:45:08 +000013865# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13867$as_echo_n "checking for socketpair... " >&6; }
13868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013869/* end confdefs.h. */
13870
13871#include <sys/types.h>
13872#include <sys/socket.h>
13873
13874int
13875main ()
13876{
13877void *x=socketpair
13878 ;
13879 return 0;
13880}
13881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013885
Matthias Kloseb159a552010-04-25 21:00:44 +000013886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013887$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013888else
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13890$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013891
13892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013894
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013895# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13897$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013899/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013900#include <sys/types.h>
13901#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013902int
13903main ()
13904{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013905struct sockaddr x;
13906x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 ;
13908 return 0;
13909}
13910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013911if ac_fn_c_try_compile "$LINENO"; then :
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13913$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013916
13917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13919$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013920
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013923
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013924# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013925
13926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013928if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13933$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013934 OLD_CFLAGS=$CFLAGS
13935 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013937/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013938
13939# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941int
13942main ()
13943{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013944
13945 char *name;
13946 struct hostent *he, *res;
13947 char buffer[2048];
13948 int buflen = 2048;
13949 int h_errnop;
13950
13951 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
13953 ;
13954 return 0;
13955}
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013960
Martin v. Löwis11437992002-04-12 09:54:03 +000013961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13965$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013967else
Skip Montanaro6dead952003-09-25 14:50:04 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13970$as_echo "no" >&6; }
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13972$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013974/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013976# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978int
13979main ()
13980{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013981
13982 char *name;
13983 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013984 char buffer[2048];
13985 int buflen = 2048;
13986 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Matthias Kloseb159a552010-04-25 21:00:44 +000013988 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
13990 ;
13991 return 0;
13992}
13993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
Matthias Kloseb159a552010-04-25 21:00:44 +000013999$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14002$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014004else
Skip Montanaro6dead952003-09-25 14:50:04 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14007$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14009$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14011/* end confdefs.h. */
14012
14013# include <netdb.h>
14014
14015int
14016main ()
14017{
14018
14019 char *name;
14020 struct hostent *he;
14021 struct hostent_data data;
14022
14023 (void) gethostbyname_r(name, he, &data);
14024
14025 ;
14026 return 0;
14027}
14028_ACEOF
14029if ac_fn_c_try_compile "$LINENO"; then :
14030
14031 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14032
14033
14034$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14035
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14037$as_echo "yes" >&6; }
14038
14039else
14040
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14042$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000014049
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052 CFLAGS=$OLD_CFLAGS
14053
14054else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 for ac_func in gethostbyname
14057do :
14058 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014059if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014061#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014062_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014065done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066
Michael W. Hudson54241132001-12-07 15:38:26 +000014067
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068fi
14069
Michael W. Hudson54241132001-12-07 15:38:26 +000014070
14071
14072
14073
14074
14075
Guido van Rossum627b2d71993-12-24 10:39:16 +000014076# checks for system services
14077# (none yet)
14078
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014079# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014080ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014081if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014082
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014083else
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14085$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014086if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014087 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088else
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014090LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094/* Override any GCC internal prototype to avoid an error.
14095 Use char because int might match the return type of a GCC
14096 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014097#ifdef __cplusplus
14098extern "C"
14099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014100char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014101int
14102main ()
14103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 ;
14106 return 0;
14107}
14108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014111else
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014114rm -f core conftest.err conftest.$ac_objext \
14115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014116LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14119$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014120if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 cat >>confdefs.h <<_ACEOF
14122#define HAVE_LIBIEEE 1
14123_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014124
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014125 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014126
Guido van Rossum627b2d71993-12-24 10:39:16 +000014127fi
14128
Michael W. Hudson54241132001-12-07 15:38:26 +000014129
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014130fi
14131
Michael W. Hudson54241132001-12-07 15:38:26 +000014132
Guido van Rossum7f43da71994-08-01 12:15:30 +000014133# check for --with-libm=...
14134
Guido van Rossum563e7081996-09-10 18:20:48 +000014135case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014136Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014137*) LIBM=-lm
14138esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14140$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014143if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014145if test "$withval" = no
14146then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14148$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014149elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014150then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14152$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014153else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014154fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014155else
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14157$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158fi
14159
Guido van Rossum7f43da71994-08-01 12:15:30 +000014160
14161# check for --with-libc=...
14162
Matthias Kloseb9621712010-04-24 17:59:49 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14164$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014169if test "$withval" = no
14170then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14172$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014173elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014174then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14176$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014177else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014178fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14181$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182fi
14183
Guido van Rossum7f43da71994-08-01 12:15:30 +000014184
Stefan Krah1919b7e2012-03-21 18:25:23 +010014185# **************************************
14186# * Check for gcc x64 inline assembler *
14187# **************************************
14188
14189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14190$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192/* end confdefs.h. */
14193
14194int
14195main ()
14196{
14197
14198 __asm__ __volatile__ ("movq %rcx, %rax");
14199
14200 ;
14201 return 0;
14202}
14203_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014204if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014205 have_gcc_asm_for_x64=yes
14206else
14207 have_gcc_asm_for_x64=no
14208fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014209rm -f core conftest.err conftest.$ac_objext \
14210 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14212$as_echo "$have_gcc_asm_for_x64" >&6; }
14213if test "$have_gcc_asm_for_x64" = yes
14214then
14215
14216$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14217
14218fi
14219
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014220# **************************************************
14221# * Check for various properties of floating point *
14222# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014223
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14225$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14226if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014228else
14229
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014230
14231ax_cv_c_float_words_bigendian=unknown
14232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014233/* end confdefs.h. */
14234
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014235
14236double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14237
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014238
14239_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014240if ac_fn_c_try_compile "$LINENO"; then :
14241
14242
14243if grep noonsees conftest.$ac_objext >/dev/null ; then
14244 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014245fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014246if grep seesnoon conftest.$ac_objext >/dev/null ; then
14247 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14248 ax_cv_c_float_words_bigendian=no
14249 else
14250 ax_cv_c_float_words_bigendian=unknown
14251 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252fi
14253
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014254
14255fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014257fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14259$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014260
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014261case $ax_cv_c_float_words_bigendian in
14262 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014263
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014264$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14265 ;;
14266 no)
14267 ;;
14268 *)
14269 as_fn_error $? "
14270
14271Unknown float word ordering. You need to manually preset
14272ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14273
14274 " "$LINENO" 5 ;;
14275esac
14276
14277
14278if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014279then
14280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014282
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014283elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014284then
14285
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014286$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14287
14288else
14289 # Some ARM platforms use a mixed-endian representation for doubles.
14290 # While Python doesn't currently have full support for these platforms
14291 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14292 # conversions work.
14293 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14294 # or little, then it must be this?
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014297
14298fi
14299
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014300# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014301# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014302# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014303# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014304# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014305# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014306
14307# This inline assembler syntax may also work for suncc and icc,
14308# so we try it on all platforms.
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14311$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014313/* end confdefs.h. */
14314
14315int
14316main ()
14317{
14318
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014319 unsigned short cw;
14320 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14321 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014322
14323 ;
14324 return 0;
14325}
14326_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014327if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328 have_gcc_asm_for_x87=yes
14329else
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014331fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014332rm -f core conftest.err conftest.$ac_objext \
14333 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14335$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014336if test "$have_gcc_asm_for_x87" = yes
14337then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014340
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014341fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14344$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14346/* end confdefs.h. */
14347
14348int
14349main ()
14350{
14351
14352 unsigned int fpcr;
14353 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14354 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14355
14356 ;
14357 return 0;
14358}
14359_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014360if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014361 have_gcc_asm_for_mc68881=yes
14362else
14363 have_gcc_asm_for_mc68881=no
14364fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014365rm -f core conftest.err conftest.$ac_objext \
14366 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14368$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14369if test "$have_gcc_asm_for_mc68881" = yes
14370then
14371
14372$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14373
14374fi
14375
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014376# Detect whether system arithmetic is subject to x87-style double
14377# rounding issues. The result of this test has little meaning on non
14378# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14379# mode is round-to-nearest and double rounding issues are present, and
14380# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14382$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014383# $BASECFLAGS may affect the result
14384ac_save_cc="$CC"
14385CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014386if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014387 ac_cv_x87_double_rounding=no
14388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014390/* end confdefs.h. */
14391
14392#include <stdlib.h>
14393#include <math.h>
14394int main() {
14395 volatile double x, y, z;
14396 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14397 x = 0.99999999999999989; /* 1-2**-53 */
14398 y = 1./x;
14399 if (y != 1.)
14400 exit(0);
14401 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14402 x = 1e16;
14403 y = 2.99999;
14404 z = x + y;
14405 if (z != 1e16+4.)
14406 exit(0);
14407 /* both tests show evidence of double rounding */
14408 exit(1);
14409}
14410
14411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014412if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014413 ac_cv_x87_double_rounding=no
14414else
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014419fi
14420
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014421CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14423$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014424if test "$ac_cv_x87_double_rounding" = yes
14425then
14426
Matthias Kloseb9621712010-04-24 17:59:49 +000014427$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014428
14429fi
14430
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014431# ************************************
14432# * Check for mathematical functions *
14433# ************************************
14434
14435LIBS_SAVE=$LIBS
14436LIBS="$LIBS $LIBM"
14437
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014438for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14439do :
14440 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14441ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014442if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014443 cat >>confdefs.h <<_ACEOF
14444#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14445_ACEOF
14446
14447fi
14448done
14449
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014450for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014451do :
14452 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14453ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014454if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014455 cat >>confdefs.h <<_ACEOF
14456#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14457_ACEOF
14458
14459fi
14460done
14461
14462ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14463"
Victor Stinnere0be4232011-10-25 13:06:09 +020014464if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014465 ac_have_decl=1
14466else
14467 ac_have_decl=0
14468fi
14469
14470cat >>confdefs.h <<_ACEOF
14471#define HAVE_DECL_ISINF $ac_have_decl
14472_ACEOF
14473ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14474"
Victor Stinnere0be4232011-10-25 13:06:09 +020014475if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014476 ac_have_decl=1
14477else
14478 ac_have_decl=0
14479fi
14480
14481cat >>confdefs.h <<_ACEOF
14482#define HAVE_DECL_ISNAN $ac_have_decl
14483_ACEOF
14484ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14485"
Victor Stinnere0be4232011-10-25 13:06:09 +020014486if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014487 ac_have_decl=1
14488else
14489 ac_have_decl=0
14490fi
14491
14492cat >>confdefs.h <<_ACEOF
14493#define HAVE_DECL_ISFINITE $ac_have_decl
14494_ACEOF
14495
14496
Mark Dickinsona614f042009-11-28 12:48:43 +000014497# For multiprocessing module, check that sem_open
14498# actually works. For FreeBSD versions <= 7.2,
14499# the kernel module that provides POSIX semaphores
14500# isn't loaded by default, so an attempt to call
14501# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14503$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014508 ac_cv_posix_semaphores_enabled=yes
14509else
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014511/* end confdefs.h. */
14512
14513#include <unistd.h>
14514#include <fcntl.h>
14515#include <stdio.h>
14516#include <semaphore.h>
14517#include <sys/stat.h>
14518
14519int main(void) {
14520 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14521 if (a == SEM_FAILED) {
14522 perror("sem_open");
14523 return 1;
14524 }
14525 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014526 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014527 return 0;
14528}
14529
14530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014531if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014532 ac_cv_posix_semaphores_enabled=yes
14533else
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014538fi
14539
14540
Mark Dickinsona614f042009-11-28 12:48:43 +000014541fi
14542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14544$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014545if test $ac_cv_posix_semaphores_enabled = no
14546then
14547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014549
14550fi
14551
Mark Dickinson10683072009-04-18 21:18:19 +000014552# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14554$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014555if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014559 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014562/* end confdefs.h. */
14563
14564#include <unistd.h>
14565#include <fcntl.h>
14566#include <stdio.h>
14567#include <semaphore.h>
14568#include <sys/stat.h>
14569
14570int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014571 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014572 int count;
14573 int res;
14574 if(a==SEM_FAILED){
14575 perror("sem_open");
14576 return 1;
14577
14578 }
14579 res = sem_getvalue(a, &count);
14580 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014581 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014582 return res==-1 ? 1 : 0;
14583}
14584
Mark Dickinson10683072009-04-18 21:18:19 +000014585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014586if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014587 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014588else
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014593fi
14594
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014595
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014596fi
14597
Matthias Kloseb9621712010-04-24 17:59:49 +000014598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14599$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014600if test $ac_cv_broken_sem_getvalue = yes
14601then
14602
Matthias Kloseb9621712010-04-24 17:59:49 +000014603$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014604
14605fi
14606
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014607ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14608"
14609if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14610 ac_have_decl=1
14611else
14612 ac_have_decl=0
14613fi
14614
14615cat >>confdefs.h <<_ACEOF
14616#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14617_ACEOF
14618ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14619"
14620if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14621 ac_have_decl=1
14622else
14623 ac_have_decl=0
14624fi
14625
14626cat >>confdefs.h <<_ACEOF
14627#define HAVE_DECL_RTLD_NOW $ac_have_decl
14628_ACEOF
14629ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14630"
14631if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14632 ac_have_decl=1
14633else
14634 ac_have_decl=0
14635fi
14636
14637cat >>confdefs.h <<_ACEOF
14638#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14639_ACEOF
14640ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14641"
14642if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14643 ac_have_decl=1
14644else
14645 ac_have_decl=0
14646fi
14647
14648cat >>confdefs.h <<_ACEOF
14649#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14650_ACEOF
14651ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14652"
14653if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14654 ac_have_decl=1
14655else
14656 ac_have_decl=0
14657fi
14658
14659cat >>confdefs.h <<_ACEOF
14660#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14661_ACEOF
14662ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14663"
14664if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14665 ac_have_decl=1
14666else
14667 ac_have_decl=0
14668fi
14669
14670cat >>confdefs.h <<_ACEOF
14671#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14672_ACEOF
14673ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14674"
14675if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14676 ac_have_decl=1
14677else
14678 ac_have_decl=0
14679fi
14680
14681cat >>confdefs.h <<_ACEOF
14682#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14683_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014684ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14685"
14686if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14687 ac_have_decl=1
14688else
14689 ac_have_decl=0
14690fi
14691
14692cat >>confdefs.h <<_ACEOF
14693#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14694_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014695
14696
Mark Dickinsonbd792642009-03-18 20:06:12 +000014697# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14699$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014700# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014701if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014702 enableval=$enable_big_digits; case $enable_big_digits in
14703yes)
14704 enable_big_digits=30 ;;
14705no)
14706 enable_big_digits=15 ;;
1470715|30)
14708 ;;
14709*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014710 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 +000014711esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14713$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014714
14715cat >>confdefs.h <<_ACEOF
14716#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14717_ACEOF
14718
14719
14720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14722$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014723fi
14724
14725
Guido van Rossumef2255b2000-03-10 22:30:29 +000014726# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014727ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014728if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
14730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014732
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014733 wchar_h="yes"
14734
Guido van Rossumef2255b2000-03-10 22:30:29 +000014735else
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014737
14738fi
14739
Michael W. Hudson54241132001-12-07 15:38:26 +000014740
Martin v. Löwis11437992002-04-12 09:54:03 +000014741
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014742# determine wchar_t size
14743if test "$wchar_h" = yes
14744then
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14748# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14750$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014751if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014753else
Matthias Kloseb9621712010-04-24 17:59:49 +000014754 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14755"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014756
Martin v. Löwis11437992002-04-12 09:54:03 +000014757else
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 if test "$ac_cv_type_wchar_t" = yes; then
14759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014761as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014762See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763 else
14764 ac_cv_sizeof_wchar_t=0
14765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014767
Martin v. Löwis11437992002-04-12 09:54:03 +000014768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14770$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771
14772
14773
Martin v. Löwis11437992002-04-12 09:54:03 +000014774cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014775#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014776_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014777
Michael W. Hudson54241132001-12-07 15:38:26 +000014778
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014779fi
14780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14782$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014783have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014785/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014786
14787#include <tcl.h>
14788#if TCL_UTF_MAX != 6
14789# error "NOT UCS4_TCL"
14790#endif
14791int
14792main ()
14793{
14794
14795 ;
14796 return 0;
14797}
14798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014800
14801
Matthias Kloseb9621712010-04-24 17:59:49 +000014802$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014803
14804 have_ucs4_tcl=yes
14805
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14809$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014810
Skip Montanaro6dead952003-09-25 14:50:04 +000014811# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014812if test "$wchar_h" = yes
14813then
14814 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14816$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014817 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014819else
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014822 ac_cv_wchar_t_signed=yes
14823else
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014825/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014826
14827 #include <wchar.h>
14828 int main()
14829 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014830 /* Success: exit code 0 */
14831 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014832 }
14833
14834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014836 ac_cv_wchar_t_signed=yes
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014842fi
14843
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014844fi
14845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14847$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848fi
14849
Michael Osipov3738fad2018-08-24 18:17:19 +020014850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14851$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014852# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014853if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014854 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014855then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014856
Matthias Kloseb9621712010-04-24 17:59:49 +000014857$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
Michael Osipov3738fad2018-08-24 18:17:19 +020014859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14860$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014861else
Michael Osipov3738fad2018-08-24 18:17:19 +020014862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14863$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014864fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014865
14866# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14868$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014869if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014871else
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 ac_cv_c_bigendian=unknown
14873 # See if we're dealing with a universal compiler.
14874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14875/* end confdefs.h. */
14876#ifndef __APPLE_CC__
14877 not a universal capable compiler
14878 #endif
14879 typedef int dummy;
14880
Skip Montanaro6dead952003-09-25 14:50:04 +000014881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014882if ac_fn_c_try_compile "$LINENO"; then :
14883
14884 # Check for potential -arch flags. It is not universal unless
14885 # there are at least two -arch flags with different values.
14886 ac_arch=
14887 ac_prev=
14888 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14889 if test -n "$ac_prev"; then
14890 case $ac_word in
14891 i?86 | x86_64 | ppc | ppc64)
14892 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14893 ac_arch=$ac_word
14894 else
14895 ac_cv_c_bigendian=universal
14896 break
14897 fi
14898 ;;
14899 esac
14900 ac_prev=
14901 elif test "x$ac_word" = "x-arch"; then
14902 ac_prev=arch
14903 fi
14904 done
14905fi
14906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14907 if test $ac_cv_c_bigendian = unknown; then
14908 # See if sys/param.h defines the BYTE_ORDER macro.
14909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014910/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914int
14915main ()
14916{
Matthias Kloseb9621712010-04-24 17:59:49 +000014917#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14918 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14919 && LITTLE_ENDIAN)
14920 bogus endian macros
14921 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014922
14923 ;
14924 return 0;
14925}
14926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014927if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014928 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014930/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014931#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014933
Martin v. Löwis11437992002-04-12 09:54:03 +000014934int
14935main ()
14936{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014937#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 not big endian
14939 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
14941 ;
14942 return 0;
14943}
14944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014945if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014946 ac_cv_c_bigendian=yes
14947else
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014951fi
14952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14953 fi
14954 if test $ac_cv_c_bigendian = unknown; then
14955 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014957/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014958#include <limits.h>
14959
Martin v. Löwis11437992002-04-12 09:54:03 +000014960int
14961main ()
14962{
Matthias Kloseb9621712010-04-24 17:59:49 +000014963#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14964 bogus endian macros
14965 #endif
14966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ;
14968 return 0;
14969}
14970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014971if ac_fn_c_try_compile "$LINENO"; then :
14972 # It does; now see whether it defined to _BIG_ENDIAN or not.
14973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14974/* end confdefs.h. */
14975#include <limits.h>
14976
14977int
14978main ()
14979{
14980#ifndef _BIG_ENDIAN
14981 not big endian
14982 #endif
14983
14984 ;
14985 return 0;
14986}
14987_ACEOF
14988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014990else
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14994fi
14995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14996 fi
14997 if test $ac_cv_c_bigendian = unknown; then
14998 # Compile a test program.
14999 if test "$cross_compiling" = yes; then :
15000 # Try to guess by grepping values from an object file.
15001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15002/* end confdefs.h. */
15003short int ascii_mm[] =
15004 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15005 short int ascii_ii[] =
15006 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15007 int use_ascii (int i) {
15008 return ascii_mm[i] + ascii_ii[i];
15009 }
15010 short int ebcdic_ii[] =
15011 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15012 short int ebcdic_mm[] =
15013 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15014 int use_ebcdic (int i) {
15015 return ebcdic_mm[i] + ebcdic_ii[i];
15016 }
15017 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019int
15020main ()
15021{
15022return use_ascii (foo) == use_ebcdic (foo);
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_compile "$LINENO"; then :
15028 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15029 ac_cv_c_bigendian=yes
15030 fi
15031 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15032 if test "$ac_cv_c_bigendian" = unknown; then
15033 ac_cv_c_bigendian=no
15034 else
15035 # finding both strings is unlikely to happen, but who knows?
15036 ac_cv_c_bigendian=unknown
15037 fi
15038 fi
15039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015041else
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015043/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015045int
15046main ()
15047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 /* Are we little or big endian? From Harbison&Steele. */
15050 union
15051 {
15052 long int l;
15053 char c[sizeof (long int)];
15054 } u;
15055 u.l = 1;
15056 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057
15058 ;
15059 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015060}
Martin v. Löwis11437992002-04-12 09:54:03 +000015061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015062if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015063 ac_cv_c_bigendian=no
15064else
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15074$as_echo "$ac_cv_c_bigendian" >&6; }
15075 case $ac_cv_c_bigendian in #(
15076 yes)
15077 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15078;; #(
15079 no)
15080 ;; #(
15081 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015084
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 ;; #(
15086 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015087 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015088 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090
Michael W. Hudson54241132001-12-07 15:38:26 +000015091
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015092# ABI version string for Python extension modules. This appears between the
15093# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15094# from the following attributes which affect the ABI of this Python build (in
15095# this order):
15096#
15097# * The Python implementation (always 'cpython-' for us)
15098# * The major and minor version numbers
15099# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015100#
15101# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015102# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15103# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015104#
15105# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15106# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015107
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15109$as_echo_n "checking ABIFLAGS... " >&6; }
15110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15111$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15113$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015114SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15116$as_echo "$SOABI" >&6; }
15117
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015118# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15119if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015120 # Similar to SOABI but remove "d" flag from ABIFLAGS
15121
15122 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15123
15124cat >>confdefs.h <<_ACEOF
15125#define ALT_SOABI "${ALT_SOABI}"
15126_ACEOF
15127
15128fi
15129
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015130
15131case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015132 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015133 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15134 *)
15135 EXT_SUFFIX=${SHLIB_SUFFIX};;
15136esac
15137
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15139$as_echo_n "checking LDVERSION... " >&6; }
15140LDVERSION='$(VERSION)$(ABIFLAGS)'
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15142$as_echo "$LDVERSION" >&6; }
15143
E. M. Brayc994c8f2019-05-24 17:33:47 +020015144# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015145
E. M. Brayb1fc4172019-05-24 18:39:39 +020015146if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015147 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015148else
15149 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015150fi
15151
doko@python.org87421192013-01-26 11:39:31 +010015152
doko@ubuntu.com55532312016-06-14 08:55:19 +020015153if test x$PLATFORM_TRIPLET = x; then
15154 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15155else
15156 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15157fi
doko@python.org87421192013-01-26 11:39:31 +010015158
15159
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015160# Check whether right shifting a negative integer extends the sign bit
15161# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15163$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015164if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015166else
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015169 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015172/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015173
15174int main()
15175{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015176 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015177}
15178
Martin v. Löwis11437992002-04-12 09:54:03 +000015179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015180if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015181 ac_cv_rshift_extends_sign=yes
15182else
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015187fi
15188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189fi
15190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15192$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015193if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015194then
Martin v. Löwis11437992002-04-12 09:54:03 +000015195
Matthias Kloseb9621712010-04-24 17:59:49 +000015196$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015197
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015198fi
15199
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015200# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15202$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015203if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015204 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015208/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015209#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015210int
15211main ()
15212{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015213
15214 FILE *f = fopen("/dev/null", "r");
15215 flockfile(f);
15216 getc_unlocked(f);
15217 funlockfile(f);
15218
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 ;
15220 return 0;
15221}
15222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015223if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015224 ac_cv_have_getc_unlocked=yes
15225else
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 ac_cv_have_getc_unlocked=no
15227fi
15228rm -f core conftest.err conftest.$ac_objext \
15229 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15233$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015234if test "$ac_cv_have_getc_unlocked" = yes
15235then
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015238
15239fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015240
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015241# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015242# save the value of LIBS so we don't actually link Python with readline
15243LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015244
Gregory P. Smith18820942008-09-07 06:24:49 +000015245# On some systems we need to link readline to a termcap compatible
15246# library. NOTE: Keep the precedence of listed libraries synchronised
15247# with setup.py.
15248py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15250$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015251for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015252 if test -z "$py_libtermcap"; then
15253 READLINE_LIBS="-lreadline"
15254 else
15255 READLINE_LIBS="-lreadline -l$py_libtermcap"
15256 fi
15257 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015259/* end confdefs.h. */
15260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261/* Override any GCC internal prototype to avoid an error.
15262 Use char because int might match the return type of a GCC
15263 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015264#ifdef __cplusplus
15265extern "C"
15266#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015267char readline ();
15268int
15269main ()
15270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015272 ;
15273 return 0;
15274}
15275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015276if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015277 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015279rm -f core conftest.err conftest.$ac_objext \
15280 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015281 if test $py_cv_lib_readline = yes; then
15282 break
15283 fi
15284done
15285# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15286#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015287if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15289$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015290else
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15292$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015293
Matthias Kloseb9621712010-04-24 17:59:49 +000015294$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015295
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015296fi
15297
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015298# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015300/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015301#include <readline/readline.h>
15302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015303if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015304 have_readline=yes
15305else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015306 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015307
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015308fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015309rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015310if test $have_readline = yes
15311then
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015313/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015314#include <readline/readline.h>
15315
15316_ACEOF
15317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015321
15322fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015323rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015324
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015326/* end confdefs.h. */
15327#include <readline/readline.h>
15328
15329_ACEOF
15330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015334
15335fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015336rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015337
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015338fi
15339
Martin v. Löwis0daad592001-09-30 21:09:59 +000015340# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15342$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015343if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015345else
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015347LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351/* Override any GCC internal prototype to avoid an error.
15352 Use char because int might match the return type of a GCC
15353 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015354#ifdef __cplusplus
15355extern "C"
15356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015357char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015358int
15359main ()
15360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 ;
15363 return 0;
15364}
15365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015366if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015367 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015368else
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015371rm -f core conftest.err conftest.$ac_objext \
15372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015373LIBS=$ac_check_lib_save_LIBS
15374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15376$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015377if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015380
Martin v. Löwis0daad592001-09-30 21:09:59 +000015381fi
15382
Michael W. Hudson54241132001-12-07 15:38:26 +000015383
Thomas Wouters89d996e2007-09-08 17:39:28 +000015384# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15386$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015387if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015389else
15390 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015391LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015393/* end confdefs.h. */
15394
15395/* Override any GCC internal prototype to avoid an error.
15396 Use char because int might match the return type of a GCC
15397 builtin and then its argument prototype would still apply. */
15398#ifdef __cplusplus
15399extern "C"
15400#endif
15401char rl_completion_display_matches_hook ();
15402int
15403main ()
15404{
15405return rl_completion_display_matches_hook ();
15406 ;
15407 return 0;
15408}
15409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015410if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015411 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15412else
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015415rm -f core conftest.err conftest.$ac_objext \
15416 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015417LIBS=$ac_check_lib_save_LIBS
15418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15420$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015421if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015422
Matthias Kloseb9621712010-04-24 17:59:49 +000015423$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015424
15425fi
15426
15427
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015428# also in 4.0, but not in editline
15429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15430$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15431if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15432 $as_echo_n "(cached) " >&6
15433else
15434 ac_check_lib_save_LIBS=$LIBS
15435LIBS="-lreadline $READLINE_LIBS $LIBS"
15436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15437/* end confdefs.h. */
15438
15439/* Override any GCC internal prototype to avoid an error.
15440 Use char because int might match the return type of a GCC
15441 builtin and then its argument prototype would still apply. */
15442#ifdef __cplusplus
15443extern "C"
15444#endif
15445char rl_resize_terminal ();
15446int
15447main ()
15448{
15449return rl_resize_terminal ();
15450 ;
15451 return 0;
15452}
15453_ACEOF
15454if ac_fn_c_try_link "$LINENO"; then :
15455 ac_cv_lib_readline_rl_resize_terminal=yes
15456else
15457 ac_cv_lib_readline_rl_resize_terminal=no
15458fi
15459rm -f core conftest.err conftest.$ac_objext \
15460 conftest$ac_exeext conftest.$ac_ext
15461LIBS=$ac_check_lib_save_LIBS
15462fi
15463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15464$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15465if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15466
15467$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15468
15469fi
15470
15471
Martin v. Löwis0daad592001-09-30 21:09:59 +000015472# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15474$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015475if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015477else
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015479LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483/* Override any GCC internal prototype to avoid an error.
15484 Use char because int might match the return type of a GCC
15485 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015486#ifdef __cplusplus
15487extern "C"
15488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015489char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015490int
15491main ()
15492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015494 ;
15495 return 0;
15496}
15497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015500else
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015503rm -f core conftest.err conftest.$ac_objext \
15504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015505LIBS=$ac_check_lib_save_LIBS
15506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15508$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015509if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015512
Guido van Rossum353ae582001-07-10 16:45:32 +000015513fi
15514
Jack Jansendd19cf82001-12-06 22:36:17 +000015515
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015516# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015518/* end confdefs.h. */
15519#include <readline/readline.h>
15520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015521if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015522 have_readline=yes
15523else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015524 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015525
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015526fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015527rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015528if test $have_readline = yes
15529then
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015531/* end confdefs.h. */
15532#include <readline/readline.h>
15533
15534_ACEOF
15535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015539
15540fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015541rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015542
15543fi
15544
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15546$as_echo_n "checking for append_history in -lreadline... " >&6; }
15547if ${ac_cv_lib_readline_append_history+:} false; then :
15548 $as_echo_n "(cached) " >&6
15549else
15550 ac_check_lib_save_LIBS=$LIBS
15551LIBS="-lreadline $READLINE_LIBS $LIBS"
15552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15553/* end confdefs.h. */
15554
15555/* Override any GCC internal prototype to avoid an error.
15556 Use char because int might match the return type of a GCC
15557 builtin and then its argument prototype would still apply. */
15558#ifdef __cplusplus
15559extern "C"
15560#endif
15561char append_history ();
15562int
15563main ()
15564{
15565return append_history ();
15566 ;
15567 return 0;
15568}
15569_ACEOF
15570if ac_fn_c_try_link "$LINENO"; then :
15571 ac_cv_lib_readline_append_history=yes
15572else
15573 ac_cv_lib_readline_append_history=no
15574fi
15575rm -f core conftest.err conftest.$ac_objext \
15576 conftest$ac_exeext conftest.$ac_ext
15577LIBS=$ac_check_lib_save_LIBS
15578fi
15579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15580$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15581if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15582
15583$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15584
15585fi
15586
15587
Martin v. Löwis82bca632006-02-10 20:49:30 +000015588# End of readline checks: restore LIBS
15589LIBS=$LIBS_no_readline
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15592$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015593if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015595else
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015598 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015599else
Matthias Kloseb9621712010-04-24 17:59:49 +000015600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015601/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015602
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015603#include <stdlib.h>
15604#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015605int main()
15606{
15607 int val1 = nice(1);
15608 if (val1 != -1 && val1 == nice(2))
15609 exit(0);
15610 exit(1);
15611}
15612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015614if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015615 ac_cv_broken_nice=yes
15616else
Matthias Kloseb9621712010-04-24 17:59:49 +000015617 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15620 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015621fi
15622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623fi
15624
Matthias Kloseb9621712010-04-24 17:59:49 +000015625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15626$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015627if test "$ac_cv_broken_nice" = yes
15628then
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Matthias Kloseb9621712010-04-24 17:59:49 +000015630$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015631
15632fi
15633
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15635$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015636if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015637 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015638else
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015640 ac_cv_broken_poll=no
15641else
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015643/* end confdefs.h. */
15644
15645#include <poll.h>
15646
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015647int main()
15648{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015649 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015650 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015651
15652 close (42);
15653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015654 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015655 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015656 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015657 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015658 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015660 return 1;
15661}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015662
15663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015664if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015665 ac_cv_broken_poll=yes
15666else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15670 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015672
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015673fi
15674
Matthias Kloseb9621712010-04-24 17:59:49 +000015675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15676$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015677if test "$ac_cv_broken_poll" = yes
15678then
15679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015681
15682fi
15683
Martin v. Löwis1d459062005-03-14 21:23:33 +000015684# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15686$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015687if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015688 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015689else
15690
Matthias Kloseb9621712010-04-24 17:59:49 +000015691if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015692 ac_cv_working_tzset=no
15693else
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015695/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015696
15697#include <stdlib.h>
15698#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015699#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015700
15701#if HAVE_TZNAME
15702extern char *tzname[];
15703#endif
15704
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015705int main()
15706{
Brett Cannon18367812003-09-19 00:59:16 +000015707 /* Note that we need to ensure that not only does tzset(3)
15708 do 'something' with localtime, but it works as documented
15709 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015710 This includes making sure that tzname is set properly if
15711 tm->tm_zone does not exist since it is the alternative way
15712 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015713
15714 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015715 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015716 */
15717
Martin v. Löwis1d459062005-03-14 21:23:33 +000015718 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015719 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15720
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015721 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015722 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015723 if (localtime(&groundhogday)->tm_hour != 0)
15724 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015725#if HAVE_TZNAME
15726 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15727 if (strcmp(tzname[0], "UTC") ||
15728 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15729 exit(1);
15730#endif
Brett Cannon18367812003-09-19 00:59:16 +000015731
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015732 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015734 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015735 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015736#if HAVE_TZNAME
15737 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15738 exit(1);
15739#endif
Brett Cannon18367812003-09-19 00:59:16 +000015740
15741 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15742 tzset();
15743 if (localtime(&groundhogday)->tm_hour != 11)
15744 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015745#if HAVE_TZNAME
15746 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15747 exit(1);
15748#endif
15749
15750#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015751 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15752 exit(1);
15753 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15754 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015755#endif
Brett Cannon18367812003-09-19 00:59:16 +000015756
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015757 exit(0);
15758}
15759
15760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015761if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015762 ac_cv_working_tzset=yes
15763else
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015768fi
15769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770fi
15771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15773$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015774if test "$ac_cv_working_tzset" = yes
15775then
15776
Matthias Kloseb9621712010-04-24 17:59:49 +000015777$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015778
15779fi
15780
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015781# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15783$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015784if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015785 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015786else
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015789#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015790int
15791main ()
15792{
15793
15794struct stat st;
15795st.st_mtim.tv_nsec = 1;
15796
15797 ;
15798 return 0;
15799}
15800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015801if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015802 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015803else
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15807fi
15808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15810$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015811if test "$ac_cv_stat_tv_nsec" = yes
15812then
15813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015815
15816fi
15817
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015818# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15820$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015821if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015822 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015823else
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015825/* end confdefs.h. */
15826#include <sys/stat.h>
15827int
15828main ()
15829{
15830
15831struct stat st;
15832st.st_mtimespec.tv_nsec = 1;
15833
15834 ;
15835 return 0;
15836}
15837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015839 ac_cv_stat_tv_nsec2=yes
15840else
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15844fi
15845
Matthias Kloseb9621712010-04-24 17:59:49 +000015846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15847$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015848if test "$ac_cv_stat_tv_nsec2" = yes
15849then
15850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015852
15853fi
15854
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015855# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015856ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015857if test "$cross_compiling" = no; then
15858 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15859fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015860
15861for ac_header in curses.h ncurses.h
15862do :
15863 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15864ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15865if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15866 cat >>confdefs.h <<_ACEOF
15867#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15868_ACEOF
15869
15870fi
15871
15872done
15873
15874
15875# On Solaris, term.h requires curses.h
15876for ac_header in term.h
15877do :
15878 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15879#ifdef HAVE_CURSES_H
15880#include <curses.h>
15881#endif
15882
15883"
15884if test "x$ac_cv_header_term_h" = xyes; then :
15885 cat >>confdefs.h <<_ACEOF
15886#define HAVE_TERM_H 1
15887_ACEOF
15888
15889fi
15890
15891done
15892
15893
Jack Jansen666b1e72001-10-31 12:11:48 +000015894# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15896$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015897if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015898 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015899else
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015901/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015902#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015903int
15904main ()
15905{
Jack Jansen666b1e72001-10-31 12:11:48 +000015906
15907 int rtn;
15908 rtn = mvwdelch(0,0,0);
15909
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 ;
15911 return 0;
15912}
15913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015914if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015915 ac_cv_mvwdelch_is_expression=yes
15916else
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15920fi
15921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15923$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015924
15925if test "$ac_cv_mvwdelch_is_expression" = yes
15926then
Martin v. Löwis11437992002-04-12 09:54:03 +000015927
Matthias Kloseb9621712010-04-24 17:59:49 +000015928$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015929
15930fi
15931
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015932# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15933# structs since version 5.7. If the macro is defined as zero before including
15934# [n]curses.h, ncurses will expose fields of the structs regardless of the
15935# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15937$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015938if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015939 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015940else
Matthias Kloseb9621712010-04-24 17:59:49 +000015941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015942/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015943
15944 #define NCURSES_OPAQUE 0
15945 #include <curses.h>
15946
Martin v. Löwis11437992002-04-12 09:54:03 +000015947int
15948main ()
15949{
Jack Jansen666b1e72001-10-31 12:11:48 +000015950
15951 WINDOW *w;
15952 w->_flags = 0;
15953
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 ;
15955 return 0;
15956}
15957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015958if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015959 ac_cv_window_has_flags=yes
15960else
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15964fi
15965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15967$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015968
Jack Jansen666b1e72001-10-31 12:11:48 +000015969
15970if test "$ac_cv_window_has_flags" = yes
15971then
Martin v. Löwis11437992002-04-12 09:54:03 +000015972
Matthias Kloseb9621712010-04-24 17:59:49 +000015973$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015974
15975fi
15976
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15978$as_echo_n "checking for is_pad... " >&6; }
15979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15980/* end confdefs.h. */
15981#include <curses.h>
15982int
15983main ()
15984{
15985
15986#ifndef is_pad
15987void *x=is_pad
15988#endif
15989
15990 ;
15991 return 0;
15992}
15993_ACEOF
15994if ac_fn_c_try_compile "$LINENO"; then :
15995
15996$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15997
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15999$as_echo "yes" >&6; }
16000else
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16002$as_echo "no" >&6; }
16003
16004fi
16005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16006
Matthias Kloseb9621712010-04-24 17:59:49 +000016007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16008$as_echo_n "checking for is_term_resized... " >&6; }
16009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016010/* end confdefs.h. */
16011#include <curses.h>
16012int
16013main ()
16014{
16015void *x=is_term_resized
16016 ;
16017 return 0;
16018}
16019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016021
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016023
Matthias Kloseb159a552010-04-25 21:00:44 +000016024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016025$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016026else
Matthias Kloseb9621712010-04-24 17:59:49 +000016027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16028$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016029
16030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16034$as_echo_n "checking for resize_term... " >&6; }
16035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016036/* end confdefs.h. */
16037#include <curses.h>
16038int
16039main ()
16040{
16041void *x=resize_term
16042 ;
16043 return 0;
16044}
16045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016046if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016049
Matthias Kloseb159a552010-04-25 21:00:44 +000016050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016051$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016052else
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16054$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016055
16056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16058
Matthias Kloseb9621712010-04-24 17:59:49 +000016059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16060$as_echo_n "checking for resizeterm... " >&6; }
16061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016062/* end confdefs.h. */
16063#include <curses.h>
16064int
16065main ()
16066{
16067void *x=resizeterm
16068 ;
16069 return 0;
16070}
16071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016072if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016073
Matthias Kloseb9621712010-04-24 17:59:49 +000016074$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016075
Matthias Kloseb159a552010-04-25 21:00:44 +000016076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016077$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016078else
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16080$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016081
16082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016084
16085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16086$as_echo_n "checking for immedok... " >&6; }
16087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16088/* end confdefs.h. */
16089#include <curses.h>
16090int
16091main ()
16092{
16093
16094#ifndef immedok
16095void *x=immedok
16096#endif
16097
16098 ;
16099 return 0;
16100}
16101_ACEOF
16102if ac_fn_c_try_compile "$LINENO"; then :
16103
16104$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16105
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16107$as_echo "yes" >&6; }
16108else
16109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16110$as_echo "no" >&6; }
16111
16112fi
16113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16114
16115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16116$as_echo_n "checking for syncok... " >&6; }
16117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16118/* end confdefs.h. */
16119#include <curses.h>
16120int
16121main ()
16122{
16123
16124#ifndef syncok
16125void *x=syncok
16126#endif
16127
16128 ;
16129 return 0;
16130}
16131_ACEOF
16132if ac_fn_c_try_compile "$LINENO"; then :
16133
16134$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16135
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16137$as_echo "yes" >&6; }
16138else
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16140$as_echo "no" >&6; }
16141
16142fi
16143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16146$as_echo_n "checking for wchgat... " >&6; }
16147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148/* end confdefs.h. */
16149#include <curses.h>
16150int
16151main ()
16152{
16153
16154#ifndef wchgat
16155void *x=wchgat
16156#endif
16157
16158 ;
16159 return 0;
16160}
16161_ACEOF
16162if ac_fn_c_try_compile "$LINENO"; then :
16163
16164$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16165
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16167$as_echo "yes" >&6; }
16168else
16169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16170$as_echo "no" >&6; }
16171
16172fi
16173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16174
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16176$as_echo_n "checking for filter... " >&6; }
16177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178/* end confdefs.h. */
16179#include <curses.h>
16180int
16181main ()
16182{
16183
16184#ifndef filter
16185void *x=filter
16186#endif
16187
16188 ;
16189 return 0;
16190}
16191_ACEOF
16192if ac_fn_c_try_compile "$LINENO"; then :
16193
16194$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16195
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16197$as_echo "yes" >&6; }
16198else
16199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16200$as_echo "no" >&6; }
16201
16202fi
16203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16204
16205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16206$as_echo_n "checking for has_key... " >&6; }
16207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16208/* end confdefs.h. */
16209#include <curses.h>
16210int
16211main ()
16212{
16213
16214#ifndef has_key
16215void *x=has_key
16216#endif
16217
16218 ;
16219 return 0;
16220}
16221_ACEOF
16222if ac_fn_c_try_compile "$LINENO"; then :
16223
16224$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16225
16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16227$as_echo "yes" >&6; }
16228else
16229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16230$as_echo "no" >&6; }
16231
16232fi
16233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16234
16235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16236$as_echo_n "checking for typeahead... " >&6; }
16237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238/* end confdefs.h. */
16239#include <curses.h>
16240int
16241main ()
16242{
16243
16244#ifndef typeahead
16245void *x=typeahead
16246#endif
16247
16248 ;
16249 return 0;
16250}
16251_ACEOF
16252if ac_fn_c_try_compile "$LINENO"; then :
16253
16254$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16255
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16257$as_echo "yes" >&6; }
16258else
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16260$as_echo "no" >&6; }
16261
16262fi
16263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16264
16265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16266$as_echo_n "checking for use_env... " >&6; }
16267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268/* end confdefs.h. */
16269#include <curses.h>
16270int
16271main ()
16272{
16273
16274#ifndef use_env
16275void *x=use_env
16276#endif
16277
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282if ac_fn_c_try_compile "$LINENO"; then :
16283
16284$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16285
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16287$as_echo "yes" >&6; }
16288else
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16290$as_echo "no" >&6; }
16291
16292fi
16293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016294# last curses configure check
16295CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16298$as_echo "$as_me: checking for device files" >&6;}
16299
16300if test "x$cross_compiling" = xyes; then
16301 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16303$as_echo_n "checking for /dev/ptmx... " >&6; }
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16305$as_echo "not set" >&6; }
16306 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16307 fi
16308 if test "${ac_cv_file__dev_ptc+set}" != set; then
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16310$as_echo_n "checking for /dev/ptc... " >&6; }
16311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16312$as_echo "not set" >&6; }
16313 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16314 fi
16315fi
16316
Matthias Kloseb9621712010-04-24 17:59:49 +000016317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16318$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016319if ${ac_cv_file__dev_ptmx+:} false; then :
16320 $as_echo_n "(cached) " >&6
16321else
16322 test "$cross_compiling" = yes &&
16323 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16324if test -r "/dev/ptmx"; then
16325 ac_cv_file__dev_ptmx=yes
16326else
16327 ac_cv_file__dev_ptmx=no
16328fi
16329fi
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16331$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16332if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016333
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016334fi
16335
16336if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016337
Matthias Kloseb9621712010-04-24 17:59:49 +000016338$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016339
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16342$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016343if ${ac_cv_file__dev_ptc+:} false; then :
16344 $as_echo_n "(cached) " >&6
16345else
16346 test "$cross_compiling" = yes &&
16347 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16348if test -r "/dev/ptc"; then
16349 ac_cv_file__dev_ptc=yes
16350else
16351 ac_cv_file__dev_ptc=no
16352fi
16353fi
16354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16355$as_echo "$ac_cv_file__dev_ptc" >&6; }
16356if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016357
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016358fi
16359
16360if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016361
Matthias Kloseb9621712010-04-24 17:59:49 +000016362$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016363
Neal Norwitz865400f2003-03-21 01:42:58 +000016364fi
16365
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016366if test $ac_sys_system = Darwin
16367then
16368 LIBS="$LIBS -framework CoreFoundation"
16369fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016370
Matthias Kloseb9621712010-04-24 17:59:49 +000016371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16372$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016373if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016374 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016375else
Matthias Kloseb9621712010-04-24 17:59:49 +000016376 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016377 ac_cv_have_size_t_format="cross -- assuming yes"
16378
Thomas Wouters477c8d52006-05-27 19:21:47 +000016379else
Matthias Kloseb9621712010-04-24 17:59:49 +000016380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016381/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016382
Thomas Wouters477c8d52006-05-27 19:21:47 +000016383#include <stdio.h>
16384#include <stddef.h>
16385#include <string.h>
16386
Christian Heimes2c181612007-12-17 20:04:13 +000016387#ifdef HAVE_SYS_TYPES_H
16388#include <sys/types.h>
16389#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016390
16391#ifdef HAVE_SSIZE_T
16392typedef ssize_t Py_ssize_t;
16393#elif SIZEOF_VOID_P == SIZEOF_LONG
16394typedef long Py_ssize_t;
16395#else
16396typedef int Py_ssize_t;
16397#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016398
Christian Heimes2c181612007-12-17 20:04:13 +000016399int main()
16400{
16401 char buffer[256];
16402
Thomas Wouters477c8d52006-05-27 19:21:47 +000016403 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16404 return 1;
16405
Thomas Wouters89f507f2006-12-13 04:49:30 +000016406 if (strcmp(buffer, "123"))
16407 return 1;
16408
16409 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16410 return 1;
16411
16412 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016413 return 1;
16414
16415 return 0;
16416}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016417
Thomas Wouters477c8d52006-05-27 19:21:47 +000016418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016419if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016420 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016421else
Matthias Kloseb9621712010-04-24 17:59:49 +000016422 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016426fi
16427
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16430$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016431if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016432
Matthias Kloseb9621712010-04-24 17:59:49 +000016433$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016434
16435fi
16436
Matthias Kloseb9621712010-04-24 17:59:49 +000016437ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016438#ifdef HAVE_SYS_TYPES_H
16439#include <sys/types.h>
16440#endif
16441#ifdef HAVE_SYS_SOCKET_H
16442#include <sys/socket.h>
16443#endif
16444
Matthias Kloseb9621712010-04-24 17:59:49 +000016445"
Victor Stinnere0be4232011-10-25 13:06:09 +020016446if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016447
Martin v. Löwis11437992002-04-12 09:54:03 +000016448else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016449
Matthias Kloseb9621712010-04-24 17:59:49 +000016450$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016451
16452fi
16453
Michael W. Hudson54241132001-12-07 15:38:26 +000016454
Matthias Kloseb9621712010-04-24 17:59:49 +000016455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16456$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016457if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016458 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016459else
Matthias Kloseb9621712010-04-24 17:59:49 +000016460 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016461 ac_cv_broken_mbstowcs=no
16462else
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016464/* end confdefs.h. */
16465
Stefan Krah19c21392012-11-22 23:47:32 +010016466#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016467#include<stdlib.h>
16468int main() {
16469 size_t len = -1;
16470 const char *str = "text";
16471 len = mbstowcs(NULL, str, 0);
16472 return (len != 4);
16473}
16474
16475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016476if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016477 ac_cv_broken_mbstowcs=no
16478else
Matthias Kloseb9621712010-04-24 17:59:49 +000016479 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16482 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016483fi
16484
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016485fi
16486
Matthias Kloseb9621712010-04-24 17:59:49 +000016487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16488$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016489if test "$ac_cv_broken_mbstowcs" = yes
16490then
16491
Matthias Kloseb9621712010-04-24 17:59:49 +000016492$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016493
16494fi
16495
Antoine Pitroub52ec782009-01-25 16:34:23 +000016496# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16498$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016499
16500# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016501if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016502 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016503if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016504then
16505
Matthias Kloseb9621712010-04-24 17:59:49 +000016506$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016507
Matthias Kloseb9621712010-04-24 17:59:49 +000016508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16509$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016510fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016511if test "$withval" = no
16512then
16513
16514$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16515
Matthias Kloseb9621712010-04-24 17:59:49 +000016516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16517$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016518fi
16519
Antoine Pitrou042b1282010-08-13 21:15:58 +000016520else
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16522$as_echo "no value specified" >&6; }
16523fi
16524
Antoine Pitroub52ec782009-01-25 16:34:23 +000016525
Matthias Kloseb17289e2012-03-15 19:51:34 +010016526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16527$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16528if ${ac_cv_computed_gotos+:} false; then :
16529 $as_echo_n "(cached) " >&6
16530else
16531 if test "$cross_compiling" = yes; then :
16532 if test "${with_computed_gotos+set}" = set; then
16533 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16534 else
16535 ac_cv_computed_gotos=no
16536 fi
16537else
16538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16539/* end confdefs.h. */
16540
16541int main(int argc, char **argv)
16542{
16543 static void *targets[1] = { &&LABEL1 };
16544 goto LABEL2;
16545LABEL1:
16546 return 0;
16547LABEL2:
16548 goto *targets[0];
16549 return 1;
16550}
16551
16552_ACEOF
16553if ac_fn_c_try_run "$LINENO"; then :
16554 ac_cv_computed_gotos=yes
16555else
16556 ac_cv_computed_gotos=no
16557fi
16558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16559 conftest.$ac_objext conftest.beam conftest.$ac_ext
16560fi
16561
16562fi
16563
16564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16565$as_echo "$ac_cv_computed_gotos" >&6; }
16566case "$ac_cv_computed_gotos" in yes*)
16567
16568$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16569
16570esac
16571
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016572case $ac_sys_system in
16573AIX*)
16574
16575$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16576 ;;
16577esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016578
Michael W. Hudson54241132001-12-07 15:38:26 +000016579
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016580
16581
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016582for h in `(cd $srcdir;echo Python/thread_*.h)`
16583do
16584 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16585done
16586
Michael W. Hudson54241132001-12-07 15:38:26 +000016587
Victor Stinner21a74a92019-04-11 22:28:12 +020016588SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16590$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016591for dir in $SRCDIRS; do
16592 if test ! -d $dir; then
16593 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016594 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016595done
Matthias Kloseb9621712010-04-24 17:59:49 +000016596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16597$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016598
Stefan Krah1919b7e2012-03-21 18:25:23 +010016599# Availability of -O2:
16600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16601$as_echo_n "checking for -O2... " >&6; }
16602saved_cflags="$CFLAGS"
16603CFLAGS="-O2"
16604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605/* end confdefs.h. */
16606
16607int
16608main ()
16609{
16610
16611
16612 ;
16613 return 0;
16614}
16615_ACEOF
16616if ac_fn_c_try_compile "$LINENO"; then :
16617 have_O2=yes
16618else
16619 have_O2=no
16620fi
16621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16623$as_echo "$have_O2" >&6; }
16624CFLAGS="$saved_cflags"
16625
16626# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16627# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16629$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16630saved_cflags="$CFLAGS"
16631CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16632if test "$have_O2" = no; then
16633 CFLAGS=""
16634fi
16635if test "$cross_compiling" = yes; then :
16636 have_glibc_memmove_bug=undefined
16637else
16638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16639/* end confdefs.h. */
16640
16641#include <stdio.h>
16642#include <stdlib.h>
16643#include <string.h>
16644void foo(void *p, void *q) { memmove(p, q, 19); }
16645int main() {
16646 char a[32] = "123456789000000000";
16647 foo(&a[9], a);
16648 if (strcmp(a, "123456789123456789000000000") != 0)
16649 return 1;
16650 foo(a, &a[9]);
16651 if (strcmp(a, "123456789000000000") != 0)
16652 return 1;
16653 return 0;
16654}
16655
16656_ACEOF
16657if ac_fn_c_try_run "$LINENO"; then :
16658 have_glibc_memmove_bug=no
16659else
16660 have_glibc_memmove_bug=yes
16661fi
16662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16663 conftest.$ac_objext conftest.beam conftest.$ac_ext
16664fi
16665
16666CFLAGS="$saved_cflags"
16667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16668$as_echo "$have_glibc_memmove_bug" >&6; }
16669if test "$have_glibc_memmove_bug" = yes; then
16670
16671$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16672
16673fi
16674
16675if test "$have_gcc_asm_for_x87" = yes; then
16676 # Some versions of gcc miscompile inline asm:
16677 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16678 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16679 case $CC in
16680 *gcc*)
16681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16682$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16683 saved_cflags="$CFLAGS"
16684 CFLAGS="-O2"
16685 if test "$cross_compiling" = yes; then :
16686 have_ipa_pure_const_bug=undefined
16687else
16688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16689/* end confdefs.h. */
16690
16691 __attribute__((noinline)) int
16692 foo(int *p) {
16693 int r;
16694 asm ( "movl \$6, (%1)\n\t"
16695 "xorl %0, %0\n\t"
16696 : "=r" (r) : "r" (p) : "memory"
16697 );
16698 return r;
16699 }
16700 int main() {
16701 int p = 8;
16702 if ((foo(&p) ? : p) != 6)
16703 return 1;
16704 return 0;
16705 }
16706
16707_ACEOF
16708if ac_fn_c_try_run "$LINENO"; then :
16709 have_ipa_pure_const_bug=no
16710else
16711 have_ipa_pure_const_bug=yes
16712fi
16713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16714 conftest.$ac_objext conftest.beam conftest.$ac_ext
16715fi
16716
16717 CFLAGS="$saved_cflags"
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16719$as_echo "$have_ipa_pure_const_bug" >&6; }
16720 if test "$have_ipa_pure_const_bug" = yes; then
16721
16722$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16723
16724 fi
16725 ;;
16726 esac
16727fi
16728
Victor Stinner4f5366e2015-01-09 02:13:19 +010016729# Check for stdatomic.h
16730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16731$as_echo_n "checking for stdatomic.h... " >&6; }
16732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16733/* end confdefs.h. */
16734
16735
16736 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016737 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016738 int main() {
16739 int loaded_value = atomic_load(&value);
16740 return 0;
16741 }
16742
16743
16744_ACEOF
16745if ac_fn_c_try_link "$LINENO"; then :
16746 have_stdatomic_h=yes
16747else
16748 have_stdatomic_h=no
16749fi
16750rm -f core conftest.err conftest.$ac_objext \
16751 conftest$ac_exeext conftest.$ac_ext
16752
16753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16754$as_echo "$have_stdatomic_h" >&6; }
16755
16756if test "$have_stdatomic_h" = yes; then
16757
16758$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16759
16760fi
16761
16762# Check for GCC >= 4.7 __atomic builtins
16763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16764$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16766/* end confdefs.h. */
16767
16768
16769 volatile int val = 1;
16770 int main() {
16771 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16772 return 0;
16773 }
16774
16775
16776_ACEOF
16777if ac_fn_c_try_link "$LINENO"; then :
16778 have_builtin_atomic=yes
16779else
16780 have_builtin_atomic=no
16781fi
16782rm -f core conftest.err conftest.$ac_objext \
16783 conftest$ac_exeext conftest.$ac_ext
16784
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16786$as_echo "$have_builtin_atomic" >&6; }
16787
16788if test "$have_builtin_atomic" = yes; then
16789
16790$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16791
16792fi
16793
Ned Deily322f5ba2013-11-21 23:01:59 -080016794# ensurepip option
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16796$as_echo_n "checking for ensurepip... " >&6; }
16797
16798# Check whether --with-ensurepip was given.
16799if test "${with_ensurepip+set}" = set; then :
16800 withval=$with_ensurepip;
16801else
16802 with_ensurepip=upgrade
16803fi
16804
16805case $with_ensurepip in #(
16806 yes|upgrade) :
16807 ENSUREPIP=upgrade ;; #(
16808 install) :
16809 ENSUREPIP=install ;; #(
16810 no) :
16811 ENSUREPIP=no ;; #(
16812 *) :
16813 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16814esac
16815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16816$as_echo "$ENSUREPIP" >&6; }
16817
16818
Victor Stinner35a97c02015-03-08 02:59:09 +010016819# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16821$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16823/* end confdefs.h. */
16824
16825
16826 #include <dirent.h>
16827
16828 int main() {
16829 struct dirent entry;
16830 return entry.d_type == DT_UNKNOWN;
16831 }
16832
16833
16834_ACEOF
16835if ac_fn_c_try_link "$LINENO"; then :
16836 have_dirent_d_type=yes
16837else
16838 have_dirent_d_type=no
16839fi
16840rm -f core conftest.err conftest.$ac_objext \
16841 conftest$ac_exeext conftest.$ac_ext
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16843$as_echo "$have_dirent_d_type" >&6; }
16844
16845if test "$have_dirent_d_type" = yes; then
16846
16847$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16848
16849fi
16850
Victor Stinner9eb57c52015-03-19 22:21:49 +010016851# check if the Linux getrandom() syscall is available
16852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16853$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16855/* end confdefs.h. */
16856
16857
Victor Stinner1b80b242016-04-12 22:34:58 +020016858 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016859 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016860 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016861
16862 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016863 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016864 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016865 const int flags = GRND_NONBLOCK;
16866 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016867 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016868 return 0;
16869 }
16870
16871
16872_ACEOF
16873if ac_fn_c_try_link "$LINENO"; then :
16874 have_getrandom_syscall=yes
16875else
16876 have_getrandom_syscall=no
16877fi
16878rm -f core conftest.err conftest.$ac_objext \
16879 conftest$ac_exeext conftest.$ac_ext
16880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16881$as_echo "$have_getrandom_syscall" >&6; }
16882
16883if test "$have_getrandom_syscall" = yes; then
16884
16885$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16886
16887fi
16888
Victor Stinner3abf44e2015-09-18 15:38:37 +020016889# check if the getrandom() function is available
16890# the test was written for the Solaris function of <sys/random.h>
16891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16892$as_echo_n "checking for the getrandom() function... " >&6; }
16893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16894/* end confdefs.h. */
16895
16896
16897 #include <sys/random.h>
16898
16899 int main() {
16900 char buffer[1];
16901 const size_t buflen = sizeof(buffer);
16902 const int flags = 0;
16903 /* ignore the result, Python checks for ENOSYS at runtime */
16904 (void)getrandom(buffer, buflen, flags);
16905 return 0;
16906 }
16907
16908
16909_ACEOF
16910if ac_fn_c_try_link "$LINENO"; then :
16911 have_getrandom=yes
16912else
16913 have_getrandom=no
16914fi
16915rm -f core conftest.err conftest.$ac_objext \
16916 conftest$ac_exeext conftest.$ac_ext
16917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16918$as_echo "$have_getrandom" >&6; }
16919
16920if test "$have_getrandom" = yes; then
16921
16922$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16923
16924fi
16925
Neil Schemenauer5741c452019-02-08 10:48:46 -080016926# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16927# shm_* may only be available if linking against librt
16928save_LIBS="$LIBS"
16929save_includes_default="$ac_includes_default"
16930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16931$as_echo_n "checking for library containing shm_open... " >&6; }
16932if ${ac_cv_search_shm_open+:} false; then :
16933 $as_echo_n "(cached) " >&6
16934else
16935 ac_func_search_save_LIBS=$LIBS
16936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16937/* end confdefs.h. */
16938
16939/* Override any GCC internal prototype to avoid an error.
16940 Use char because int might match the return type of a GCC
16941 builtin and then its argument prototype would still apply. */
16942#ifdef __cplusplus
16943extern "C"
16944#endif
16945char shm_open ();
16946int
16947main ()
16948{
16949return shm_open ();
16950 ;
16951 return 0;
16952}
16953_ACEOF
16954for ac_lib in '' rt; do
16955 if test -z "$ac_lib"; then
16956 ac_res="none required"
16957 else
16958 ac_res=-l$ac_lib
16959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16960 fi
16961 if ac_fn_c_try_link "$LINENO"; then :
16962 ac_cv_search_shm_open=$ac_res
16963fi
16964rm -f core conftest.err conftest.$ac_objext \
16965 conftest$ac_exeext
16966 if ${ac_cv_search_shm_open+:} false; then :
16967 break
16968fi
16969done
16970if ${ac_cv_search_shm_open+:} false; then :
16971
16972else
16973 ac_cv_search_shm_open=no
16974fi
16975rm conftest.$ac_ext
16976LIBS=$ac_func_search_save_LIBS
16977fi
16978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16979$as_echo "$ac_cv_search_shm_open" >&6; }
16980ac_res=$ac_cv_search_shm_open
16981if test "$ac_res" != no; then :
16982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16983
16984fi
16985
16986if test "$ac_cv_search_shm_open" = "-lrt"; then
16987
16988$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16989
16990fi
16991for ac_header in sys/mman.h
16992do :
16993 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16994if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16995 cat >>confdefs.h <<_ACEOF
16996#define HAVE_SYS_MMAN_H 1
16997_ACEOF
16998
16999fi
17000
17001done
17002
17003# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17004ac_includes_default="\
17005${ac_includes_default}
17006#ifndef __cplusplus
17007# ifdef HAVE_SYS_MMAN_H
17008# include <sys/mman.h>
17009# endif
17010#endif
17011"
17012for ac_func in shm_open shm_unlink
17013do :
17014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17015ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17016if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17017 cat >>confdefs.h <<_ACEOF
17018#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17019_ACEOF
17020
17021fi
17022done
17023
17024# we don't want to link with librt always, restore LIBS
17025LIBS="$save_LIBS"
17026ac_includes_default="$save_includes_default"
17027
Christian Heimesff5be6e2018-01-20 13:19:21 +010017028# Check for usable OpenSSL
17029
17030 found=false
17031
17032# Check whether --with-openssl was given.
17033if test "${with_openssl+set}" = set; then :
17034 withval=$with_openssl;
17035 case "$withval" in
17036 "" | y | ye | yes | n | no)
17037 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17038 ;;
17039 *) ssldirs="$withval"
17040 ;;
17041 esac
17042
17043else
17044
17045 # if pkg-config is installed and openssl has installed a .pc file,
17046 # then use that information and don't search ssldirs
17047 if test -n "$ac_tool_prefix"; then
17048 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17049set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17051$as_echo_n "checking for $ac_word... " >&6; }
17052if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17053 $as_echo_n "(cached) " >&6
17054else
17055 if test -n "$PKG_CONFIG"; then
17056 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17057else
17058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17059for as_dir in $PATH
17060do
17061 IFS=$as_save_IFS
17062 test -z "$as_dir" && as_dir=.
17063 for ac_exec_ext in '' $ac_executable_extensions; do
17064 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17065 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17067 break 2
17068 fi
17069done
17070 done
17071IFS=$as_save_IFS
17072
17073fi
17074fi
17075PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17076if test -n "$PKG_CONFIG"; then
17077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17078$as_echo "$PKG_CONFIG" >&6; }
17079else
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17081$as_echo "no" >&6; }
17082fi
17083
17084
17085fi
17086if test -z "$ac_cv_prog_PKG_CONFIG"; then
17087 ac_ct_PKG_CONFIG=$PKG_CONFIG
17088 # Extract the first word of "pkg-config", so it can be a program name with args.
17089set dummy pkg-config; ac_word=$2
17090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17091$as_echo_n "checking for $ac_word... " >&6; }
17092if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17093 $as_echo_n "(cached) " >&6
17094else
17095 if test -n "$ac_ct_PKG_CONFIG"; then
17096 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17097else
17098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17099for as_dir in $PATH
17100do
17101 IFS=$as_save_IFS
17102 test -z "$as_dir" && as_dir=.
17103 for ac_exec_ext in '' $ac_executable_extensions; do
17104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17105 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17107 break 2
17108 fi
17109done
17110 done
17111IFS=$as_save_IFS
17112
17113fi
17114fi
17115ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17116if test -n "$ac_ct_PKG_CONFIG"; then
17117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17118$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17119else
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17121$as_echo "no" >&6; }
17122fi
17123
17124 if test "x$ac_ct_PKG_CONFIG" = x; then
17125 PKG_CONFIG=""
17126 else
17127 case $cross_compiling:$ac_tool_warned in
17128yes:)
17129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17131ac_tool_warned=yes ;;
17132esac
17133 PKG_CONFIG=$ac_ct_PKG_CONFIG
17134 fi
17135else
17136 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17137fi
17138
17139 if test x"$PKG_CONFIG" != x""; then
17140 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17141 if test $? = 0; then
17142 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17143 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17144 found=true
17145 fi
17146 fi
17147
17148 # no such luck; use some default ssldirs
17149 if ! $found; then
17150 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17151 fi
17152
17153
17154fi
17155
17156
17157
17158 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17159 # an 'openssl' subdirectory
17160
17161 if ! $found; then
17162 OPENSSL_INCLUDES=
17163 for ssldir in $ssldirs; do
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17165$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17166 if test -f "$ssldir/include/openssl/ssl.h"; then
17167 OPENSSL_INCLUDES="-I$ssldir/include"
17168 OPENSSL_LDFLAGS="-L$ssldir/lib"
17169 OPENSSL_LIBS="-lssl -lcrypto"
17170 found=true
17171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17172$as_echo "yes" >&6; }
17173 break
17174 else
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17176$as_echo "no" >&6; }
17177 fi
17178 done
17179
17180 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17181 # it will just work!
17182 fi
17183
17184 # try the preprocessor and linker with our new flags,
17185 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17186
17187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17188$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17189 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17190 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17191
17192 save_LIBS="$LIBS"
17193 save_LDFLAGS="$LDFLAGS"
17194 save_CPPFLAGS="$CPPFLAGS"
17195 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17196 LIBS="$OPENSSL_LIBS $LIBS"
17197 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17199/* end confdefs.h. */
17200#include <openssl/ssl.h>
17201int
17202main ()
17203{
17204SSL_new(NULL)
17205 ;
17206 return 0;
17207}
17208_ACEOF
17209if ac_fn_c_try_link "$LINENO"; then :
17210
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17212$as_echo "yes" >&6; }
17213 have_openssl=yes
17214
17215else
17216
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17218$as_echo "no" >&6; }
17219 have_openssl=no
17220
17221fi
17222rm -f core conftest.err conftest.$ac_objext \
17223 conftest$ac_exeext conftest.$ac_ext
17224 CPPFLAGS="$save_CPPFLAGS"
17225 LDFLAGS="$save_LDFLAGS"
17226 LIBS="$save_LIBS"
17227
17228
17229
17230
17231
17232
17233if test "$have_openssl" = yes; then
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17235$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17236
17237 save_LIBS="$LIBS"
17238 save_LDFLAGS="$LDFLAGS"
17239 save_CPPFLAGS="$CPPFLAGS"
17240 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17241 LIBS="$OPENSSL_LIBS $LIBS"
17242 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17243
17244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17245/* end confdefs.h. */
17246
17247 #include <openssl/x509_vfy.h>
17248
17249int
17250main ()
17251{
17252
17253 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17254 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17255 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17256 X509_VERIFY_PARAM_set_hostflags(p, 0);
17257
17258 ;
17259 return 0;
17260}
17261
17262_ACEOF
17263if ac_fn_c_try_link "$LINENO"; then :
17264
17265 ac_cv_has_x509_verify_param_set1_host=yes
17266
17267else
17268
17269 ac_cv_has_x509_verify_param_set1_host=no
17270
17271fi
17272rm -f core conftest.err conftest.$ac_objext \
17273 conftest$ac_exeext conftest.$ac_ext
17274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17275$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17276 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17277
17278$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17279
17280 fi
17281
17282 CPPFLAGS="$save_CPPFLAGS"
17283 LDFLAGS="$save_LDFLAGS"
17284 LIBS="$save_LIBS"
17285fi
17286
Christian Heimes892d66e2018-01-29 14:10:18 +010017287# ssl module default cipher suite string
17288
17289
17290
17291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17292$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17293
17294# Check whether --with-ssl-default-suites was given.
17295if test "${with_ssl_default_suites+set}" = set; then :
17296 withval=$with_ssl_default_suites;
17297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17298$as_echo "$withval" >&6; }
17299case "$withval" in
17300 python)
17301 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17302
17303 ;;
17304 openssl)
17305 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17306
17307 ;;
17308 *)
17309 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17310
17311 cat >>confdefs.h <<_ACEOF
17312#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17313_ACEOF
17314
17315 ;;
17316esac
17317
17318else
17319
17320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17321$as_echo "python" >&6; }
17322$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17323
17324
17325fi
17326
17327
17328
Guido van Rossum627b2d71993-12-24 10:39:16 +000017329# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017330ac_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 +000017331
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017332ac_config_files="$ac_config_files Modules/ld_so_aix"
17333
Martin v. Löwis11437992002-04-12 09:54:03 +000017334cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017335# This file is a shell script that caches the results of configure
17336# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017337# scripts and configure runs, see configure's option --config-cache.
17338# It is not useful on other systems. If it contains results you don't
17339# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017340#
Martin v. Löwis11437992002-04-12 09:54:03 +000017341# config.status only pays attention to the cache file if you give it
17342# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017343#
Skip Montanaro6dead952003-09-25 14:50:04 +000017344# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017345# loading this file, other *unset* `ac_cv_foo' will be assigned the
17346# following values.
17347
17348_ACEOF
17349
Guido van Rossumf78abae1997-01-21 22:02:36 +000017350# The following way of writing the cache mishandles newlines in values,
17351# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017353# Ultrix sh set writes to stderr and can't be redirected directly,
17354# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355(
17356 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17357 eval ac_val=\$$ac_var
17358 case $ac_val in #(
17359 *${as_nl}*)
17360 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017361 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17362$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363 esac
17364 case $ac_var in #(
17365 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017366 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17367 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 esac ;;
17369 esac
17370 done
17371
Martin v. Löwis11437992002-04-12 09:54:03 +000017372 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17374 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 # `set' does not quote correctly, so add quotes: double-quote
17376 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017378 "s/'/'\\\\''/g;
17379 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 *)
17382 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017384 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 esac |
17386 sort
17387) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017388 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017390 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17393 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17395 :end' >>confcache
17396if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17397 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017398 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017399 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17400$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017401 if test ! -f "$cache_file" || test -h "$cache_file"; then
17402 cat confcache >"$cache_file"
17403 else
17404 case $cache_file in #(
17405 */* | ?:*)
17406 mv -f confcache "$cache_file"$$ &&
17407 mv -f "$cache_file"$$ "$cache_file" ;; #(
17408 *)
17409 mv -f confcache "$cache_file" ;;
17410 esac
17411 fi
17412 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017413 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017414 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17415$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017416 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017417fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017418rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017419
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017420test "x$prefix" = xNONE && prefix=$ac_default_prefix
17421# Let make expand exec_prefix.
17422test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017423
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017424DEFS=-DHAVE_CONFIG_H
17425
Skip Montanaro6dead952003-09-25 14:50:04 +000017426ac_libobjs=
17427ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017428U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017429for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17430 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17434 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017435 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17436 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017437done
17438LIBOBJS=$ac_libobjs
17439
17440LTLIBOBJS=$ac_ltlibobjs
17441
17442
Martin v. Löwis11437992002-04-12 09:54:03 +000017443
Matthias Kloseb9621712010-04-24 17:59:49 +000017444
Victor Stinnere0be4232011-10-25 13:06:09 +020017445: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017446ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017447ac_clean_files_save=$ac_clean_files
17448ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017449{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17450$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17451as_write_fail=0
17452cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017453#! $SHELL
17454# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017455# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017456# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017457# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017458
Martin v. Löwis11437992002-04-12 09:54:03 +000017459debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017460ac_cs_recheck=false
17461ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017462
Matthias Kloseb9621712010-04-24 17:59:49 +000017463SHELL=\${CONFIG_SHELL-$SHELL}
17464export SHELL
17465_ASEOF
17466cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17467## -------------------- ##
17468## M4sh Initialization. ##
17469## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471# Be more Bourne compatible
17472DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017473if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 emulate sh
17475 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017477 # is contrary to our usage. Disable this feature.
17478 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017480else
Matthias Kloseb9621712010-04-24 17:59:49 +000017481 case `(set -o) 2>/dev/null` in #(
17482 *posix*) :
17483 set -o posix ;; #(
17484 *) :
17485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017487fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017488
17489
Matthias Kloseb9621712010-04-24 17:59:49 +000017490as_nl='
17491'
17492export as_nl
17493# Printing a long string crashes Solaris 7 /usr/bin/printf.
17494as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17495as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17496as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17497# Prefer a ksh shell builtin over an external printf program on Solaris,
17498# but without wasting forks for bash or zsh.
17499if test -z "$BASH_VERSION$ZSH_VERSION" \
17500 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17501 as_echo='print -r --'
17502 as_echo_n='print -rn --'
17503elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17504 as_echo='printf %s\n'
17505 as_echo_n='printf %s'
17506else
17507 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17508 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17509 as_echo_n='/usr/ucb/echo -n'
17510 else
17511 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17512 as_echo_n_body='eval
17513 arg=$1;
17514 case $arg in #(
17515 *"$as_nl"*)
17516 expr "X$arg" : "X\\(.*\\)$as_nl";
17517 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17518 esac;
17519 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17520 '
17521 export as_echo_n_body
17522 as_echo_n='sh -c $as_echo_n_body as_echo'
17523 fi
17524 export as_echo_body
17525 as_echo='sh -c $as_echo_body as_echo'
17526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017527
17528# The user is always right.
17529if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017530 PATH_SEPARATOR=:
17531 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17532 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17533 PATH_SEPARATOR=';'
17534 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537
17538# IFS
17539# We need space, tab and new line, in precisely that order. Quoting is
17540# there to prevent editors from complaining about space-tab.
17541# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17542# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543IFS=" "" $as_nl"
17544
17545# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017546as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017547case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548 *[\\/]* ) as_myself=$0 ;;
17549 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017550for as_dir in $PATH
17551do
17552 IFS=$as_save_IFS
17553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17555 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 ;;
17559esac
17560# We did not find ourselves, most probably we were run as `sh COMMAND'
17561# in which case we are not to be found in the path.
17562if test "x$as_myself" = x; then
17563 as_myself=$0
17564fi
17565if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17567 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568fi
17569
Matthias Kloseb9621712010-04-24 17:59:49 +000017570# Unset variables that we do not need and which cause bugs (e.g. in
17571# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17572# suppresses any "Segmentation fault" message there. '((' could
17573# trigger a bug in pdksh 5.2.14.
17574for as_var in BASH_ENV ENV MAIL MAILPATH
17575do eval test x\${$as_var+set} = xset \
17576 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577done
17578PS1='$ '
17579PS2='> '
17580PS4='+ '
17581
17582# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017583LC_ALL=C
17584export LC_ALL
17585LANGUAGE=C
17586export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587
Matthias Kloseb9621712010-04-24 17:59:49 +000017588# CDPATH.
17589(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17590
17591
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017592# as_fn_error STATUS ERROR [LINENO LOG_FD]
17593# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017594# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17595# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017596# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017597as_fn_error ()
17598{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017599 as_status=$1; test $as_status -eq 0 && as_status=1
17600 if test "$4"; then
17601 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17602 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017603 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017604 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017605 as_fn_exit $as_status
17606} # as_fn_error
17607
17608
17609# as_fn_set_status STATUS
17610# -----------------------
17611# Set $? to STATUS, without forking.
17612as_fn_set_status ()
17613{
17614 return $1
17615} # as_fn_set_status
17616
17617# as_fn_exit STATUS
17618# -----------------
17619# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17620as_fn_exit ()
17621{
17622 set +e
17623 as_fn_set_status $1
17624 exit $1
17625} # as_fn_exit
17626
17627# as_fn_unset VAR
17628# ---------------
17629# Portably unset VAR.
17630as_fn_unset ()
17631{
17632 { eval $1=; unset $1;}
17633}
17634as_unset=as_fn_unset
17635# as_fn_append VAR VALUE
17636# ----------------------
17637# Append the text in VALUE to the end of the definition contained in VAR. Take
17638# advantage of any shell optimizations that allow amortized linear growth over
17639# repeated appends, instead of the typical quadratic growth present in naive
17640# implementations.
17641if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17642 eval 'as_fn_append ()
17643 {
17644 eval $1+=\$2
17645 }'
17646else
17647 as_fn_append ()
17648 {
17649 eval $1=\$$1\$2
17650 }
17651fi # as_fn_append
17652
17653# as_fn_arith ARG...
17654# ------------------
17655# Perform arithmetic evaluation on the ARGs, and store the result in the
17656# global $as_val. Take advantage of shells that can avoid forks. The arguments
17657# must be portable across $(()) and expr.
17658if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17659 eval 'as_fn_arith ()
17660 {
17661 as_val=$(( $* ))
17662 }'
17663else
17664 as_fn_arith ()
17665 {
17666 as_val=`expr "$@" || test $? -eq 1`
17667 }
17668fi # as_fn_arith
17669
17670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671if expr a : '\(a\)' >/dev/null 2>&1 &&
17672 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17673 as_expr=expr
17674else
17675 as_expr=false
17676fi
17677
17678if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17679 as_basename=basename
17680else
17681 as_basename=false
17682fi
17683
Matthias Kloseb9621712010-04-24 17:59:49 +000017684if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17685 as_dirname=dirname
17686else
17687 as_dirname=false
17688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017690as_me=`$as_basename -- "$0" ||
17691$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17692 X"$0" : 'X\(//\)$' \| \
17693 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017694$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017695 sed '/^.*\/\([^/][^/]*\)\/*$/{
17696 s//\1/
17697 q
17698 }
17699 /^X\/\(\/\/\)$/{
17700 s//\1/
17701 q
17702 }
17703 /^X\/\(\/\).*/{
17704 s//\1/
17705 q
17706 }
17707 s/.*/./; q'`
17708
Matthias Kloseb9621712010-04-24 17:59:49 +000017709# Avoid depending upon Character Ranges.
17710as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17711as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17712as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17713as_cr_digits='0123456789'
17714as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715
17716ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017717case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017719 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 xy) ECHO_C='\c';;
17722 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17723 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 esac;;
17725*)
17726 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017728
Martin v. Löwis11437992002-04-12 09:54:03 +000017729rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730if test -d conf$$.dir; then
17731 rm -f conf$$.dir/conf$$.file
17732else
17733 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017734 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017736if (echo >conf$$.file) 2>/dev/null; then
17737 if ln -s conf$$.file conf$$ 2>/dev/null; then
17738 as_ln_s='ln -s'
17739 # ... but there are two gotchas:
17740 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17741 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017742 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017743 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017744 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 elif ln conf$$.file conf$$ 2>/dev/null; then
17746 as_ln_s=ln
17747 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017748 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017750else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017751 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17754rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017755
Matthias Kloseb9621712010-04-24 17:59:49 +000017756
17757# as_fn_mkdir_p
17758# -------------
17759# Create "$as_dir" as a directory, including parents if necessary.
17760as_fn_mkdir_p ()
17761{
17762
17763 case $as_dir in #(
17764 -*) as_dir=./$as_dir;;
17765 esac
17766 test -d "$as_dir" || eval $as_mkdir_p || {
17767 as_dirs=
17768 while :; do
17769 case $as_dir in #(
17770 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17771 *) as_qdir=$as_dir;;
17772 esac
17773 as_dirs="'$as_qdir' $as_dirs"
17774 as_dir=`$as_dirname -- "$as_dir" ||
17775$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17776 X"$as_dir" : 'X\(//\)[^/]' \| \
17777 X"$as_dir" : 'X\(//\)$' \| \
17778 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17779$as_echo X"$as_dir" |
17780 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17781 s//\1/
17782 q
17783 }
17784 /^X\(\/\/\)[^/].*/{
17785 s//\1/
17786 q
17787 }
17788 /^X\(\/\/\)$/{
17789 s//\1/
17790 q
17791 }
17792 /^X\(\/\).*/{
17793 s//\1/
17794 q
17795 }
17796 s/.*/./; q'`
17797 test -d "$as_dir" && break
17798 done
17799 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017800 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017801
17802
17803} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017804if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017805 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017806else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017807 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017808 as_mkdir_p=false
17809fi
17810
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017811
17812# as_fn_executable_p FILE
17813# -----------------------
17814# Test if FILE is an executable regular file.
17815as_fn_executable_p ()
17816{
17817 test -f "$1" && test -x "$1"
17818} # as_fn_executable_p
17819as_test_x='test -x'
17820as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017821
17822# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017823as_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 +000017824
17825# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017826as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
17828
Martin v. Löwis11437992002-04-12 09:54:03 +000017829exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017830## ----------------------------------- ##
17831## Main body of $CONFIG_STATUS script. ##
17832## ----------------------------------- ##
17833_ASEOF
17834test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017835
Matthias Kloseb9621712010-04-24 17:59:49 +000017836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17837# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017838# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839# values after options handling.
17840ac_log="
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017841This file was extended by python $as_me 3.9, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017842generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017843
17844 CONFIG_FILES = $CONFIG_FILES
17845 CONFIG_HEADERS = $CONFIG_HEADERS
17846 CONFIG_LINKS = $CONFIG_LINKS
17847 CONFIG_COMMANDS = $CONFIG_COMMANDS
17848 $ $0 $@
17849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850on `(hostname || uname -n) 2>/dev/null | sed 1q`
17851"
17852
Martin v. Löwis11437992002-04-12 09:54:03 +000017853_ACEOF
17854
Matthias Kloseb9621712010-04-24 17:59:49 +000017855case $ac_config_files in *"
17856"*) set x $ac_config_files; shift; ac_config_files=$*;;
17857esac
17858
17859case $ac_config_headers in *"
17860"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17861esac
17862
17863
17864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017865# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017866config_files="$ac_config_files"
17867config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017870
Matthias Kloseb9621712010-04-24 17:59:49 +000017871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017872ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017873\`$as_me' instantiates files and other configuration actions
17874from templates according to the current configuration. Unless the files
17875and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017876
Matthias Kloseb9621712010-04-24 17:59:49 +000017877Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
17879 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017881 --config print configuration, then exit
17882 -q, --quiet, --silent
17883 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 -d, --debug don't remove temporary files
17885 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 --file=FILE[:TEMPLATE]
17887 instantiate the configuration file FILE
17888 --header=FILE[:TEMPLATE]
17889 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017890
17891Configuration files:
17892$config_files
17893
17894Configuration headers:
17895$config_headers
17896
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017897Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17901ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017902ac_cs_version="\\
Łukasz Langa9ab2fb12019-06-04 22:12:32 +020017903python config.status 3.9
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017904configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017907Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017908This config.status script is free software; the Free Software Foundation
17909gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910
17911ac_pwd='$ac_pwd'
17912srcdir='$srcdir'
17913INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017914MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017915test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017916_ACEOF
17917
Matthias Kloseb9621712010-04-24 17:59:49 +000017918cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17919# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017920ac_need_defaults=:
17921while test $# != 0
17922do
17923 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017924 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17926 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017927 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017929 --*=)
17930 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17931 ac_optarg=
17932 ac_shift=:
17933 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017935 ac_option=$1
17936 ac_optarg=$2
17937 ac_shift=shift
17938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017939 esac
17940
Skip Montanaro6dead952003-09-25 14:50:04 +000017941 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017942 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017943 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17944 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017946 $as_echo "$ac_cs_version"; exit ;;
17947 --config | --confi | --conf | --con | --co | --c )
17948 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 debug=: ;;
17951 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017952 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 case $ac_optarg in
17954 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017955 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017956 esac
17957 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 ac_need_defaults=false;;
17959 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017960 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017961 case $ac_optarg in
17962 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17963 esac
17964 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966 --he | --h)
17967 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017968 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017969Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017971 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017972 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17973 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17974 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017975
17976 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017977 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017978Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017979
Matthias Kloseb9621712010-04-24 17:59:49 +000017980 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017982
17983 esac
17984 shift
17985done
17986
Skip Montanaro6dead952003-09-25 14:50:04 +000017987ac_configure_extra_args=
17988
17989if $ac_cs_silent; then
17990 exec 6>/dev/null
17991 ac_configure_extra_args="$ac_configure_extra_args --silent"
17992fi
17993
17994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017996if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017997 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017998 shift
17999 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18000 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018003fi
18004
Martin v. Löwis11437992002-04-12 09:54:03 +000018005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007exec 5>>config.log
18008{
18009 echo
18010 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18011## Running $as_me. ##
18012_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018013 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018019
Matthias Kloseb9621712010-04-24 17:59:49 +000018020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021
18022# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018023for ac_config_target in $ac_config_targets
18024do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025 case $ac_config_target in
18026 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18027 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18028 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018029 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18030 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018032 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018033 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018034 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018035 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036
Victor Stinnere0be4232011-10-25 13:06:09 +020018037 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 esac
18039done
18040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018041
Martin v. Löwis11437992002-04-12 09:54:03 +000018042# If the user did not use the arguments to specify the items to instantiate,
18043# then the envvar interface is used. Set only those that are not.
18044# We use the long form for the default assignment because of an extremely
18045# bizarre bug on SunOS 4.1.3.
18046if $ac_need_defaults; then
18047 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18048 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18049fi
18050
Skip Montanaro6dead952003-09-25 14:50:04 +000018051# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018053# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054# Hook for its removal unless debugging.
18055# Note that there is a small window in which the directory will not be cleaned:
18056# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018057$debug ||
18058{
Victor Stinnere0be4232011-10-25 13:06:09 +020018059 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018061 : "${ac_tmp:=$tmp}"
18062 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018064 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018065}
Martin v. Löwis11437992002-04-12 09:54:03 +000018066# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018067
Martin v. Löwis11437992002-04-12 09:54:03 +000018068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018070 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018071} ||
18072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073 tmp=./conf$$-$RANDOM
18074 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018075} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018076ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018077
Matthias Kloseb9621712010-04-24 17:59:49 +000018078# Set up the scripts for CONFIG_FILES section.
18079# No need to generate them if there are no CONFIG_FILES.
18080# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018082
Matthias Kloseb9621712010-04-24 17:59:49 +000018083
18084ac_cr=`echo X | tr X '\015'`
18085# On cygwin, bash can eat \r inside `` if the user requested igncr.
18086# But we know of no other shell where ac_cr would be empty at this
18087# point, so we can use a bashism as a fallback.
18088if test "x$ac_cr" = x; then
18089 eval ac_cr=\$\'\\r\'
18090fi
18091ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18092if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018093 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018094else
18095 ac_cs_awk_cr=$ac_cr
18096fi
18097
Victor Stinnere0be4232011-10-25 13:06:09 +020018098echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018099_ACEOF
18100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101
Matthias Kloseb9621712010-04-24 17:59:49 +000018102{
18103 echo "cat >conf$$subs.awk <<_ACEOF" &&
18104 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18105 echo "_ACEOF"
18106} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018107 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18108ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109ac_delim='%!_!# '
18110for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018111 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018112 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113
Matthias Kloseb9621712010-04-24 17:59:49 +000018114 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18115 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116 break
18117 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018118 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 else
18120 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122done
Matthias Kloseb9621712010-04-24 17:59:49 +000018123rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018124
Matthias Kloseb9621712010-04-24 17:59:49 +000018125cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018126cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018128sed -n '
18129h
18130s/^/S["/; s/!.*/"]=/
18131p
18132g
18133s/^[^!]*!//
18134:repl
18135t repl
18136s/'"$ac_delim"'$//
18137t delim
18138:nl
18139h
18140s/\(.\{148\}\)..*/\1/
18141t more1
18142s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18143p
18144n
18145b repl
18146:more1
18147s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18148p
18149g
18150s/.\{148\}//
18151t nl
18152:delim
18153h
18154s/\(.\{148\}\)..*/\1/
18155t more2
18156s/["\\]/\\&/g; s/^/"/; s/$/"/
18157p
18158b
18159:more2
18160s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18161p
18162g
18163s/.\{148\}//
18164t delim
18165' <conf$$subs.awk | sed '
18166/^[^""]/{
18167 N
18168 s/\n//
18169}
18170' >>$CONFIG_STATUS || ac_write_fail=1
18171rm -f conf$$subs.awk
18172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18173_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018174cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018175 for (key in S) S_is_set[key] = 1
18176 FS = ""
18177
18178}
18179{
18180 line = $ 0
18181 nfields = split(line, field, "@")
18182 substed = 0
18183 len = length(field[1])
18184 for (i = 2; i < nfields; i++) {
18185 key = field[i]
18186 keylen = length(key)
18187 if (S_is_set[key]) {
18188 value = S[key]
18189 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18190 len += length(value) + length(field[++i])
18191 substed = 1
18192 } else
18193 len += 1 + keylen
18194 }
18195
18196 print line
18197}
18198
18199_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018201cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18202if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18203 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18204else
18205 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018206fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018207 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018208_ACEOF
18209
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018210# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18211# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212# trailing colons and then remove the whole line if VPATH becomes empty
18213# (actually we leave an empty line to preserve line numbers).
18214if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018215 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18216h
18217s///
18218s/^/:/
18219s/[ ]*$/:/
18220s/:\$(srcdir):/:/g
18221s/:\${srcdir}:/:/g
18222s/:@srcdir@:/:/g
18223s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018225x
18226s/\(=[ ]*\).*/\1/
18227G
18228s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018229s/^[^=]*=[ ]*$//
18230}'
18231fi
18232
Matthias Kloseb9621712010-04-24 17:59:49 +000018233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018234fi # test -n "$CONFIG_FILES"
18235
Matthias Kloseb9621712010-04-24 17:59:49 +000018236# Set up the scripts for CONFIG_HEADERS section.
18237# No need to generate them if there are no CONFIG_HEADERS.
18238# This happens for instance with `./config.status Makefile'.
18239if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018240cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018241BEGIN {
18242_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243
Matthias Kloseb9621712010-04-24 17:59:49 +000018244# Transform confdefs.h into an awk script `defines.awk', embedded as
18245# here-document in config.status, that substitutes the proper values into
18246# config.h.in to produce config.h.
18247
18248# Create a delimiter string that does not exist in confdefs.h, to ease
18249# handling of long lines.
18250ac_delim='%!_!# '
18251for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018252 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18253 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018254 break
18255 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018256 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018257 else
18258 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18259 fi
18260done
18261
18262# For the awk script, D is an array of macro values keyed by name,
18263# likewise P contains macro parameters if any. Preserve backslash
18264# newline sequences.
18265
18266ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18267sed -n '
18268s/.\{148\}/&'"$ac_delim"'/g
18269t rset
18270:rset
18271s/^[ ]*#[ ]*define[ ][ ]*/ /
18272t def
18273d
18274:def
18275s/\\$//
18276t bsnl
18277s/["\\]/\\&/g
18278s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18279D["\1"]=" \3"/p
18280s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18281d
18282:bsnl
18283s/["\\]/\\&/g
18284s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18285D["\1"]=" \3\\\\\\n"\\/p
18286t cont
18287s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18288t cont
18289d
18290:cont
18291n
18292s/.\{148\}/&'"$ac_delim"'/g
18293t clear
18294:clear
18295s/\\$//
18296t bsnlc
18297s/["\\]/\\&/g; s/^/"/; s/$/"/p
18298d
18299:bsnlc
18300s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18301b cont
18302' <confdefs.h | sed '
18303s/'"$ac_delim"'/"\\\
18304"/g' >>$CONFIG_STATUS || ac_write_fail=1
18305
18306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18307 for (key in D) D_is_set[key] = 1
18308 FS = ""
18309}
18310/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18311 line = \$ 0
18312 split(line, arg, " ")
18313 if (arg[1] == "#") {
18314 defundef = arg[2]
18315 mac1 = arg[3]
18316 } else {
18317 defundef = substr(arg[1], 2)
18318 mac1 = arg[2]
18319 }
18320 split(mac1, mac2, "(") #)
18321 macro = mac2[1]
18322 prefix = substr(line, 1, index(line, defundef) - 1)
18323 if (D_is_set[macro]) {
18324 # Preserve the white space surrounding the "#".
18325 print prefix "define", macro P[macro] D[macro]
18326 next
18327 } else {
18328 # Replace #undef with comments. This is necessary, for example,
18329 # in the case of _POSIX_SOURCE, which is predefined and required
18330 # on some systems where configure will not decide to define it.
18331 if (defundef == "undef") {
18332 print "/*", prefix defundef, macro, "*/"
18333 next
18334 }
18335 }
18336}
18337{ print }
18338_ACAWK
18339_ACEOF
18340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018341 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018342fi # test -n "$CONFIG_HEADERS"
18343
18344
18345eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18346shift
18347for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018348do
18349 case $ac_tag in
18350 :[FHLC]) ac_mode=$ac_tag; continue;;
18351 esac
18352 case $ac_mode$ac_tag in
18353 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018354 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355 :[FH]-) ac_tag=-:-;;
18356 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18357 esac
18358 ac_save_IFS=$IFS
18359 IFS=:
18360 set x $ac_tag
18361 IFS=$ac_save_IFS
18362 shift
18363 ac_file=$1
18364 shift
18365
18366 case $ac_mode in
18367 :L) ac_source=$1;;
18368 :[FH])
18369 ac_file_inputs=
18370 for ac_f
18371 do
18372 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018373 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374 *) # Look for the file first in the build tree, then in the source tree
18375 # (if the path is not absolute). The absolute path cannot be DOS-style,
18376 # because $ac_f cannot contain `:'.
18377 test -f "$ac_f" ||
18378 case $ac_f in
18379 [\\/$]*) false;;
18380 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18381 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018382 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018384 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18385 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386 done
18387
18388 # Let's still pretend it is `configure' which instantiates (i.e., don't
18389 # use $as_me), people would be surprised to read:
18390 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018391 configure_input='Generated from '`
18392 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18393 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394 if test x"$ac_file" != x-; then
18395 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018396 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18397$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018399 # Neutralize special characters interpreted by sed in replacement strings.
18400 case $configure_input in #(
18401 *\&* | *\|* | *\\* )
18402 ac_sed_conf_input=`$as_echo "$configure_input" |
18403 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18404 *) ac_sed_conf_input=$configure_input;;
18405 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406
18407 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018408 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18409 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018410 esac
18411 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 esac
18413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018415$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416 X"$ac_file" : 'X\(//\)[^/]' \| \
18417 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018419$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18421 s//\1/
18422 q
18423 }
18424 /^X\(\/\/\)[^/].*/{
18425 s//\1/
18426 q
18427 }
18428 /^X\(\/\/\)$/{
18429 s//\1/
18430 q
18431 }
18432 /^X\(\/\).*/{
18433 s//\1/
18434 q
18435 }
18436 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018437 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 ac_builddir=.
18439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440case "$ac_dir" in
18441.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18442*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018443 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018445 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018446 case $ac_top_builddir_sub in
18447 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18448 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18449 esac ;;
18450esac
18451ac_abs_top_builddir=$ac_pwd
18452ac_abs_builddir=$ac_pwd$ac_dir_suffix
18453# for backward compatibility:
18454ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018455
18456case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459 ac_top_srcdir=$ac_top_builddir_sub
18460 ac_abs_top_srcdir=$ac_pwd ;;
18461 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463 ac_top_srcdir=$srcdir
18464 ac_abs_top_srcdir=$srcdir ;;
18465 *) # Relative name.
18466 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18467 ac_top_srcdir=$ac_top_build_prefix$srcdir
18468 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018469esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018471
Martin v. Löwis11437992002-04-12 09:54:03 +000018472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473 case $ac_mode in
18474 :F)
18475 #
18476 # CONFIG_FILE
18477 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018478
18479 case $INSTALL in
18480 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018483 ac_MKDIR_P=$MKDIR_P
18484 case $MKDIR_P in
18485 [\\/$]* | ?:[\\/]* ) ;;
18486 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18487 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018488_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489
Matthias Kloseb9621712010-04-24 17:59:49 +000018490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491# If the template does not know about datarootdir, expand it.
18492# FIXME: This hack should be removed a few years after 2.60.
18493ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018494ac_sed_dataroot='
18495/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496 p
18497 q
18498}
18499/@datadir@/p
18500/@docdir@/p
18501/@infodir@/p
18502/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018503/@mandir@/p'
18504case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505*datarootdir*) ac_datarootdir_seen=yes;;
18506*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18508$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511 ac_datarootdir_hack='
18512 s&@datadir@&$datadir&g
18513 s&@docdir@&$docdir&g
18514 s&@infodir@&$infodir&g
18515 s&@localedir@&$localedir&g
18516 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018517 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518esac
18519_ACEOF
18520
18521# Neutralize VPATH when `$srcdir' = `.'.
18522# Shell code in configure.ac might set extrasub.
18523# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18525ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018526$extrasub
18527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018529:t
18530/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018531s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018533s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534s&@srcdir@&$ac_srcdir&;t t
18535s&@abs_srcdir@&$ac_abs_srcdir&;t t
18536s&@top_srcdir@&$ac_top_srcdir&;t t
18537s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18538s&@builddir@&$ac_builddir&;t t
18539s&@abs_builddir@&$ac_abs_builddir&;t t
18540s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18541s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018542s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018544"
Victor Stinnere0be4232011-10-25 13:06:09 +020018545eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18546 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018549 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18550 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18551 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018553which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018554$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018555which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018556
Victor Stinnere0be4232011-10-25 13:06:09 +020018557 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018558 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018559 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18560 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018561 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018562 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018563 ;;
18564 :H)
18565 #
18566 # CONFIG_HEADER
18567 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018569 {
18570 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018571 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18572 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018573 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018574 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018575 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18576$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018578 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018579 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018580 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 fi
18582 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018583 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018584 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018585 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018587 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018589
18590 esac
18591
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018592
18593 case $ac_file$ac_mode in
18594 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18595
18596 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597done # for ac_tag
18598
Guido van Rossum627b2d71993-12-24 10:39:16 +000018599
Matthias Kloseb9621712010-04-24 17:59:49 +000018600as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018601_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018602ac_clean_files=$ac_clean_files_save
18603
Matthias Kloseb9621712010-04-24 17:59:49 +000018604test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018605 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018606
Martin v. Löwis11437992002-04-12 09:54:03 +000018607
18608# configure is writing to config.log, and then calls config.status.
18609# config.status does its own redirection, appending to config.log.
18610# Unfortunately, on DOS this fails, as config.log is still kept open
18611# by configure, so config.status won't be able to write to it; its
18612# output is simply discarded. So we exec the FD to /dev/null,
18613# effectively closing config.log, so it can be properly (re)opened and
18614# appended to by config.status. When coming back to configure, we
18615# need to make the FD available again.
18616if test "$no_create" != yes; then
18617 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018618 ac_config_status_args=
18619 test "$silent" = yes &&
18620 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018621 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018622 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 exec 5>>config.log
18624 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18625 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018626 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018627fi
18628if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18630$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018631fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018632
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018633
Christian Heimes75ed8902013-11-20 01:11:18 +010018634echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018635if test ! -f Modules/Setup.local
18636then
18637 echo "# Edit this file for local setup changes" >Modules/Setup.local
18638fi
18639
Christian Heimes75ed8902013-11-20 01:11:18 +010018640echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018641$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018642 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018643 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018644mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018645
18646if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18647 echo "" >&6
18648 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018649 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 +000018650 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018651 echo "" >&6
18652 echo "" >&6
18653fi
18654