blob: cb5f130d38e051767c43664d913e3cfb7a7873eb [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.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
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'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
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
684target_os
685target_vendor
686target_cpu
687target
688LLVM_AR
Miss Islington (bot)24066722019-07-22 13:17:23 -0700689PROFILE_TASK
Brett Cannon63d98bc2016-09-06 17:12:40 -0700690DEF_MAKE_RULE
691DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000693LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100694MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000695INSTALL_DATA
696INSTALL_SCRIPT
697INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200698ac_ct_READELF
699READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000700ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200701ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000703GNULD
704LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000705LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000706RUNSHARED
707INSTSONAME
708LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000709PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000710BLDLIBRARY
711DLLLIBRARY
712LDLIBRARY
713LIBRARY
714BUILDEXEEXT
715EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200716NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200717MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200718PLATFORM_TRIPLET
719MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200720ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721MAINCC
722CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700723SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200724GREP
725CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000726OBJEXT
727EXEEXT
728ac_ct_CC
729CPPFLAGS
730LDFLAGS
731CFLAGS
732CC
733EXPORT_MACOSX_DEPLOYMENT_TARGET
734CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200735_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000736MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000737FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800739FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000740FRAMEWORKALTINSTALLLAST
741FRAMEWORKALTINSTALLFIRST
742FRAMEWORKINSTALLLAST
743FRAMEWORKINSTALLFIRST
744PYTHONFRAMEWORKINSTALLDIR
745PYTHONFRAMEWORKPREFIX
746PYTHONFRAMEWORKDIR
747PYTHONFRAMEWORKIDENTIFIER
748PYTHONFRAMEWORK
749LIPO_32BIT_FLAGS
750ARCH_RUN_32BIT
751UNIVERSALSDK
752CONFIG_ARGS
753SOVERSION
754VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200755PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200756PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100757host_os
758host_vendor
759host_cpu
760host
761build_os
762build_vendor
763build_cpu
764build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500765HAS_GIT
766GITBRANCH
767GITTAG
768GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400769BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000770target_alias
771host_alias
772build_alias
773LIBS
774ECHO_T
775ECHO_N
776ECHO_C
777DEFS
778mandir
779localedir
780libdir
781psdir
782pdfdir
783dvidir
784htmldir
785infodir
786docdir
787oldincludedir
788includedir
789localstatedir
790sharedstatedir
791sysconfdir
792datadir
793datarootdir
794libexecdir
795sbindir
796bindir
797program_transform_name
798prefix
799exec_prefix
800PACKAGE_URL
801PACKAGE_BUGREPORT
802PACKAGE_STRING
803PACKAGE_VERSION
804PACKAGE_TARNAME
805PACKAGE_NAME
806PATH_SEPARATOR
807SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000808ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000809ac_user_opts='
810enable_option_checking
811enable_universalsdk
812with_universal_archs
813with_framework_name
814enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200820with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200821with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000822enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700823with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100824with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100825with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800826with_memory_sanitizer
827with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_libs
829with_system_expat
830with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100831with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000832enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700833with_tcltk_includes
834with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000836enable_ipv6
837with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000839with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700841with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_libm
843with_libc
844enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800846with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100847with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100848with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000849'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 ac_precious_vars='build_alias
851host_alias
852target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100853MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854CC
855CFLAGS
856LDFLAGS
857LIBS
858CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800859CPP
Miss Islington (bot)24066722019-07-22 13:17:23 -0700860PROFILE_TASK
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800861PKG_CONFIG
862PKG_CONFIG_PATH
863PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867ac_init_help=
868ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000869ac_unrecognized_opts=
870ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871# The variables have the same names as the options, with
872# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000873cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876no_recursion=
877prefix=NONE
878program_prefix=NONE
879program_suffix=NONE
880program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885x_includes=NONE
886x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000887
888# Installation directory options.
889# These are left unexpanded so users can "make install exec_prefix=/foo"
890# and all the variables that are supposed to be based on exec_prefix
891# by default will actually change.
892# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894bindir='${exec_prefix}/bin'
895sbindir='${exec_prefix}/sbin'
896libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897datarootdir='${prefix}/share'
898datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899sysconfdir='${prefix}/etc'
900sharedstatedir='${prefix}/com'
901localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902includedir='${prefix}/include'
903oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
905infodir='${datarootdir}/info'
906htmldir='${docdir}'
907dvidir='${docdir}'
908pdfdir='${docdir}'
909psdir='${docdir}'
910libdir='${exec_prefix}/lib'
911localedir='${datarootdir}/locale'
912mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 # If the previous option needs an argument, assign it.
919 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 ac_prev=
922 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200926 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
927 *=) ac_optarg= ;;
928 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Accept the important Cygnus configure options, so we can diagnose typos.
932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 case $ac_dashdash$ac_option in
934 --)
935 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -bindir | --bindir | --bindi | --bind | --bin | --bi)
938 ac_prev=bindir ;;
939 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 -cache-file | --cache-file | --cache-fil | --cache-fi \
948 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
949 ac_prev=cache_file ;;
950 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
951 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 cache_file=$ac_optarg ;;
953
954 --config-cache | -C)
955 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
963 | --dataroo | --dataro | --datar)
964 ac_prev=datarootdir ;;
965 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
966 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
967 datarootdir=$ac_optarg ;;
968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200973 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 ac_useropt_orig=$ac_useropt
975 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
976 case $ac_user_opts in
977 *"
978"enable_$ac_useropt"
979"*) ;;
980 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
981 ac_unrecognized_sep=', ';;
982 esac
983 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984
985 -docdir | --docdir | --docdi | --doc | --do)
986 ac_prev=docdir ;;
987 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
988 docdir=$ac_optarg ;;
989
990 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
991 ac_prev=dvidir ;;
992 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
993 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200999 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001000 ac_useropt_orig=$ac_useropt
1001 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1002 case $ac_user_opts in
1003 *"
1004"enable_$ac_useropt"
1005"*) ;;
1006 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1007 ac_unrecognized_sep=', ';;
1008 esac
1009 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1012 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1013 | --exec | --exe | --ex)
1014 ac_prev=exec_prefix ;;
1015 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1016 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1017 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001021 # Obsolete; use --with-gas.
1022 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 -help | --help | --hel | --he | -h)
1025 ac_init_help=long ;;
1026 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1027 ac_init_help=recursive ;;
1028 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1029 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
1031 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1037 ac_prev=htmldir ;;
1038 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1039 | --ht=*)
1040 htmldir=$ac_optarg ;;
1041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -includedir | --includedir | --includedi | --included | --include \
1043 | --includ | --inclu | --incl | --inc)
1044 ac_prev=includedir ;;
1045 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1046 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -infodir | --infodir | --infodi | --infod | --info | --inf)
1050 ac_prev=infodir ;;
1051 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libdir | --libdir | --libdi | --libd)
1055 ac_prev=libdir ;;
1056 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1060 | --libexe | --libex | --libe)
1061 ac_prev=libexecdir ;;
1062 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1063 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 -localedir | --localedir | --localedi | --localed | --locale)
1067 ac_prev=localedir ;;
1068 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1069 localedir=$ac_optarg ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 ac_prev=localstatedir ;;
1074 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1079 ac_prev=mandir ;;
1080 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 # Obsolete; use --without-fp.
1085 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 no_create=yes ;;
1090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1092 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1093 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1096 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1097 | --oldin | --oldi | --old | --ol | --o)
1098 ac_prev=oldincludedir ;;
1099 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1100 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1101 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1105 ac_prev=prefix ;;
1106 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1110 | --program-pre | --program-pr | --program-p)
1111 ac_prev=program_prefix ;;
1112 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1113 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1117 | --program-suf | --program-su | --program-s)
1118 ac_prev=program_suffix ;;
1119 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1120 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
1123 -program-transform-name | --program-transform-name \
1124 | --program-transform-nam | --program-transform-na \
1125 | --program-transform-n | --program-transform- \
1126 | --program-transform | --program-transfor \
1127 | --program-transfo | --program-transf \
1128 | --program-trans | --program-tran \
1129 | --progr-tra | --program-tr | --program-t)
1130 ac_prev=program_transform_name ;;
1131 -program-transform-name=* | --program-transform-name=* \
1132 | --program-transform-nam=* | --program-transform-na=* \
1133 | --program-transform-n=* | --program-transform-=* \
1134 | --program-transform=* | --program-transfor=* \
1135 | --program-transfo=* | --program-transf=* \
1136 | --program-trans=* | --program-tran=* \
1137 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1141 ac_prev=pdfdir ;;
1142 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1143 pdfdir=$ac_optarg ;;
1144
1145 -psdir | --psdir | --psdi | --psd | --ps)
1146 ac_prev=psdir ;;
1147 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1148 psdir=$ac_optarg ;;
1149
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1151 | -silent | --silent | --silen | --sile | --sil)
1152 silent=yes ;;
1153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155 ac_prev=sbindir ;;
1156 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
1160 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162 | --sharedst | --shareds | --shared | --share | --shar \
1163 | --sha | --sh)
1164 ac_prev=sharedstatedir ;;
1165 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 -site | --site | --sit)
1172 ac_prev=site ;;
1173 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177 ac_prev=srcdir ;;
1178 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182 | --syscon | --sysco | --sysc | --sys | --sy)
1183 ac_prev=sysconfdir ;;
1184 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194 verbose=yes ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 -version | --version | --versio | --versi | --vers | -V)
1197 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
1221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 --x)
1232 # Obsolete; use --with-x.
1233 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236 | --x-incl | --x-inc | --x-in | --x-i)
1237 ac_prev=x_includes ;;
1238 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244 ac_prev=x_libraries ;;
1245 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 *=*)
1254 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_envvar in #(
1257 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 export $ac_envvar ;;
1262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001268 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ;;
1270
1271 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272done
1273
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277fi
1278
Matthias Kloseb9621712010-04-24 17:59:49 +00001279if test -n "$ac_unrecognized_opts"; then
1280 case $enable_option_checking in
1281 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284 esac
1285fi
1286
1287# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289 datadir sysconfdir sharedstatedir localstatedir includedir \
1290 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Pablo Galindoaac4d032019-05-31 19:39:47 +01001291 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 # Remove trailing slashes.
1295 case $ac_val in
1296 */ )
1297 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298 eval $ac_var=\$ac_val;;
1299 esac
1300 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 [\\/$]* | ?:[\\/]* ) continue;;
1303 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317 if test "x$build_alias" = x; then
1318 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 elif test "x$build_alias" != "x$host_alias"; then
1320 cross_compiling=yes
1321 fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344 X"$as_myself" : 'X\(//\)[^/]' \| \
1345 X"$as_myself" : 'X\(//\)$' \| \
1346 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)[^/].*/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\).*/{
1361 s//\1/
1362 q
1363 }
1364 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367 srcdir=..
1368 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372if test ! -r "$srcdir/$ac_unique_file"; then
1373 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379 pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382 srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_env_${ac_var}_value=\$${ac_var}
1393 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401 # Omit some internal or obsolete options to make the list less imposing.
1402 # This message is too long to be a string in the A/UX 3.1 sh.
1403 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001404\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE. See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414 -h, --help display this help and exit
1415 --help=short display options specific to this package
1416 --help=recursive display the short help of all the included packages
1417 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001418 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --cache-file=FILE cache test results in FILE [disabled]
1420 -C, --config-cache alias for \`--cache-file=config.cache'
1421 -n, --no-create do not create output files
1422 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1423
Martin v. Löwis11437992002-04-12 09:54:03 +00001424Installation directories:
1425 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --bindir=DIR user executables [EPREFIX/bin]
1439 --sbindir=DIR system admin executables [EPREFIX/sbin]
1440 --libexecdir=DIR program executables [EPREFIX/libexec]
1441 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1442 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1443 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1444 --libdir=DIR object code libraries [EPREFIX/lib]
1445 --includedir=DIR C header files [PREFIX/include]
1446 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1447 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1448 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1449 --infodir=DIR info documentation [DATAROOTDIR/info]
1450 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1451 --mandir=DIR man documentation [DATAROOTDIR/man]
1452 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1453 --htmldir=DIR html documentation [DOCDIR]
1454 --dvidir=DIR dvi documentation [DOCDIR]
1455 --pdfdir=DIR pdf documentation [DOCDIR]
1456 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457_ACEOF
1458
1459 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001464 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001470 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 cat <<\_ACEOF
1473
1474Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1477 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001478 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001479 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-framework[=INSTALLDIR]
1481 Build (MacOSX|Darwin) framework
1482 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001483 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001484 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1485 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001486 --enable-loadable-sqlite-extensions
1487 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-ipv6 Enable ipv6 (with ipv4) support
1489 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001490 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493Optional Packages:
1494 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1495 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001496 --with-universal-archs=ARCH
1497 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001498 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1499 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001500 --with-framework-name=FRAMEWORK
1501 specify an alternate name of the framework built
1502 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001503 --with-cxx-main=<compiler>
1504 compile main() and link python executable with C++
1505 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-suffix=.exe set executable suffix
1507 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001508 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001509 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001510 --with-lto Enable Link Time Optimization in any build. Disabled
1511 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001512 --with-hash-algorithm=[fnv|siphash24]
1513 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001514 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001515 enable AddressSanitizer (asan)
1516 --with-memory-sanitizer enable MemorySanitizer (msan)
1517 --with-undefined-behavior-sanitizer
1518 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001520 --with-system-expat build pyexpat module using an installed expat
1521 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001522 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001523 --with-system-libmpdec build _decimal module using an installed libmpdec
1524 library
Ned Deilyd819b932013-09-06 01:07:05 -07001525 --with-tcltk-includes='-I...'
1526 override search for Tcl and Tk include files
1527 --with-tcltk-libs='-L...'
1528 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001529 --with-dbmliborder=db1:db2:...
1530 order to check db backends for dbm. Valid value is a
1531 colon separated string with the backend names
1532 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-doc-strings disable/enable documentation strings
1534 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001535 --with(out)-c-locale-coercion
1536 disable/enable C locale coercion to a UTF-8 based
1537 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001538 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001539 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with-libm=STRING math library
1541 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001542 --with(out)-computed-gotos
1543 Use computed gotos in evaluation loop (enabled by
1544 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001545 --with(out)-ensurepip=[=upgrade]
1546 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001547 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001548 --with-ssl-default-suites=[python|openssl|STRING]
1549 Override default cipher suites string, python: use
1550 Python's preferred selection (default), openssl:
1551 leave OpenSSL's defaults untouched, STRING: use a
1552 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001555 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CC C compiler command
1557 CFLAGS C compiler flags
1558 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1559 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CPP C preprocessor
Miss Islington (bot)24066722019-07-22 13:17:23 -07001564 PROFILE_TASK
1565 Python args for PGO generation task
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001566 PKG_CONFIG path to pkg-config utility
1567 PKG_CONFIG_PATH
1568 directories to add to pkg-config's search path
1569 PKG_CONFIG_LIBDIR
1570 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001571
1572Use these variables to override the choices made by `configure' or to help
1573it to find libraries and programs with nonstandard names/locations.
1574
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001575Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001578fi
1579
1580if test "$ac_init_help" = "recursive"; then
1581 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 test -d "$ac_dir" ||
1584 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1585 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 ac_builddir=.
1587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588case "$ac_dir" in
1589.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001593 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $ac_top_builddir_sub in
1595 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1596 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1597 esac ;;
1598esac
1599ac_abs_top_builddir=$ac_pwd
1600ac_abs_builddir=$ac_pwd$ac_dir_suffix
1601# for backward compatibility:
1602ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001603
1604case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$ac_top_builddir_sub
1608 ac_abs_top_srcdir=$ac_pwd ;;
1609 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 ac_top_srcdir=$srcdir
1612 ac_abs_top_srcdir=$srcdir ;;
1613 *) # Relative name.
1614 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1615 ac_top_srcdir=$ac_top_build_prefix$srcdir
1616 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001617esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 cd "$ac_dir" || { ac_status=$?; continue; }
1621 # Check for guested configure.
1622 if test -f "$ac_srcdir/configure.gnu"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1625 elif test -f "$ac_srcdir/configure"; then
1626 echo &&
1627 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001629 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 fi || ac_status=$?
1631 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 done
1633fi
1634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001636if $ac_init_version; then
1637 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001638python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001639generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001641Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001642This configure script is free software; the Free Software Foundation
1643gives unlimited permission to copy, distribute and modify it.
1644_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001647
1648## ------------------------ ##
1649## Autoconf initialization. ##
1650## ------------------------ ##
1651
1652# ac_fn_c_try_compile LINENO
1653# --------------------------
1654# Try to compile conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_compile ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 rm -f conftest.$ac_objext
1659 if { { ac_try="$ac_compile"
1660case "(($ac_try" in
1661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1662 *) ac_try_echo=$ac_try;;
1663esac
1664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1665$as_echo "$ac_try_echo"; } >&5
1666 (eval "$ac_compile") 2>conftest.err
1667 ac_status=$?
1668 if test -s conftest.err; then
1669 grep -v '^ *+' conftest.err >conftest.er1
1670 cat conftest.er1 >&5
1671 mv -f conftest.er1 conftest.err
1672 fi
1673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1674 test $ac_status = 0; } && {
1675 test -z "$ac_c_werror_flag" ||
1676 test ! -s conftest.err
1677 } && test -s conftest.$ac_objext; then :
1678 ac_retval=0
1679else
1680 $as_echo "$as_me: failed program was:" >&5
1681sed 's/^/| /' conftest.$ac_ext >&5
1682
1683 ac_retval=1
1684fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001685 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001686 as_fn_set_status $ac_retval
1687
1688} # ac_fn_c_try_compile
1689
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001690# ac_fn_c_try_cpp LINENO
1691# ----------------------
1692# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1693ac_fn_c_try_cpp ()
1694{
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696 if { { ac_try="$ac_cpp conftest.$ac_ext"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } > conftest.i && {
1712 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 }; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=1
1721fi
1722 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_cpp
1726
Matthias Kloseb9621712010-04-24 17:59:49 +00001727# ac_fn_c_try_link LINENO
1728# -----------------------
1729# Try to link conftest.$ac_ext, and return whether this succeeded.
1730ac_fn_c_try_link ()
1731{
1732 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1733 rm -f conftest.$ac_objext conftest$ac_exeext
1734 if { { ac_try="$ac_link"
1735case "(($ac_try" in
1736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1737 *) ac_try_echo=$ac_try;;
1738esac
1739eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1740$as_echo "$ac_try_echo"; } >&5
1741 (eval "$ac_link") 2>conftest.err
1742 ac_status=$?
1743 if test -s conftest.err; then
1744 grep -v '^ *+' conftest.err >conftest.er1
1745 cat conftest.er1 >&5
1746 mv -f conftest.er1 conftest.err
1747 fi
1748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749 test $ac_status = 0; } && {
1750 test -z "$ac_c_werror_flag" ||
1751 test ! -s conftest.err
1752 } && test -s conftest$ac_exeext && {
1753 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001754 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 }; then :
1756 ac_retval=0
1757else
1758 $as_echo "$as_me: failed program was:" >&5
1759sed 's/^/| /' conftest.$ac_ext >&5
1760
1761 ac_retval=1
1762fi
1763 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1764 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1765 # interfere with the next link command; also delete a directory that is
1766 # left behind by Apple's compiler. We do this before executing the actions.
1767 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 as_fn_set_status $ac_retval
1770
1771} # ac_fn_c_try_link
1772
Matthias Kloseb9621712010-04-24 17:59:49 +00001773# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1774# -------------------------------------------------------
1775# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1776# the include files in INCLUDES and setting the cache variable VAR
1777# accordingly.
1778ac_fn_c_check_header_mongrel ()
1779{
1780 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001781 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1783$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001784if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001785 $as_echo_n "(cached) " >&6
1786fi
1787eval ac_res=\$$3
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1789$as_echo "$ac_res" >&6; }
1790else
1791 # Is the header compilable?
1792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1793$as_echo_n "checking $2 usability... " >&6; }
1794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1795/* end confdefs.h. */
1796$4
1797#include <$2>
1798_ACEOF
1799if ac_fn_c_try_compile "$LINENO"; then :
1800 ac_header_compiler=yes
1801else
1802 ac_header_compiler=no
1803fi
1804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1806$as_echo "$ac_header_compiler" >&6; }
1807
1808# Is the header present?
1809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1810$as_echo_n "checking $2 presence... " >&6; }
1811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1812/* end confdefs.h. */
1813#include <$2>
1814_ACEOF
1815if ac_fn_c_try_cpp "$LINENO"; then :
1816 ac_header_preproc=yes
1817else
1818 ac_header_preproc=no
1819fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001820rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1822$as_echo "$ac_header_preproc" >&6; }
1823
1824# So? What about this header?
1825case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1826 yes:no: )
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1828$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1830$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1831 ;;
1832 no:yes:* )
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1834$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1836$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1838$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1840$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1842$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001843( $as_echo "## --------------------------------------- ##
1844## Report this to https://bugs.python.org/ ##
1845## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001846 ) | sed "s/^/$as_me: WARNING: /" >&2
1847 ;;
1848esac
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001851if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 $as_echo_n "(cached) " >&6
1853else
1854 eval "$3=\$ac_header_compiler"
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
1859fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001861
1862} # ac_fn_c_check_header_mongrel
1863
1864# ac_fn_c_try_run LINENO
1865# ----------------------
1866# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1867# that executables *can* be run.
1868ac_fn_c_try_run ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 if { { ac_try="$ac_link"
1872case "(($ac_try" in
1873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874 *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878 (eval "$ac_link") 2>&5
1879 ac_status=$?
1880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1881 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1882 { { case "(($ac_try" in
1883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888 (eval "$ac_try") 2>&5
1889 ac_status=$?
1890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1891 test $ac_status = 0; }; }; then :
1892 ac_retval=0
1893else
1894 $as_echo "$as_me: program exited with status $ac_status" >&5
1895 $as_echo "$as_me: failed program was:" >&5
1896sed 's/^/| /' conftest.$ac_ext >&5
1897
1898 ac_retval=$ac_status
1899fi
1900 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 as_fn_set_status $ac_retval
1903
1904} # ac_fn_c_try_run
1905
1906# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1907# -------------------------------------------------------
1908# Tests whether HEADER exists and can be compiled using the include files in
1909# INCLUDES, setting the cache variable VAR accordingly.
1910ac_fn_c_check_header_compile ()
1911{
1912 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1914$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001915if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001916 $as_echo_n "(cached) " >&6
1917else
1918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1919/* end confdefs.h. */
1920$4
1921#include <$2>
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 eval "$3=yes"
1925else
1926 eval "$3=no"
1927fi
1928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929fi
1930eval ac_res=\$$3
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001934
1935} # ac_fn_c_check_header_compile
1936
Matthias Kloseb9621712010-04-24 17:59:49 +00001937# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1938# -------------------------------------------
1939# Tests whether TYPE exists after having included INCLUDES, setting cache
1940# variable VAR accordingly.
1941ac_fn_c_check_type ()
1942{
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1945$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001946if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001947 $as_echo_n "(cached) " >&6
1948else
1949 eval "$3=no"
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$4
1953int
1954main ()
1955{
1956if (sizeof ($2))
1957 return 0;
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1964/* end confdefs.h. */
1965$4
1966int
1967main ()
1968{
1969if (sizeof (($2)))
1970 return 0;
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 eval "$3=yes"
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989} # ac_fn_c_check_type
1990
Matthias Kloseb9621712010-04-24 17:59:49 +00001991# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1992# --------------------------------------------
1993# Tries to find the compile-time value of EXPR in a program that includes
1994# INCLUDES, setting VAR accordingly. Returns whether the value could be
1995# computed
1996ac_fn_c_compute_int ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if test "$cross_compiling" = yes; then
2000 # Depending upon the size, compute the lo and hi bounds.
2001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002008test_array [0] = 0;
2009return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011 ;
2012 return 0;
2013}
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016 ac_lo=0 ac_mid=0
2017 while :; do
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h. */
2020$4
2021int
2022main ()
2023{
2024static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002025test_array [0] = 0;
2026return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002052test_array [0] = 0;
2053return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002069test_array [0] = 0;
2070return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002071
2072 ;
2073 return 0;
2074}
2075_ACEOF
2076if ac_fn_c_try_compile "$LINENO"; then :
2077 ac_lo=$ac_mid; break
2078else
2079 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2080 if test $ac_mid -le $ac_hi; then
2081 ac_lo= ac_hi=
2082 break
2083 fi
2084 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087 done
2088else
2089 ac_lo= ac_hi=
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094# Binary search between lo and hi bounds.
2095while test "x$ac_lo" != "x$ac_hi"; do
2096 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid
2113else
2114 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117done
2118case $ac_lo in #((
2119?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2120'') ac_retval=1 ;;
2121esac
2122 else
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126static long int longval () { return $2; }
2127static unsigned long int ulongval () { return $2; }
2128#include <stdio.h>
2129#include <stdlib.h>
2130int
2131main ()
2132{
2133
2134 FILE *f = fopen ("conftest.val", "w");
2135 if (! f)
2136 return 1;
2137 if (($2) < 0)
2138 {
2139 long int i = longval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%ld", i);
2143 }
2144 else
2145 {
2146 unsigned long int i = ulongval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%lu", i);
2150 }
2151 /* Do not output a trailing newline, as this causes \r\n confusion
2152 on some platforms. */
2153 return ferror (f) || fclose (f) != 0;
2154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_run "$LINENO"; then :
2160 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2161else
2162 ac_retval=1
2163fi
2164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2165 conftest.$ac_objext conftest.beam conftest.$ac_ext
2166rm -f conftest.val
2167
2168 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002169 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002170 as_fn_set_status $ac_retval
2171
2172} # ac_fn_c_compute_int
2173
2174# ac_fn_c_check_func LINENO FUNC VAR
2175# ----------------------------------
2176# Tests whether FUNC exists, setting the cache variable VAR accordingly
2177ac_fn_c_check_func ()
2178{
2179 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2181$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002182if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002183 $as_echo_n "(cached) " >&6
2184else
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186/* end confdefs.h. */
2187/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2188 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2189#define $2 innocuous_$2
2190
2191/* System header to define __stub macros and hopefully few prototypes,
2192 which can conflict with char $2 (); below.
2193 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2194 <limits.h> exists even on freestanding compilers. */
2195
2196#ifdef __STDC__
2197# include <limits.h>
2198#else
2199# include <assert.h>
2200#endif
2201
2202#undef $2
2203
2204/* Override any GCC internal prototype to avoid an error.
2205 Use char because int might match the return type of a GCC
2206 builtin and then its argument prototype would still apply. */
2207#ifdef __cplusplus
2208extern "C"
2209#endif
2210char $2 ();
2211/* The GNU C library defines this for functions which it implements
2212 to always fail with ENOSYS. Some functions are actually named
2213 something starting with __ and the normal name is an alias. */
2214#if defined __stub_$2 || defined __stub___$2
2215choke me
2216#endif
2217
2218int
2219main ()
2220{
2221return $2 ();
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_link "$LINENO"; then :
2227 eval "$3=yes"
2228else
2229 eval "$3=no"
2230fi
2231rm -f core conftest.err conftest.$ac_objext \
2232 conftest$ac_exeext conftest.$ac_ext
2233fi
2234eval ac_res=\$$3
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2236$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002237 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002238
2239} # ac_fn_c_check_func
2240
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002241# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2242# ---------------------------------------------
2243# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2244# accordingly.
2245ac_fn_c_check_decl ()
2246{
2247 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248 as_decl_name=`echo $2|sed 's/ *(.*//'`
2249 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2251$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2252if eval \${$3+:} false; then :
2253 $as_echo_n "(cached) " >&6
2254else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
2257$4
2258int
2259main ()
2260{
2261#ifndef $as_decl_name
2262#ifdef __cplusplus
2263 (void) $as_decl_use;
2264#else
2265 (void) $as_decl_name;
2266#endif
2267#endif
2268
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$3=yes"
2275else
2276 eval "$3=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280eval ac_res=\$$3
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282$as_echo "$ac_res" >&6; }
2283 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2284
2285} # ac_fn_c_check_decl
2286
Matthias Kloseb9621712010-04-24 17:59:49 +00002287# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2288# ----------------------------------------------------
2289# Tries to find if the field MEMBER exists in type AGGR, after including
2290# INCLUDES, setting cache variable VAR accordingly.
2291ac_fn_c_check_member ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2295$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002296if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301$5
2302int
2303main ()
2304{
2305static $2 ac_aggr;
2306if (ac_aggr.$3)
2307return 0;
2308 ;
2309 return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
2313 eval "$4=yes"
2314else
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316/* end confdefs.h. */
2317$5
2318int
2319main ()
2320{
2321static $2 ac_aggr;
2322if (sizeof ac_aggr.$3)
2323return 0;
2324 ;
2325 return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"; then :
2329 eval "$4=yes"
2330else
2331 eval "$4=no"
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336fi
2337eval ac_res=\$$4
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002341
2342} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002344This file contains any messages produced by compilers while
2345running configure, to aid debugging if configure makes a mistake.
2346
Ned Deily5489bda2018-01-31 17:44:09 -05002347It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002348generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002349
2350 $ $0 $@
2351
2352_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002354{
2355cat <<_ASUNAME
2356## --------- ##
2357## Platform. ##
2358## --------- ##
2359
2360hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2361uname -m = `(uname -m) 2>/dev/null || echo unknown`
2362uname -r = `(uname -r) 2>/dev/null || echo unknown`
2363uname -s = `(uname -s) 2>/dev/null || echo unknown`
2364uname -v = `(uname -v) 2>/dev/null || echo unknown`
2365
2366/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2367/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2368
2369/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2370/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2371/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002373/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2374/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2375/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2376
2377_ASUNAME
2378
2379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380for as_dir in $PATH
2381do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002384 $as_echo "PATH: $as_dir"
2385 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002387
2388} >&5
2389
2390cat >&5 <<_ACEOF
2391
2392
2393## ----------- ##
2394## Core tests. ##
2395## ----------- ##
2396
2397_ACEOF
2398
2399
2400# Keep a trace of the command line.
2401# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002404# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002405ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_configure_args0=
2407ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002408ac_must_keep_next=false
2409for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002410do
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 for ac_arg
2412 do
2413 case $ac_arg in
2414 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2415 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2416 | -silent | --silent | --silen | --sile | --sil)
2417 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 esac
2421 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002428 case $ac_arg in
2429 *=* | --config-cache | -C | -disable-* | --disable-* \
2430 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2431 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2432 | -with-* | --with-* | -without-* | --without-* | --x)
2433 case "$ac_configure_args0 " in
2434 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2435 esac
2436 ;;
2437 -* ) ac_must_keep_next=true ;;
2438 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002440 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002441 ;;
2442 esac
2443 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002444done
Matthias Kloseb9621712010-04-24 17:59:49 +00002445{ ac_configure_args0=; unset ac_configure_args0;}
2446{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
2448# When interrupted or exit'd, cleanup temporary files, and complete
2449# config.log. We remove comments because anyway the quotes in there
2450# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451# WARNING: Use '\'' to represent an apostrophe within the trap.
2452# 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 +00002453trap 'exit_status=$?
2454 # Save into config.log some information that might help in debugging.
2455 {
2456 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002457
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002459## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002460## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 echo
2462 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463(
2464 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2465 eval ac_val=\$$ac_var
2466 case $ac_val in #(
2467 *${as_nl}*)
2468 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2470$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac
2472 case $ac_var in #(
2473 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2475 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac ;;
2477 esac
2478 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2481 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 "s/'\''/'\''\\\\'\'''\''/g;
2484 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2485 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002488 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac |
2490 sort
2491)
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002493
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002495## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002496## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 echo
2498 for ac_var in $ac_subst_vars
2499 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 eval ac_val=\$$ac_var
2501 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002504 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 done | sort
2506 echo
2507
2508 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 echo
2513 for ac_var in $ac_subst_files
2514 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 eval ac_val=\$$ac_var
2516 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 done | sort
2521 echo
2522 fi
2523
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 echo
2531 fi
2532 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 $as_echo "$as_me: caught signal $ac_signal"
2534 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 rm -f core *.core core.conftest.* &&
2537 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002540for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002542done
2543ac_signal=0
2544
2545# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
Matthias Kloseb9621712010-04-24 17:59:49 +00002548$as_echo "/* confdefs.h */" > confdefs.h
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550# Predefined preprocessor variables.
2551
2552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_NAME "$PACKAGE_NAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_VERSION "$PACKAGE_VERSION"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_STRING "$PACKAGE_STRING"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2570_ACEOF
2571
Matthias Kloseb9621712010-04-24 17:59:49 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_URL "$PACKAGE_URL"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576
2577# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002578# Prefer an explicitly selected file to automatically selected ones.
2579ac_site_file1=NONE
2580ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582 # We do not want a PATH search for config.site.
2583 case $CONFIG_SITE in #((
2584 -*) ac_site_file1=./$CONFIG_SITE;;
2585 */*) ac_site_file1=$CONFIG_SITE;;
2586 *) ac_site_file1=./$CONFIG_SITE;;
2587 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$prefix/share/config.site
2590 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591else
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 ac_site_file1=$ac_default_prefix/share/config.site
2593 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002595for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596do
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 test "x$ac_site_file" = xNONE && continue
2598 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2599 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2600$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602 . "$ac_site_file" \
2603 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2605as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002606See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607 fi
2608done
2609
2610if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 # Some versions of bash will fail to source /dev/null (special files
2612 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2613 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2615$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2618 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 esac
2620 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621else
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2623$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 >$cache_file
2625fi
2626
2627# Check that the precious variables saved in the cache have kept the same
2628# value.
2629ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2632 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2634 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 case $ac_old_set,$ac_new_set in
2636 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2638$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 +00002639 ac_cache_corrupted=: ;;
2640 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2642$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 ac_cache_corrupted=: ;;
2644 ,);;
2645 *)
2646 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 # differences in whitespace do not lead to failure.
2648 ac_old_val_w=`echo x $ac_old_val`
2649 ac_new_val_w=`echo x $ac_new_val`
2650 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2652$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2653 ac_cache_corrupted=:
2654 else
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2656$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2657 eval $ac_var=\$ac_old_val
2658 fi
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2660$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2662$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 fi;;
2664 esac
2665 # Pass precious variables to config.status.
2666 if test "$ac_new_set" = set; then
2667 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 *) ac_arg=$ac_var=$ac_new_val ;;
2670 esac
2671 case " $ac_configure_args " in
2672 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 esac
2675 fi
2676done
2677if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2681$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002682 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002684## -------------------- ##
2685## Main body of script. ##
2686## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687
Guido van Rossum7f43da71994-08-01 12:15:30 +00002688ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2692ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693
Guido van Rossum627b2d71993-12-24 10:39:16 +00002694
Michael W. Hudson54241132001-12-07 15:38:26 +00002695
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696
Christian Heimesff5be6e2018-01-20 13:19:21 +01002697
2698
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002699if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002700 # If we're building out-of-tree, we need to make sure the following
2701 # resources get picked up before their $srcdir counterparts.
2702 # Objects/ -> typeslots.inc
2703 # Include/ -> Python-ast.h, graminit.h
2704 # Python/ -> importlib.h
2705 # (A side effect of this is that these resources will automatically be
2706 # regenerated when building out-of-tree, regardless of whether or not
2707 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2708 # off.)
2709 BASECPPFLAGS="-IObjects -IInclude -IPython"
2710else
2711 BASECPPFLAGS=""
2712fi
2713
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714
2715
2716
2717
Victor Stinner9ed34a82017-05-02 22:35:58 +02002718if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720# Extract the first word of "git", so it can be a program name with args.
2721set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2723$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725 $as_echo_n "(cached) " >&6
2726else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727 if test -n "$HAS_GIT"; then
2728 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729else
2730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2731for as_dir in $PATH
2732do
2733 IFS=$as_save_IFS
2734 test -z "$as_dir" && as_dir=.
2735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2739 break 2
2740 fi
2741done
2742 done
2743IFS=$as_save_IFS
2744
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746fi
2747fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748HAS_GIT=$ac_cv_prog_HAS_GIT
2749if test -n "$HAS_GIT"; then
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2751$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752else
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2754$as_echo "no" >&6; }
2755fi
2756
2757
2758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762then
Xiang Zhang4c855572018-08-20 22:36:19 +08002763 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2764 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2765 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002767 GITVERSION=""
2768 GITTAG=""
2769 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770fi
2771
2772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
2775
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002776ac_aux_dir=
2777for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2778 if test -f "$ac_dir/install-sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install-sh -c"
2781 break
2782 elif test -f "$ac_dir/install.sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install.sh -c"
2785 break
2786 elif test -f "$ac_dir/shtool"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/shtool install -c"
2789 break
2790 fi
2791done
2792if test -z "$ac_aux_dir"; then
2793 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2794fi
2795
2796# These three variables are undocumented and unsupported,
2797# and are intended to be withdrawn in a future Autoconf release.
2798# They can cause serious problems if a builder's source tree is in a directory
2799# whose full name contains unusual characters.
2800ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2801ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2802ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2803
2804
2805# Make sure we can run config.sub.
2806$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2807 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2808
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2810$as_echo_n "checking build system type... " >&6; }
2811if ${ac_cv_build+:} false; then :
2812 $as_echo_n "(cached) " >&6
2813else
2814 ac_build_alias=$build_alias
2815test "x$ac_build_alias" = x &&
2816 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2817test "x$ac_build_alias" = x &&
2818 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2819ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2820 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2821
2822fi
2823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2824$as_echo "$ac_cv_build" >&6; }
2825case $ac_cv_build in
2826*-*-*) ;;
2827*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2828esac
2829build=$ac_cv_build
2830ac_save_IFS=$IFS; IFS='-'
2831set x $ac_cv_build
2832shift
2833build_cpu=$1
2834build_vendor=$2
2835shift; shift
2836# Remember, the first character of IFS is used to create $*,
2837# except with old shells:
2838build_os=$*
2839IFS=$ac_save_IFS
2840case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2841
2842
2843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2844$as_echo_n "checking host system type... " >&6; }
2845if ${ac_cv_host+:} false; then :
2846 $as_echo_n "(cached) " >&6
2847else
2848 if test "x$host_alias" = x; then
2849 ac_cv_host=$ac_cv_build
2850else
2851 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2852 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2853fi
2854
2855fi
2856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2857$as_echo "$ac_cv_host" >&6; }
2858case $ac_cv_host in
2859*-*-*) ;;
2860*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2861esac
2862host=$ac_cv_host
2863ac_save_IFS=$IFS; IFS='-'
2864set x $ac_cv_host
2865shift
2866host_cpu=$1
2867host_vendor=$2
2868shift; shift
2869# Remember, the first character of IFS is used to create $*,
2870# except with old shells:
2871host_os=$*
2872IFS=$ac_save_IFS
2873case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2874
2875
2876
doko@python.orga10e4a92013-01-25 18:45:12 +01002877
2878
Ned Deilyfcbc2462014-08-22 13:32:49 -07002879# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2880rm -f pybuilddir.txt
2881
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882for ac_prog in python$PACKAGE_VERSION python3 python
2883do
2884 # Extract the first word of "$ac_prog", so it can be a program name with args.
2885set dummy $ac_prog; ac_word=$2
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2887$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002888if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889 $as_echo_n "(cached) " >&6
2890else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002891 if test -n "$PYTHON_FOR_REGEN"; then
2892 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893else
2894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2895for as_dir in $PATH
2896do
2897 IFS=$as_save_IFS
2898 test -z "$as_dir" && as_dir=.
2899 for ac_exec_ext in '' $ac_executable_extensions; do
2900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002901 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2903 break 2
2904 fi
2905done
2906 done
2907IFS=$as_save_IFS
2908
2909fi
2910fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002911PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2912if test -n "$PYTHON_FOR_REGEN"; then
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2914$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915else
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2917$as_echo "no" >&6; }
2918fi
2919
2920
Victor Stinnera5c62a82017-05-03 18:21:48 +02002921 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002923test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002924
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002925
2926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927if test "$cross_compiling" = yes; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2929$as_echo_n "checking for python interpreter for cross build... " >&6; }
2930 if test -z "$PYTHON_FOR_BUILD"; then
2931 for interp in python$PACKAGE_VERSION python3 python; do
2932 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002933 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 +02002934 break
2935 fi
2936 interp=
2937 done
2938 if test x$interp = x; then
2939 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2942$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002943 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 +02002944 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002945elif test "$cross_compiling" = maybe; then
2946 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002947else
2948 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2949fi
2950
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
Benjamin Petersond23f8222009-04-05 19:13:16 +00002953if test "$prefix" != "/"; then
2954 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2955fi
2956
2957
Martin v. Löwis11437992002-04-12 09:54:03 +00002958
2959
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002960# We don't use PACKAGE_ variables, and they cause conflicts
2961# with other autoconf-based packages that include Python.h
2962grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2963rm confdefs.h
2964mv confdefs.h.new confdefs.h
2965
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002966
Ned Deily5489bda2018-01-31 17:44:09 -05002967VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002968
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002969# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002970
2971SOVERSION=1.0
2972
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973# The later defininition of _XOPEN_SOURCE disables certain features
2974# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977
2978
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002984
2985
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002991
2992
Martin v. Löwisd6320502004-08-12 13:45:08 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002994# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998
2999
3000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003001define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003003# Arguments passed to configure.
3004
3005CONFIG_ARGS="$ac_configure_args"
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3008$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003010if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003011 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003012 case $enableval in
3013 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003014 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003015 # information
3016 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003017 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3020 if test ! -d "${enableval}"
3021 then
3022 enableval=/
3023 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003024 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003025 ;;
3026 esac
3027 case $enableval in
3028 no)
3029 UNIVERSALSDK=
3030 enable_universalsdk=
3031 ;;
3032 *)
3033 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 if test ! -d "${UNIVERSALSDK}"
3035 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003036 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038 ;;
3039 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042else
3043
3044 UNIVERSALSDK=
3045 enable_universalsdk=
3046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049if test -n "${UNIVERSALSDK}"
3050then
Matthias Kloseb9621712010-04-24 17:59:49 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3052$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053else
Matthias Kloseb9621712010-04-24 17:59:49 +00003054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3055$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deily87adb6e2013-10-18 21:09:56 -07003060ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003061
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062# For backward compatibility reasons we prefer to select '32-bit' if available,
3063# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003064UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065if test "`uname -s`" = "Darwin"
3066then
3067 if test -n "${UNIVERSALSDK}"
3068 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003069 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 then
3071 UNIVERSAL_ARCHS="intel"
3072 fi
3073 fi
3074fi
3075
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3078$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079
3080# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003081if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083 UNIVERSAL_ARCHS="$withval"
3084
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085fi
3086
Ned Deily87adb6e2013-10-18 21:09:56 -07003087if test -n "${UNIVERSALSDK}"
3088then
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3090$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3091else
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093$as_echo "no" >&6; }
3094fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003096
3097# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003098if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003099 withval=$with_framework_name;
3100 PYTHONFRAMEWORK=${withval}
3101 PYTHONFRAMEWORKDIR=${withval}.framework
3102 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3103
3104else
3105
3106 PYTHONFRAMEWORK=Python
3107 PYTHONFRAMEWORKDIR=Python.framework
3108 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3109
3110fi
3111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003115 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003116 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003117 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003118 esac
3119 case $enableval in
3120 no)
3121 PYTHONFRAMEWORK=
3122 PYTHONFRAMEWORKDIR=no-framework
3123 PYTHONFRAMEWORKPREFIX=
3124 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125 FRAMEWORKINSTALLFIRST=
3126 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 FRAMEWORKALTINSTALLFIRST=
3128 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003129 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003130 if test "x${prefix}" = "xNONE"; then
3131 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3132 else
3133 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3134 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003136 ;;
3137 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003141 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003142 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3143 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003144 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 if test "x${prefix}" = "xNONE" ; then
3148 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 else
3151 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3152 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
3154 case "${enableval}" in
3155 /System*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 if test "${prefix}" = "NONE" ; then
3158 # See below
3159 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3160 fi
3161 ;;
3162
3163 /Library*)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 ;;
3166
3167 */Library/Frameworks)
3168 MDIR="`dirname "${enableval}"`"
3169 MDIR="`dirname "${MDIR}"`"
3170 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3171
3172 if test "${prefix}" = "NONE"; then
3173 # User hasn't specified the
3174 # --prefix option, but wants to install
3175 # the framework in a non-default location,
3176 # ensure that the compatibility links get
3177 # installed relative to that prefix as well
3178 # instead of in /usr/local.
3179 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3180 fi
3181 ;;
3182
3183 *)
3184 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3185 ;;
3186 esac
3187
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003190 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003196 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3197
3198 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3199
Jack Jansene578a632001-08-15 01:27:14 +00003200 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Guido van Rossum563e7081996-09-10 18:20:48 +00003202else
Martin v. Löwis11437992002-04-12 09:54:03 +00003203
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003205 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003206 PYTHONFRAMEWORKPREFIX=
3207 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208 FRAMEWORKINSTALLFIRST=
3209 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 FRAMEWORKALTINSTALLFIRST=
3211 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003212 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 if test "x${prefix}" = "xNONE" ; then
3214 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3215 else
3216 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3217 fi
Jack Jansene578a632001-08-15 01:27:14 +00003218 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221fi
3222
Thomas Wouters477c8d52006-05-27 19:21:47 +00003223
3224
Michael W. Hudson54241132001-12-07 15:38:26 +00003225
3226
3227
3228
Jack Jansene578a632001-08-15 01:27:14 +00003229
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003230
3231
3232
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003233
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003234
Ned Deilyb8f944f2013-11-21 22:42:25 -08003235
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003236
3237cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003238#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003239_ACEOF
3240
3241
Jack Jansene578a632001-08-15 01:27:14 +00003242##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003243## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003244## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003245##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246# Set name for machine-dependent library files
3247
Matthias Kloseb9621712010-04-24 17:59:49 +00003248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3249$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250if test -z "$MACHDEP"
3251then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 # avoid using uname for cross builds
3253 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003254 # ac_sys_system and ac_sys_release are used for setting
3255 # a lot of different things including 'define_xopen_source'
3256 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003258 *-*-linux-android*)
3259 ac_sys_system=Linux-android
3260 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 *-*-linux*)
3262 ac_sys_system=Linux
3263 ;;
3264 *-*-cygwin*)
3265 ac_sys_system=Cygwin
3266 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003267 *-*-vxworks*)
3268 ac_sys_system=VxWorks
3269 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 *)
3271 # for now, limit cross builds to known configurations
3272 MACHDEP="unknown"
3273 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3274 esac
3275 ac_sys_release=
3276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003278 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003279 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003280 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 fi
3285 ac_md_system=`echo $ac_sys_system |
3286 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3287 ac_md_release=`echo $ac_sys_release |
3288 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3289 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003290
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003292 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
E. M. Brayb1fc4172019-05-24 18:39:39 +02003299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3300$as_echo "\"$MACHDEP\"" >&6; }
Guido van Rossum91922671997-10-09 20:24:13 +00003301
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003302
3303if test "$cross_compiling" = yes; then
3304 case "$host" in
3305 *-*-linux*)
3306 case "$host_cpu" in
3307 arm*)
3308 _host_cpu=arm
3309 ;;
3310 *)
3311 _host_cpu=$host_cpu
3312 esac
3313 ;;
3314 *-*-cygwin*)
3315 _host_cpu=
3316 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003317 *-*-vxworks*)
3318 _host_cpu=$host_cpu
3319 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003320 *)
3321 # for now, limit cross builds to known configurations
3322 MACHDEP="unknown"
3323 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3324 esac
3325 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3326fi
3327
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003328# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3329# disable features if it is defined, without any means to access these
3330# features as extensions. For these systems, we skip the definition of
3331# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3332# some feature, make sure there is no alternative way to access this
3333# feature. Also, when using wildcards, make sure you have verified the
3334# need for not defining _XOPEN_SOURCE on all systems matching the
3335# wildcard, and that the wildcard does not include future systems
3336# (which may remove their limitations).
3337case $ac_sys_system/$ac_sys_release in
3338 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3339 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003340 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003341 # In addition, Stefan Krah confirms that issue #1244610 exists through
3342 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003343 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344 define_xopen_source=no
3345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003350
3351 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003352 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3354 # also defined. This can be overridden by defining _BSD_SOURCE
3355 # As this has a different meaning on Linux, only define it on OpenBSD
3356
Matthias Kloseb9621712010-04-24 17:59:49 +00003357$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003358
3359 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003360 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3361 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3362 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003363 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 +00003364 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003365 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3366 # request to enable features supported by the standard as a request
3367 # to disable features not supported by the standard. The best way
3368 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3369 # entirely and define __EXTENSIONS__ instead.
3370 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003371 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3373 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003374 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003375 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003376 define_xopen_source=no;;
3377 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003378 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003381 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3382 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3383 # identifies itself as Darwin/7.*
3384 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # disables platform specific features beyond repair.
3386 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3387 # has no effect, don't bother defining them
3388 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003389 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003390 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3393 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3394 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003395 AIX/4)
3396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 AIX/5)
3398 if test `uname -r` -eq 1; then
3399 define_xopen_source=no
3400 fi
3401 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003402 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3403 # defining NI_NUMERICHOST.
3404 QNX/6.3.2)
3405 define_xopen_source=no
3406 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003407 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3408 # in network headers still using system V types.
3409 VxWorks/*)
3410 define_xopen_source=no
3411 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003412
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413esac
3414
3415if test $define_xopen_source = yes
3416then
Victor Stinner14d098d2011-09-07 22:29:43 +02003417 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Victor Stinner14d098d2011-09-07 22:29:43 +02003419$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3423 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3424 # several APIs are not declared. Since this is also needed in some
3425 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Matthias Kloseb9621712010-04-24 17:59:49 +00003427$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003430
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003431$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003433fi
3434
Christian Heimes647cd872013-12-07 23:39:33 +01003435# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3436case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003437 hp*|HP*)
3438 define_stdc_a1=yes;;
3439 *)
3440 define_stdc_a1=no;;
3441esac
3442
3443if test $define_stdc_a1 = yes
3444then
Christian Heimes647cd872013-12-07 23:39:33 +01003445
3446$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3447
Christian Heimesb02bcae2013-12-08 15:21:08 +01003448fi
Christian Heimes647cd872013-12-07 23:39:33 +01003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
Guido van Rossum8b131c51995-03-09 14:10:13 +00003466# If the user switches compilers, we can't believe the cache
3467if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3468then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003469 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003470(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003471fi
3472
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003473# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3474# when the compiler supports them, but we don't always want -O2, and
3475# we set -g later.
3476if test -z "$CFLAGS"; then
3477 CFLAGS=
3478fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479
3480if test "$ac_sys_system" = "Darwin"
3481then
3482 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003483 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 # information
3485 if test -z "${CC}"
3486 then
3487 found_gcc=
3488 found_clang=
3489 as_save_IFS=$IFS; IFS=:
3490 for as_dir in $PATH
3491 do
3492 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003493 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003495 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496 fi
3497 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003498 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003499 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003500 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501 fi
3502 fi
3503 done
3504 IFS=$as_save_IFS
3505
3506 if test -n "$found_gcc" -a -n "$found_clang"
3507 then
3508 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3509 then
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3511$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3512 CC="$found_clang"
3513 CXX="$found_clang++"
3514 fi
3515
3516
3517 elif test -z "$found_gcc" -a -n "$found_clang"
3518 then
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3520$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3521 CC="$found_clang"
3522 CXX="$found_clang++"
3523
3524 elif test -z "$found_gcc" -a -z "$found_clang"
3525 then
3526 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3527 if test -n "${found_clang}"
3528 then
3529 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3530$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3531 CC="${found_clang}"
3532 CXX="`/usr/bin/xcrun -find clang++`"
3533
3534 # else: use default behaviour
3535 fi
3536 fi
3537 fi
3538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003539ac_ext=c
3540ac_cpp='$CPP $CPPFLAGS'
3541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3543ac_compiler_gnu=$ac_cv_c_compiler_gnu
3544if test -n "$ac_tool_prefix"; then
3545 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3546set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3548$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003549if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003551else
3552 if test -n "$CC"; then
3553 ac_cv_prog_CC="$CC" # Let the user override the test.
3554else
Martin v. Löwis11437992002-04-12 09:54:03 +00003555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3556for as_dir in $PATH
3557do
3558 IFS=$as_save_IFS
3559 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 $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 +00003564 break 2
3565 fi
3566done
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003569
Jack Jansendd19cf82001-12-06 22:36:17 +00003570fi
3571fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003572CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003573if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3575$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003576else
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003579fi
3580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582fi
3583if test -z "$ac_cv_prog_CC"; then
3584 ac_ct_CC=$CC
3585 # Extract the first word of "gcc", so it can be a program name with args.
3586set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3588$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003589if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003591else
3592 if test -n "$ac_ct_CC"; then
3593 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3594else
3595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596for as_dir in $PATH
3597do
3598 IFS=$as_save_IFS
3599 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 $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 +00003604 break 2
3605 fi
3606done
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003609
3610fi
3611fi
3612ac_ct_CC=$ac_cv_prog_ac_ct_CC
3613if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3615$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003616else
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3618$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003619fi
3620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 if test "x$ac_ct_CC" = x; then
3622 CC=""
3623 else
3624 case $cross_compiling:$ac_tool_warned in
3625yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628ac_tool_warned=yes ;;
3629esac
3630 CC=$ac_ct_CC
3631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003632else
3633 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635
Jack Jansendd19cf82001-12-06 22:36:17 +00003636if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637 if test -n "$ac_tool_prefix"; then
3638 # 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 +00003639set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3641$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003642if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003644else
3645 if test -n "$CC"; then
3646 ac_cv_prog_CC="$CC" # Let the user override the test.
3647else
Martin v. Löwis11437992002-04-12 09:54:03 +00003648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3649for as_dir in $PATH
3650do
3651 IFS=$as_save_IFS
3652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 $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 +00003657 break 2
3658 fi
3659done
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003662
3663fi
3664fi
3665CC=$ac_cv_prog_CC
3666if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3668$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672fi
3673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003674
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676fi
3677if test -z "$CC"; then
3678 # Extract the first word of "cc", so it can be a program name with args.
3679set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3681$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003682if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003684else
3685 if test -n "$CC"; then
3686 ac_cv_prog_CC="$CC" # Let the user override the test.
3687else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003688 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3690for as_dir in $PATH
3691do
3692 IFS=$as_save_IFS
3693 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3697 ac_prog_rejected=yes
3698 continue
3699 fi
3700 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 break 2
3703 fi
3704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708if test $ac_prog_rejected = yes; then
3709 # We found a bogon in the path, so make sure we never use it.
3710 set dummy $ac_cv_prog_CC
3711 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003712 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713 # We chose a different compiler from the bogus one.
3714 # However, it has the same basename, so the bogon will be chosen
3715 # first if we set CC to just the basename; use the full file name.
3716 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003717 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718 fi
3719fi
3720fi
3721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003722CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3725$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726else
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003729fi
3730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733if test -z "$CC"; then
3734 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 do
3737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3738set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003741if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003743else
3744 if test -n "$CC"; then
3745 ac_cv_prog_CC="$CC" # Let the user override the test.
3746else
Martin v. Löwis11437992002-04-12 09:54:03 +00003747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3748for as_dir in $PATH
3749do
3750 IFS=$as_save_IFS
3751 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $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 +00003756 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003758done
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
3762fi
3763fi
3764CC=$ac_cv_prog_CC
3765if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3767$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003768else
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003771fi
3772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 test -n "$CC" && break
3775 done
3776fi
3777if test -z "$CC"; then
3778 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780do
3781 # Extract the first word of "$ac_prog", so it can be a program name with args.
3782set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003785if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003787else
3788 if test -n "$ac_ct_CC"; then
3789 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3790else
3791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $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 +00003800 break 2
3801 fi
3802done
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806fi
3807fi
3808ac_ct_CC=$ac_cv_prog_ac_ct_CC
3809if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3811$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$ac_ct_CC" && break
3819done
Michael W. Hudson54241132001-12-07 15:38:26 +00003820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821 if test "x$ac_ct_CC" = x; then
3822 CC=""
3823 else
3824 case $cross_compiling:$ac_tool_warned in
3825yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003826{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828ac_tool_warned=yes ;;
3829esac
3830 CC=$ac_ct_CC
3831 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
3833
3834fi
3835
3836
Matthias Kloseb9621712010-04-24 17:59:49 +00003837test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003839as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003840See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003843$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3844set X $ac_compile
3845ac_compiler=$2
3846for ac_option in --version -v -V -qversion; do
3847 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3853$as_echo "$ac_try_echo"; } >&5
3854 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 if test -s conftest.err; then
3857 sed '10a\
3858... rest of stderr output deleted ...
3859 10q' conftest.err >conftest.er1
3860 cat conftest.er1 >&5
3861 fi
3862 rm -f conftest.er1 conftest.err
3863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3864 test $ac_status = 0; }
3865done
Martin v. Löwis11437992002-04-12 09:54:03 +00003866
Matthias Kloseb9621712010-04-24 17:59:49 +00003867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003868/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870int
3871main ()
3872{
3873
3874 ;
3875 return 0;
3876}
3877_ACEOF
3878ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003879ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003880# Try to create an executable without -o first, disregard a.out.
3881# It will help us diagnose broken compilers, and finding out an intuition
3882# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3884$as_echo_n "checking whether the C compiler works... " >&6; }
3885ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3886
3887# The possible output files:
3888ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890ac_rmfiles=
3891for ac_file in $ac_files
3892do
3893 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003894 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3896 esac
3897done
3898rm -f $ac_rmfiles
3899
Matthias Kloseb9621712010-04-24 17:59:49 +00003900if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901case "(($ac_try" in
3902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3903 *) ac_try_echo=$ac_try;;
3904esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3906$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3910 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3912# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3913# in a Makefile. We should not override ac_cv_exeext if it was cached,
3914# so that the user can short-circuit this test for compilers unknown to
3915# Autoconf.
3916for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003917do
3918 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003921 ;;
3922 [ab].out )
3923 # We found the default executable, but exeext='' is most
3924 # certainly right.
3925 break;;
3926 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 then :; else
3929 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3930 fi
3931 # We set ac_cv_exeext here because the later test for it is not
3932 # safe: cross compilers may not add the suffix if given an `-o'
3933 # argument, so we may need to know it at that point already.
3934 # Even if this section looks crufty: it has the advantage of
3935 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936 break;;
3937 * )
3938 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 esac
3940done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941test "$ac_cv_exeext" = no && ac_cv_exeext=
3942
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003943else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 ac_file=''
3945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003946if test -z "$ac_file"; then :
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3948$as_echo "no" >&6; }
3949$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003950sed 's/^/| /' conftest.$ac_ext >&5
3951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003954as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003955See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003956else
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3958$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3961$as_echo_n "checking for C compiler default output file name... " >&6; }
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3963$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965
Matthias Kloseb9621712010-04-24 17:59:49 +00003966rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003967ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3969$as_echo_n "checking for suffix of executables... " >&6; }
3970if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971case "(($ac_try" in
3972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3973 *) ac_try_echo=$ac_try;;
3974esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3976$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3980 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3982# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3983# work properly (i.e., refer to `conftest.exe'), while it won't with
3984# `rm'.
3985for ac_file in conftest.exe conftest conftest.*; do
3986 test -f "$ac_file" || continue
3987 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3990 break;;
3991 * ) break;;
3992 esac
3993done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994else
Matthias Kloseb9621712010-04-24 17:59:49 +00003995 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003997as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003998See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004000rm -f conftest conftest$ac_cv_exeext
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4002$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003
4004rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004005EXEEXT=$ac_cv_exeext
4006ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4008/* end confdefs.h. */
4009#include <stdio.h>
4010int
4011main ()
4012{
4013FILE *f = fopen ("conftest.out", "w");
4014 return ferror (f) || fclose (f) != 0;
4015
4016 ;
4017 return 0;
4018}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004020ac_clean_files="$ac_clean_files conftest.out"
4021# Check that the compiler produces executables we can run. If not, either
4022# the compiler is broken, or we cross compile.
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4024$as_echo_n "checking whether we are cross compiling... " >&6; }
4025if test "$cross_compiling" != yes; then
4026 { { ac_try="$ac_link"
4027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_link") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }
4037 if { ac_try='./conftest$ac_cv_exeext'
4038 { { case "(($ac_try" in
4039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4040 *) ac_try_echo=$ac_try;;
4041esac
4042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4043$as_echo "$ac_try_echo"; } >&5
4044 (eval "$ac_try") 2>&5
4045 ac_status=$?
4046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4047 test $ac_status = 0; }; }; then
4048 cross_compiling=no
4049 else
4050 if test "$cross_compiling" = maybe; then
4051 cross_compiling=yes
4052 else
4053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004055as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004056If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004057See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 fi
4059 fi
4060fi
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4062$as_echo "$cross_compiling" >&6; }
4063
4064rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4065ac_clean_files=$ac_clean_files_save
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4067$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004068if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo_n "(cached) " >&6
4070else
4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004072/* end confdefs.h. */
4073
4074int
4075main ()
4076{
4077
4078 ;
4079 return 0;
4080}
4081_ACEOF
4082rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004083if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084case "(($ac_try" in
4085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4086 *) ac_try_echo=$ac_try;;
4087esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4089$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004090 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004091 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4093 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004094 for ac_file in conftest.o conftest.obj conftest.*; do
4095 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4099 break;;
4100 esac
4101done
4102else
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004104sed 's/^/| /' conftest.$ac_ext >&5
4105
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004108as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004109See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004110fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4114$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004115OBJEXT=$ac_cv_objext
4116ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4118$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004124
Martin v. Löwis11437992002-04-12 09:54:03 +00004125int
4126main ()
4127{
4128#ifndef __GNUC__
4129 choke me
4130#endif
4131
4132 ;
4133 return 0;
4134}
4135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004136if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 ac_compiler_gnu=yes
4138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004142ac_cv_c_compiler_gnu=$ac_compiler_gnu
4143
4144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4146$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4147if test $ac_compiler_gnu = yes; then
4148 GCC=yes
4149else
4150 GCC=
4151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004152ac_test_CFLAGS=${CFLAGS+set}
4153ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4155$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004156if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004158else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 ac_save_c_werror_flag=$ac_c_werror_flag
4160 ac_c_werror_flag=yes
4161 ac_cv_prog_cc_g=no
4162 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Martin v. Löwis11437992002-04-12 09:54:03 +00004166int
4167main ()
4168{
4169
4170 ;
4171 return 0;
4172}
4173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004174if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004175 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004176else
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 CFLAGS=""
4178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179/* end confdefs.h. */
4180
4181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190
Matthias Kloseb9621712010-04-24 17:59:49 +00004191else
4192 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195/* end confdefs.h. */
4196
4197int
4198main ()
4199{
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4213 ac_c_werror_flag=$ac_save_c_werror_flag
4214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4216$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004217if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004218 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004219elif test $ac_cv_prog_cc_g = yes; then
4220 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004221 CFLAGS="-g -O2"
4222 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004223 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224 fi
4225else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004226 if test "$GCC" = yes; then
4227 CFLAGS="-O2"
4228 else
4229 CFLAGS=
4230 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4233$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004236else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004238ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
4241#include <stdarg.h>
4242#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004243struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4245struct buf { int x; };
4246FILE * (*rcsopen) (struct buf *, struct stat *, int);
4247static char *e (p, i)
4248 char **p;
4249 int i;
4250{
4251 return p[i];
4252}
4253static char *f (char * (*g) (char **, int), char **p, ...)
4254{
4255 char *s;
4256 va_list v;
4257 va_start (v,p);
4258 s = g (p, va_arg (v,int));
4259 va_end (v);
4260 return s;
4261}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262
4263/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4264 function prototypes and stuff, but not '\xHH' hex character constants.
4265 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004267 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4268 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004270int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4273 inside strings and character constants. */
4274#define FOO(x) 'x'
4275int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4276
Skip Montanaro6dead952003-09-25 14:50:04 +00004277int test (int i, double x);
4278struct s1 {int (*f) (int a);};
4279struct s2 {int (*f) (double a);};
4280int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4281int argc;
4282char **argv;
4283int
4284main ()
4285{
4286return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4287 ;
4288 return 0;
4289}
4290_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4292 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004293do
4294 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298rm -f core conftest.err conftest.$ac_objext
4299 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004300done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004302CC=$ac_save_CC
4303
4304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305# AC_CACHE_VAL
4306case "x$ac_cv_prog_cc_c89" in
4307 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4309$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4312$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004313 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4316$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004317esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004318if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004319
Matthias Kloseb9621712010-04-24 17:59:49 +00004320fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322ac_ext=c
4323ac_cpp='$CPP $CPPFLAGS'
4324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4326ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004328ac_ext=c
4329ac_cpp='$CPP $CPPFLAGS'
4330ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4331ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4332ac_compiler_gnu=$ac_cv_c_compiler_gnu
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4334$as_echo_n "checking how to run the C preprocessor... " >&6; }
4335# On Suns, sometimes $CPP names a directory.
4336if test -n "$CPP" && test -d "$CPP"; then
4337 CPP=
4338fi
4339if test -z "$CPP"; then
4340 if ${ac_cv_prog_CPP+:} false; then :
4341 $as_echo_n "(cached) " >&6
4342else
4343 # Double quotes because CPP needs to be expanded
4344 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4345 do
4346 ac_preproc_ok=false
4347for ac_c_preproc_warn_flag in '' yes
4348do
4349 # Use a header file that comes with gcc, so configuring glibc
4350 # with a fresh cross-compiler works.
4351 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4352 # <limits.h> exists even on freestanding compilers.
4353 # On the NeXT, cc -E runs the code through the compiler's parser,
4354 # not just through cpp. "Syntax error" is here to catch this case.
4355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4356/* end confdefs.h. */
4357#ifdef __STDC__
4358# include <limits.h>
4359#else
4360# include <assert.h>
4361#endif
4362 Syntax error
4363_ACEOF
4364if ac_fn_c_try_cpp "$LINENO"; then :
4365
4366else
4367 # Broken: fails on valid input.
4368continue
4369fi
4370rm -f conftest.err conftest.i conftest.$ac_ext
4371
4372 # OK, works on sane cases. Now check whether nonexistent headers
4373 # can be detected and how.
4374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4375/* end confdefs.h. */
4376#include <ac_nonexistent.h>
4377_ACEOF
4378if ac_fn_c_try_cpp "$LINENO"; then :
4379 # Broken: success on invalid input.
4380continue
4381else
4382 # Passes both tests.
4383ac_preproc_ok=:
4384break
4385fi
4386rm -f conftest.err conftest.i conftest.$ac_ext
4387
4388done
4389# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4390rm -f conftest.i conftest.err conftest.$ac_ext
4391if $ac_preproc_ok; then :
4392 break
4393fi
4394
4395 done
4396 ac_cv_prog_CPP=$CPP
4397
4398fi
4399 CPP=$ac_cv_prog_CPP
4400else
4401 ac_cv_prog_CPP=$CPP
4402fi
4403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4404$as_echo "$CPP" >&6; }
4405ac_preproc_ok=false
4406for ac_c_preproc_warn_flag in '' yes
4407do
4408 # Use a header file that comes with gcc, so configuring glibc
4409 # with a fresh cross-compiler works.
4410 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4411 # <limits.h> exists even on freestanding compilers.
4412 # On the NeXT, cc -E runs the code through the compiler's parser,
4413 # not just through cpp. "Syntax error" is here to catch this case.
4414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4415/* end confdefs.h. */
4416#ifdef __STDC__
4417# include <limits.h>
4418#else
4419# include <assert.h>
4420#endif
4421 Syntax error
4422_ACEOF
4423if ac_fn_c_try_cpp "$LINENO"; then :
4424
4425else
4426 # Broken: fails on valid input.
4427continue
4428fi
4429rm -f conftest.err conftest.i conftest.$ac_ext
4430
4431 # OK, works on sane cases. Now check whether nonexistent headers
4432 # can be detected and how.
4433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4434/* end confdefs.h. */
4435#include <ac_nonexistent.h>
4436_ACEOF
4437if ac_fn_c_try_cpp "$LINENO"; then :
4438 # Broken: success on invalid input.
4439continue
4440else
4441 # Passes both tests.
4442ac_preproc_ok=:
4443break
4444fi
4445rm -f conftest.err conftest.i conftest.$ac_ext
4446
4447done
4448# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4449rm -f conftest.i conftest.err conftest.$ac_ext
4450if $ac_preproc_ok; then :
4451
4452else
4453 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4455as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4456See \`config.log' for more details" "$LINENO" 5; }
4457fi
4458
4459ac_ext=c
4460ac_cpp='$CPP $CPPFLAGS'
4461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4463ac_compiler_gnu=$ac_cv_c_compiler_gnu
4464
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4466$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4467if ${ac_cv_path_GREP+:} false; then :
4468 $as_echo_n "(cached) " >&6
4469else
4470 if test -z "$GREP"; then
4471 ac_path_GREP_found=false
4472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
4478 for ac_prog in grep ggrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4481 as_fn_executable_p "$ac_path_GREP" || continue
4482# Check for GNU ac_path_GREP and select it if it is found.
4483 # Check for GNU $ac_path_GREP
4484case `"$ac_path_GREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4487*)
4488 ac_count=0
4489 $as_echo_n 0123456789 >"conftest.in"
4490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
4495 $as_echo 'GREP' >> "conftest.nl"
4496 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4498 as_fn_arith $ac_count + 1 && ac_count=$as_val
4499 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_GREP="$ac_path_GREP"
4502 ac_path_GREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
4509
4510 $ac_path_GREP_found && break 3
4511 done
4512 done
4513 done
4514IFS=$as_save_IFS
4515 if test -z "$ac_cv_path_GREP"; then
4516 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4517 fi
4518else
4519 ac_cv_path_GREP=$GREP
4520fi
4521
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4524$as_echo "$ac_cv_path_GREP" >&6; }
4525 GREP="$ac_cv_path_GREP"
4526
4527
Łukasz Langaa785c872016-09-09 17:37:37 -07004528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4529$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4530if ${ac_cv_path_SED+:} false; then :
4531 $as_echo_n "(cached) " >&6
4532else
4533 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4534 for ac_i in 1 2 3 4 5 6 7; do
4535 ac_script="$ac_script$as_nl$ac_script"
4536 done
4537 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4538 { ac_script=; unset ac_script;}
4539 if test -z "$SED"; then
4540 ac_path_SED_found=false
4541 # Loop through the user's path and test for each of PROGNAME-LIST
4542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4543for as_dir in $PATH
4544do
4545 IFS=$as_save_IFS
4546 test -z "$as_dir" && as_dir=.
4547 for ac_prog in sed gsed; do
4548 for ac_exec_ext in '' $ac_executable_extensions; do
4549 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4550 as_fn_executable_p "$ac_path_SED" || continue
4551# Check for GNU ac_path_SED and select it if it is found.
4552 # Check for GNU $ac_path_SED
4553case `"$ac_path_SED" --version 2>&1` in
4554*GNU*)
4555 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4556*)
4557 ac_count=0
4558 $as_echo_n 0123456789 >"conftest.in"
4559 while :
4560 do
4561 cat "conftest.in" "conftest.in" >"conftest.tmp"
4562 mv "conftest.tmp" "conftest.in"
4563 cp "conftest.in" "conftest.nl"
4564 $as_echo '' >> "conftest.nl"
4565 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4566 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4567 as_fn_arith $ac_count + 1 && ac_count=$as_val
4568 if test $ac_count -gt ${ac_path_SED_max-0}; then
4569 # Best one so far, save it but keep looking for a better one
4570 ac_cv_path_SED="$ac_path_SED"
4571 ac_path_SED_max=$ac_count
4572 fi
4573 # 10*(2^10) chars as input seems more than enough
4574 test $ac_count -gt 10 && break
4575 done
4576 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4577esac
4578
4579 $ac_path_SED_found && break 3
4580 done
4581 done
4582 done
4583IFS=$as_save_IFS
4584 if test -z "$ac_cv_path_SED"; then
4585 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4586 fi
4587else
4588 ac_cv_path_SED=$SED
4589fi
4590
4591fi
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4593$as_echo "$ac_cv_path_SED" >&6; }
4594 SED="$ac_cv_path_SED"
4595 rm -f conftest.sed
4596
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004597
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598
4599
Matthias Kloseb9621712010-04-24 17:59:49 +00004600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4601$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004603# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004604if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004606
4607 case $withval in
4608 no) with_cxx_main=no
4609 MAINCC='$(CC)';;
4610 yes) with_cxx_main=yes
4611 MAINCC='$(CXX)';;
4612 *) with_cxx_main=yes
4613 MAINCC=$withval
4614 if test -z "$CXX"
4615 then
4616 CXX=$withval
4617 fi;;
4618 esac
4619else
4620
4621 with_cxx_main=no
4622 MAINCC='$(CC)'
4623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004624fi
4625
Matthias Kloseb9621712010-04-24 17:59:49 +00004626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4627$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628
4629preset_cxx="$CXX"
4630if test -z "$CXX"
4631then
4632 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004633 gcc) if test -n "$ac_tool_prefix"; then
4634 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4635set dummy ${ac_tool_prefix}g++; ac_word=$2
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4637$as_echo_n "checking for $ac_word... " >&6; }
4638if ${ac_cv_path_CXX+:} false; then :
4639 $as_echo_n "(cached) " >&6
4640else
4641 case $CXX in
4642 [\\/]* | ?:[\\/]*)
4643 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4644 ;;
4645 *)
4646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647for as_dir in notfound
4648do
4649 IFS=$as_save_IFS
4650 test -z "$as_dir" && as_dir=.
4651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004653 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4655 break 2
4656 fi
4657done
4658 done
4659IFS=$as_save_IFS
4660
4661 ;;
4662esac
4663fi
4664CXX=$ac_cv_path_CXX
4665if test -n "$CXX"; then
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4667$as_echo "$CXX" >&6; }
4668else
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4670$as_echo "no" >&6; }
4671fi
4672
4673
4674fi
4675if test -z "$ac_cv_path_CXX"; then
4676 ac_pt_CXX=$CXX
4677 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681if ${ac_cv_path_ac_pt_CXX+:} false; then :
4682 $as_echo_n "(cached) " >&6
4683else
4684 case $ac_pt_CXX in
4685 [\\/]* | ?:[\\/]*)
4686 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4687 ;;
4688 *)
4689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in notfound
4691do
4692 IFS=$as_save_IFS
4693 test -z "$as_dir" && as_dir=.
4694 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004696 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4697 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698 break 2
4699 fi
4700done
4701 done
4702IFS=$as_save_IFS
4703
4704 ;;
4705esac
4706fi
4707ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4708if test -n "$ac_pt_CXX"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4710$as_echo "$ac_pt_CXX" >&6; }
4711else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716 if test "x$ac_pt_CXX" = x; then
4717 CXX="g++"
4718 else
4719 case $cross_compiling:$ac_tool_warned in
4720yes:)
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4723ac_tool_warned=yes ;;
4724esac
4725 CXX=$ac_pt_CXX
4726 fi
4727else
4728 CXX="$ac_cv_path_CXX"
4729fi
4730 ;;
4731 cc) if test -n "$ac_tool_prefix"; then
4732 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4733set dummy ${ac_tool_prefix}c++; ac_word=$2
4734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004736if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004737 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738else
4739 case $CXX in
4740 [\\/]* | ?:[\\/]*)
4741 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4742 ;;
4743 *)
4744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4745for as_dir in notfound
4746do
4747 IFS=$as_save_IFS
4748 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753 break 2
4754 fi
4755done
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759 ;;
4760esac
4761fi
4762CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004763if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4765$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004766else
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004770
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771
4772fi
4773if test -z "$ac_cv_path_CXX"; then
4774 ac_pt_CXX=$CXX
4775 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004779if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 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 +00004785 ;;
4786 *)
4787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in notfound
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 break 2
4797 fi
4798done
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802 ;;
4803esac
4804fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4806if test -n "$ac_pt_CXX"; then
4807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4808$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809else
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4811$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004813
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 if test "x$ac_pt_CXX" = x; then
4815 CXX="c++"
4816 else
4817 case $cross_compiling:$ac_tool_warned in
4818yes:)
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4821ac_tool_warned=yes ;;
4822esac
4823 CXX=$ac_pt_CXX
4824 fi
4825else
4826 CXX="$ac_cv_path_CXX"
4827fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 clang|*/clang) if test -n "$ac_tool_prefix"; then
4830 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4831set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if ${ac_cv_path_CXX+:} false; then :
4835 $as_echo_n "(cached) " >&6
4836else
4837 case $CXX in
4838 [\\/]* | ?:[\\/]*)
4839 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4840 ;;
4841 *)
4842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in notfound
4844do
4845 IFS=$as_save_IFS
4846 test -z "$as_dir" && as_dir=.
4847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004849 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851 break 2
4852 fi
4853done
4854 done
4855IFS=$as_save_IFS
4856
Ned Deilycbfb9a52012-06-23 16:02:19 -07004857 ;;
4858esac
4859fi
4860CXX=$ac_cv_path_CXX
4861if test -n "$CXX"; then
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4863$as_echo "$CXX" >&6; }
4864else
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004869
4870fi
4871if test -z "$ac_cv_path_CXX"; then
4872 ac_pt_CXX=$CXX
4873 # Extract the first word of "clang++", so it can be a program name with args.
4874set dummy clang++; ac_word=$2
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_ac_pt_CXX+:} false; then :
4878 $as_echo_n "(cached) " >&6
4879else
4880 case $ac_pt_CXX in
4881 [\\/]* | ?:[\\/]*)
4882 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4883 ;;
4884 *)
4885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in notfound
4887do
4888 IFS=$as_save_IFS
4889 test -z "$as_dir" && as_dir=.
4890 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004892 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894 break 2
4895 fi
4896done
4897 done
4898IFS=$as_save_IFS
4899
4900 ;;
4901esac
4902fi
4903ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4904if test -n "$ac_pt_CXX"; then
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4906$as_echo "$ac_pt_CXX" >&6; }
4907else
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
4910fi
4911
4912 if test "x$ac_pt_CXX" = x; then
4913 CXX="clang++"
4914 else
4915 case $cross_compiling:$ac_tool_warned in
4916yes:)
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4919ac_tool_warned=yes ;;
4920esac
4921 CXX=$ac_pt_CXX
4922 fi
4923else
4924 CXX="$ac_cv_path_CXX"
4925fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004926 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004927 icc|*/icc) if test -n "$ac_tool_prefix"; then
4928 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4929set dummy ${ac_tool_prefix}icpc; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_CXX+:} false; then :
4933 $as_echo_n "(cached) " >&6
4934else
4935 case $CXX in
4936 [\\/]* | ?:[\\/]*)
4937 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4938 ;;
4939 *)
4940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in notfound
4942do
4943 IFS=$as_save_IFS
4944 test -z "$as_dir" && as_dir=.
4945 for ac_exec_ext in '' $ac_executable_extensions; do
4946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4947 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949 break 2
4950 fi
4951done
4952 done
4953IFS=$as_save_IFS
4954
4955 ;;
4956esac
4957fi
4958CXX=$ac_cv_path_CXX
4959if test -n "$CXX"; then
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4961$as_echo "$CXX" >&6; }
4962else
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968fi
4969if test -z "$ac_cv_path_CXX"; then
4970 ac_pt_CXX=$CXX
4971 # Extract the first word of "icpc", so it can be a program name with args.
4972set dummy icpc; ac_word=$2
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974$as_echo_n "checking for $ac_word... " >&6; }
4975if ${ac_cv_path_ac_pt_CXX+:} false; then :
4976 $as_echo_n "(cached) " >&6
4977else
4978 case $ac_pt_CXX in
4979 [\\/]* | ?:[\\/]*)
4980 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4981 ;;
4982 *)
4983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984for as_dir in notfound
4985do
4986 IFS=$as_save_IFS
4987 test -z "$as_dir" && as_dir=.
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4990 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4992 break 2
4993 fi
4994done
4995 done
4996IFS=$as_save_IFS
4997
4998 ;;
4999esac
5000fi
5001ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5002if test -n "$ac_pt_CXX"; then
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5004$as_echo "$ac_pt_CXX" >&6; }
5005else
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007$as_echo "no" >&6; }
5008fi
5009
5010 if test "x$ac_pt_CXX" = x; then
5011 CXX="icpc"
5012 else
5013 case $cross_compiling:$ac_tool_warned in
5014yes:)
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5016$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5017ac_tool_warned=yes ;;
5018esac
5019 CXX=$ac_pt_CXX
5020 fi
5021else
5022 CXX="$ac_cv_path_CXX"
5023fi
5024 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025 esac
5026 if test "$CXX" = "notfound"
5027 then
5028 CXX=""
5029 fi
5030fi
5031if test -z "$CXX"
5032then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005033 if test -n "$ac_tool_prefix"; then
5034 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5035 do
5036 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5037set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005040if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042else
5043 if test -n "$CXX"; then
5044 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5045else
5046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5047for as_dir in $PATH
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005053 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005055 break 2
5056 fi
5057done
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060
5061fi
5062fi
5063CXX=$ac_cv_prog_CXX
5064if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5066$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005067else
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005070fi
5071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005073 test -n "$CXX" && break
5074 done
5075fi
5076if test -z "$CXX"; then
5077 ac_ct_CXX=$CXX
5078 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5079do
5080 # Extract the first word of "$ac_prog", so it can be a program name with args.
5081set dummy $ac_prog; ac_word=$2
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083$as_echo_n "checking for $ac_word... " >&6; }
5084if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5085 $as_echo_n "(cached) " >&6
5086else
5087 if test -n "$ac_ct_CXX"; then
5088 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5089else
5090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091for as_dir in $PATH
5092do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
5095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005097 ac_cv_prog_ac_ct_CXX="$ac_prog"
5098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5099 break 2
5100 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005102 done
5103IFS=$as_save_IFS
5104
5105fi
5106fi
5107ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5108if test -n "$ac_ct_CXX"; then
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5110$as_echo "$ac_ct_CXX" >&6; }
5111else
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5113$as_echo "no" >&6; }
5114fi
5115
5116
5117 test -n "$ac_ct_CXX" && break
5118done
5119
5120 if test "x$ac_ct_CXX" = x; then
5121 CXX="notfound"
5122 else
5123 case $cross_compiling:$ac_tool_warned in
5124yes:)
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5127ac_tool_warned=yes ;;
5128esac
5129 CXX=$ac_ct_CXX
5130 fi
5131fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132
5133 if test "$CXX" = "notfound"
5134 then
5135 CXX=""
5136 fi
5137fi
5138if test "$preset_cxx" != "$CXX"
5139then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005140 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141
5142 By default, distutils will build C++ extension modules with \"$CXX\".
5143 If this is not intended, then set CXX on the configure command line.
5144 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005145$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005146
5147 By default, distutils will build C++ extension modules with \"$CXX\".
5148 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005149 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005150fi
5151
5152
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005153MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5154
5155
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5157$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5158cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005159#undef bfin
5160#undef cris
5161#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005162#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005163#undef hppa
5164#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005165#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005166#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005167#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005168#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005169#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005170#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005171 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005172#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005173# if defined(__x86_64__) && defined(__LP64__)
5174 x86_64-linux-gnu
5175# elif defined(__x86_64__) && defined(__ILP32__)
5176 x86_64-linux-gnux32
5177# elif defined(__i386__)
5178 i386-linux-gnu
5179# elif defined(__aarch64__) && defined(__AARCH64EL__)
5180# if defined(__ILP32__)
5181 aarch64_ilp32-linux-gnu
5182# else
5183 aarch64-linux-gnu
5184# endif
5185# elif defined(__aarch64__) && defined(__AARCH64EB__)
5186# if defined(__ILP32__)
5187 aarch64_be_ilp32-linux-gnu
5188# else
5189 aarch64_be-linux-gnu
5190# endif
5191# elif defined(__alpha__)
5192 alpha-linux-gnu
5193# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5194# if defined(__ARMEL__)
5195 arm-linux-gnueabihf
5196# else
5197 armeb-linux-gnueabihf
5198# endif
5199# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5200# if defined(__ARMEL__)
5201 arm-linux-gnueabi
5202# else
5203 armeb-linux-gnueabi
5204# endif
5205# elif defined(__hppa__)
5206 hppa-linux-gnu
5207# elif defined(__ia64__)
5208 ia64-linux-gnu
5209# elif defined(__m68k__) && !defined(__mcoldfire__)
5210 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005211# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5212# if _MIPS_SIM == _ABIO32
5213 mipsisa32r6el-linux-gnu
5214# elif _MIPS_SIM == _ABIN32
5215 mipsisa64r6el-linux-gnuabin32
5216# elif _MIPS_SIM == _ABI64
5217 mipsisa64r6el-linux-gnuabi64
5218# else
5219# error unknown platform triplet
5220# endif
5221# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5222# if _MIPS_SIM == _ABIO32
5223 mipsisa32r6-linux-gnu
5224# elif _MIPS_SIM == _ABIN32
5225 mipsisa64r6-linux-gnuabin32
5226# elif _MIPS_SIM == _ABI64
5227 mipsisa64r6-linux-gnuabi64
5228# else
5229# error unknown platform triplet
5230# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005231# elif defined(__mips_hard_float) && defined(_MIPSEL)
5232# if _MIPS_SIM == _ABIO32
5233 mipsel-linux-gnu
5234# elif _MIPS_SIM == _ABIN32
5235 mips64el-linux-gnuabin32
5236# elif _MIPS_SIM == _ABI64
5237 mips64el-linux-gnuabi64
5238# else
5239# error unknown platform triplet
5240# endif
5241# elif defined(__mips_hard_float)
5242# if _MIPS_SIM == _ABIO32
5243 mips-linux-gnu
5244# elif _MIPS_SIM == _ABIN32
5245 mips64-linux-gnuabin32
5246# elif _MIPS_SIM == _ABI64
5247 mips64-linux-gnuabi64
5248# else
5249# error unknown platform triplet
5250# endif
5251# elif defined(__or1k__)
5252 or1k-linux-gnu
5253# elif defined(__powerpc__) && defined(__SPE__)
5254 powerpc-linux-gnuspe
5255# elif defined(__powerpc64__)
5256# if defined(__LITTLE_ENDIAN__)
5257 powerpc64le-linux-gnu
5258# else
5259 powerpc64-linux-gnu
5260# endif
5261# elif defined(__powerpc__)
5262 powerpc-linux-gnu
5263# elif defined(__s390x__)
5264 s390x-linux-gnu
5265# elif defined(__s390__)
5266 s390-linux-gnu
5267# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5268 sh4-linux-gnu
5269# elif defined(__sparc__) && defined(__arch64__)
5270 sparc64-linux-gnu
5271# elif defined(__sparc__)
5272 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005273# elif defined(__riscv)
5274# if __riscv_xlen == 32
5275 riscv32-linux-gnu
5276# elif __riscv_xlen == 64
5277 riscv64-linux-gnu
5278# else
5279# error unknown platform triplet
5280# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005281# else
5282# error unknown platform triplet
5283# endif
5284#elif defined(__FreeBSD_kernel__)
5285# if defined(__LP64__)
5286 x86_64-kfreebsd-gnu
5287# elif defined(__i386__)
5288 i386-kfreebsd-gnu
5289# else
5290# error unknown platform triplet
5291# endif
5292#elif defined(__gnu_hurd__)
5293 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005294#elif defined(__APPLE__)
5295 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005296#elif defined(__VXWORKS__)
5297 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298#else
5299# error unknown platform triplet
5300#endif
5301
5302EOF
5303
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005304if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5307$as_echo "$PLATFORM_TRIPLET" >&6; }
5308else
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5310$as_echo "none" >&6; }
5311fi
5312rm -f conftest.c conftest.out
5313
5314if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5315 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5316 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5317 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005318elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5319 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321
doko@ubuntu.com55532312016-06-14 08:55:19 +02005322if test x$MULTIARCH != x; then
5323 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5324fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325
5326
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5328$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5329save_LDFLAGS="$LDFLAGS"
5330LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005331
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5333/* end confdefs.h. */
5334
5335int
5336main ()
5337{
5338
5339 ;
5340 return 0;
5341}
5342_ACEOF
5343if ac_fn_c_try_link "$LINENO"; then :
5344 NO_AS_NEEDED="-Wl,--no-as-needed"
5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5346$as_echo "yes" >&6; }
5347else
5348 NO_AS_NEEDED=""
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352rm -f core conftest.err conftest.$ac_objext \
5353 conftest$ac_exeext conftest.$ac_ext
5354LDFLAGS="$save_LDFLAGS"
5355
5356
5357
5358# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5361$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005362if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364else
5365 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5366 then ac_cv_path_EGREP="$GREP -E"
5367 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 # Loop through the user's path and test for each of PROGNAME-LIST
5371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005372for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5373do
5374 IFS=$as_save_IFS
5375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 for ac_prog in egrep; do
5377 for ac_exec_ext in '' $ac_executable_extensions; do
5378 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005379 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005380# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 # Check for GNU $ac_path_EGREP
5382case `"$ac_path_EGREP" --version 2>&1` in
5383*GNU*)
5384 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5385*)
5386 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 while :
5389 do
5390 cat "conftest.in" "conftest.in" >"conftest.tmp"
5391 mv "conftest.tmp" "conftest.in"
5392 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5395 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5398 # Best one so far, save it but keep looking for a better one
5399 ac_cv_path_EGREP="$ac_path_EGREP"
5400 ac_path_EGREP_max=$ac_count
5401 fi
5402 # 10*(2^10) chars as input seems more than enough
5403 test $ac_count -gt 10 && break
5404 done
5405 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5406esac
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $ac_path_EGREP_found && break 3
5409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005414 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 +00005415 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416else
5417 ac_cv_path_EGREP=$EGREP
5418fi
5419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 fi
5421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5423$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005425
5426
Matthias Kloseb9621712010-04-24 17:59:49 +00005427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5428$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005429if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $as_echo_n "(cached) " >&6
5431else
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005433/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005434#include <stdlib.h>
5435#include <stdarg.h>
5436#include <string.h>
5437#include <float.h>
5438
5439int
5440main ()
5441{
5442
5443 ;
5444 return 0;
5445}
5446_ACEOF
5447if ac_fn_c_try_compile "$LINENO"; then :
5448 ac_cv_header_stdc=yes
5449else
5450 ac_cv_header_stdc=no
5451fi
5452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5453
5454if test $ac_cv_header_stdc = yes; then
5455 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457/* end confdefs.h. */
5458#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005459
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005460_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005464else
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005467rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
Matthias Kloseb9621712010-04-24 17:59:49 +00005469fi
5470
5471if test $ac_cv_header_stdc = yes; then
5472 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <stdlib.h>
5476
5477_ACEOF
5478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5479 $EGREP "free" >/dev/null 2>&1; then :
5480
5481else
5482 ac_cv_header_stdc=no
5483fi
5484rm -f conftest*
5485
5486fi
5487
5488if test $ac_cv_header_stdc = yes; then
5489 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5490 if test "$cross_compiling" = yes; then :
5491 :
5492else
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h. */
5495#include <ctype.h>
5496#include <stdlib.h>
5497#if ((' ' & 0x0FF) == 0x020)
5498# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5499# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5500#else
5501# define ISLOWER(c) \
5502 (('a' <= (c) && (c) <= 'i') \
5503 || ('j' <= (c) && (c) <= 'r') \
5504 || ('s' <= (c) && (c) <= 'z'))
5505# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5506#endif
5507
5508#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5509int
5510main ()
5511{
5512 int i;
5513 for (i = 0; i < 256; i++)
5514 if (XOR (islower (i), ISLOWER (i))
5515 || toupper (i) != TOUPPER (i))
5516 return 2;
5517 return 0;
5518}
5519_ACEOF
5520if ac_fn_c_try_run "$LINENO"; then :
5521
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5526 conftest.$ac_objext conftest.beam conftest.$ac_ext
5527fi
5528
5529fi
5530fi
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5532$as_echo "$ac_cv_header_stdc" >&6; }
5533if test $ac_cv_header_stdc = yes; then
5534
5535$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5536
5537fi
5538
5539# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5540for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5541 inttypes.h stdint.h unistd.h
5542do :
5543 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5544ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5545"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005546if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005547 cat >>confdefs.h <<_ACEOF
5548#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5549_ACEOF
5550
5551fi
5552
5553done
5554
5555
5556
5557 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 +02005558if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 MINIX=yes
5560else
5561 MINIX=
5562fi
5563
5564
5565 if test "$MINIX" = yes; then
5566
5567$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5568
5569
5570$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5571
5572
5573$as_echo "#define _MINIX 1" >>confdefs.h
5574
5575 fi
5576
5577
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5579$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005580if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005581 $as_echo_n "(cached) " >&6
5582else
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584/* end confdefs.h. */
5585
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005586# define __EXTENSIONS__ 1
5587 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005588int
5589main ()
5590{
5591
5592 ;
5593 return 0;
5594}
5595_ACEOF
5596if ac_fn_c_try_compile "$LINENO"; then :
5597 ac_cv_safe_to_define___extensions__=yes
5598else
5599 ac_cv_safe_to_define___extensions__=no
5600fi
5601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5602fi
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5604$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5605 test $ac_cv_safe_to_define___extensions__ = yes &&
5606 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5607
5608 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5609
5610 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5611
5612 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5613
5614 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5615
5616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5619$as_echo_n "checking for the Android API level... " >&6; }
5620cat >> conftest.c <<EOF
5621#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005622android_api = __ANDROID_API__
5623arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005624#else
5625#error not Android
5626#endif
5627EOF
5628
5629if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005630 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5631 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5633$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005634 if test -z "$ANDROID_API_LEVEL"; then
5635 echo 'Fatal: you must define __ANDROID_API__'
5636 exit 1
5637 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005638
5639cat >>confdefs.h <<_ACEOF
5640#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5641_ACEOF
5642
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005643
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5645$as_echo_n "checking for the Android arm ABI... " >&6; }
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5647$as_echo "$_arm_arch" >&6; }
5648 if test "$_arm_arch" = 7; then
5649 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5650 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5651 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652else
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5654$as_echo "not Android" >&6; }
5655fi
5656rm -f conftest.c conftest.out
5657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658# Check for unsupported systems
5659case $ac_sys_system/$ac_sys_release in
5660atheos*|Linux*/1*)
5661 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5662 echo See README for details.
5663 exit 1;;
5664esac
5665
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5668$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669
5670# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005671if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 withval=$with_suffix;
5673 case $withval in
5674 no) EXEEXT=;;
5675 yes) EXEEXT=.exe;;
5676 *) EXEEXT=$withval;;
5677 esac
5678fi
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5681$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682
5683# Test whether we're running on a non-case-sensitive system, in which
5684# case we give a warning if no ext is given
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5687$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688if test ! -d CaseSensitiveTestDir; then
5689mkdir CaseSensitiveTestDir
5690fi
5691
5692if test -d casesensitivetestdir
5693then
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5695$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 BUILDEXEEXT=.exe
5697else
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 BUILDEXEEXT=$EXEEXT
5701fi
5702rmdir CaseSensitiveTestDir
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704case $ac_sys_system in
5705hp*|HP*)
5706 case $CC in
5707 cc|*/cc) CC="$CC -Ae";;
5708 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709esac
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5713$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714if test -z "$LIBRARY"
5715then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005716 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5719$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721# LDLIBRARY is the name of the library to link against (as opposed to the
5722# name of the library into which to insert object files). BLDLIBRARY is also
5723# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5724# is blank as the main program is not linked directly against LDLIBRARY.
5725# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5726# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5727# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5728# DLLLIBRARY is the shared (i.e., DLL) library.
5729#
5730# RUNSHARED is used to run shared python without installed libraries
5731#
5732# INSTSONAME is the name of the shared library that will be use to install
5733# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005734#
5735# LDVERSION is the shared library version number, normally the Python version
5736# with the ABI build flags appended.
5737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740
5741
5742
5743
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745LDLIBRARY="$LIBRARY"
5746BLDLIBRARY='$(LDLIBRARY)'
5747INSTSONAME='$(LDLIBRARY)'
5748DLLLIBRARY=''
5749LDLIBRARYDIR=''
5750RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005751LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LINKCC is the command that links the python executable -- default is $(CC).
5754# If CXX is set, and if it is needed to link a main function that was
5755# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5756# python might then depend on the C++ runtime
5757# This is altered for AIX in order to build the export list before
5758# linking.
5759
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5761$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762if test -z "$LINKCC"
5763then
5764 LINKCC='$(PURIFY) $(MAINCC)'
5765 case $ac_sys_system in
5766 AIX*)
5767 exp_extra="\"\""
5768 if test $ac_sys_release -ge 5 -o \
5769 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5770 exp_extra="."
5771 fi
5772 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773 QNX*)
5774 # qcc must be used because the other compilers do not
5775 # support -N.
5776 LINKCC=qcc;;
5777 esac
5778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5780$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5783# make sure we default having it set to "no": this is used by
5784# distutils.unixccompiler to know if it should add --enable-new-dtags
5785# to linker command lines, and failing to detect GNU ld simply results
5786# in the same bahaviour as before.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5789$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790ac_prog=ld
5791if test "$GCC" = yes; then
5792 ac_prog=`$CC -print-prog-name=ld`
5793fi
5794case `"$ac_prog" -V 2>&1 < /dev/null` in
5795 *GNU*)
5796 GNULD=yes;;
5797 *)
5798 GNULD=no;;
5799esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5801$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5804$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 enableval=$enable_shared;
5808fi
5809
5810
5811if test -z "$enable_shared"
5812then
5813 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005814 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815 enable_shared="yes";;
5816 *)
5817 enable_shared="no";;
5818 esac
5819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5821$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822
Matthias Kloseb9621712010-04-24 17:59:49 +00005823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5824$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005826if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005827 enableval=$enable_profiling;
5828fi
5829
5830if test "x$enable_profiling" = xyes; then
5831 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005832 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834/* end confdefs.h. */
5835int main() { return 0; }
5836_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837if ac_fn_c_try_link "$LINENO"; then :
5838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842rm -f core conftest.err conftest.$ac_objext \
5843 conftest$ac_exeext conftest.$ac_ext
5844 CC="$ac_save_cc"
5845else
5846 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5849$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851if test "x$enable_profiling" = xyes; then
5852 BASECFLAGS="-pg $BASECFLAGS"
5853 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854fi
5855
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5857$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
5859# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5860# library that we build, but we do not want to link against it (we
5861# will find it with a -framework option). For this reason there is an
5862# extra variable BLDLIBRARY against which Python and the extension
5863# modules are linked, BLDLIBRARY. This is normally the same as
5864# LDLIBRARY, but empty for MacOSX framework builds.
5865if test "$enable_framework"
5866then
5867 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005868 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 BLDLIBRARY=''
5870else
5871 BLDLIBRARY='$(LDLIBRARY)'
5872fi
5873
5874# Other platforms follow
5875if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005876 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877
Matthias Kloseb9621712010-04-24 17:59:49 +00005878$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
5880 case $ac_sys_system in
5881 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005882 LDLIBRARY='libpython$(LDVERSION).dll.a'
5883 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
5885 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).so'
5887 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005888 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005890 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005891 then
5892 PY3LIBRARY=libpython3.so
5893 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005895 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).so'
5897 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005898 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005900 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005901 then
5902 PY3LIBRARY=libpython3.so
5903 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 hp*|HP*)
5906 case `uname -m` in
5907 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
5910 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005915 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).dylib'
5919 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005920 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005922 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005925 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
5927 esac
5928else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005929 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 case $ac_sys_system in
5931 CYGWIN*)
5932 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005933 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 esac
5936fi
5937
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005938if test "$cross_compiling" = yes; then
5939 RUNSHARED=
5940fi
5941
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5943$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005946if test -n "$ac_tool_prefix"; then
5947 for ac_prog in ar aal
5948 do
5949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005953if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
5956 if test -n "$AR"; then
5957 ac_cv_prog_AR="$AR" # Let the user override the test.
5958else
5959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5960for as_dir in $PATH
5961do
5962 IFS=$as_save_IFS
5963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005966 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 break 2
5969 fi
5970done
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972IFS=$as_save_IFS
5973
5974fi
5975fi
5976AR=$ac_cv_prog_AR
5977if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5979$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983fi
5984
5985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005986 test -n "$AR" && break
5987 done
5988fi
5989if test -z "$AR"; then
5990 ac_ct_AR=$AR
5991 for ac_prog in ar aal
5992do
5993 # Extract the first word of "$ac_prog", so it can be a program name with args.
5994set dummy $ac_prog; ac_word=$2
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
5997if ${ac_cv_prog_ac_ct_AR+:} false; then :
5998 $as_echo_n "(cached) " >&6
5999else
6000 if test -n "$ac_ct_AR"; then
6001 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6002else
6003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006 IFS=$as_save_IFS
6007 test -z "$as_dir" && as_dir=.
6008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 ac_cv_prog_ac_ct_AR="$ac_prog"
6011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012 break 2
6013 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006015 done
6016IFS=$as_save_IFS
6017
6018fi
6019fi
6020ac_ct_AR=$ac_cv_prog_ac_ct_AR
6021if test -n "$ac_ct_AR"; then
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6023$as_echo "$ac_ct_AR" >&6; }
6024else
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
6027fi
6028
6029
6030 test -n "$ac_ct_AR" && break
6031done
6032
6033 if test "x$ac_ct_AR" = x; then
6034 AR="ar"
6035 else
6036 case $cross_compiling:$ac_tool_warned in
6037yes:)
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6040ac_tool_warned=yes ;;
6041esac
6042 AR=$ac_ct_AR
6043 fi
6044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045
6046
6047# tweak ARFLAGS only if the user didn't set it on the command line
6048
6049if test -z "$ARFLAGS"
6050then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006051 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052fi
6053
doko@ubuntu.com58844492012-06-30 18:25:32 +02006054if test -n "$ac_tool_prefix"; then
6055 for ac_prog in readelf
6056 do
6057 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6058set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_prog_READELF+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063else
6064 if test -n "$READELF"; then
6065 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
6072 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006074 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076 break 2
6077 fi
6078done
6079 done
6080IFS=$as_save_IFS
6081
6082fi
6083fi
6084READELF=$ac_cv_prog_READELF
6085if test -n "$READELF"; then
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6087$as_echo "$READELF" >&6; }
6088else
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094 test -n "$READELF" && break
6095 done
6096fi
6097if test -z "$READELF"; then
6098 ac_ct_READELF=$READELF
6099 for ac_prog in readelf
6100do
6101 # Extract the first word of "$ac_prog", so it can be a program name with args.
6102set dummy $ac_prog; ac_word=$2
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 if test -n "$ac_ct_READELF"; then
6109 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006118 ac_cv_prog_ac_ct_READELF="$ac_prog"
6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120 break 2
6121 fi
6122done
6123 done
6124IFS=$as_save_IFS
6125
6126fi
6127fi
6128ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6129if test -n "$ac_ct_READELF"; then
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6131$as_echo "$ac_ct_READELF" >&6; }
6132else
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138 test -n "$ac_ct_READELF" && break
6139done
6140
6141 if test "x$ac_ct_READELF" = x; then
6142 READELF=":"
6143 else
6144 case $cross_compiling:$ac_tool_warned in
6145yes:)
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6148ac_tool_warned=yes ;;
6149esac
6150 READELF=$ac_ct_READELF
6151 fi
6152fi
6153
6154if test "$cross_compiling" = yes; then
6155 case "$READELF" in
6156 readelf|:)
6157 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6158 ;;
6159 esac
6160fi
6161
6162
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006165hp*|HP*)
6166 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167 if test -z "$INSTALL"
6168 then
6169 INSTALL="${srcdir}/install-sh -c"
6170 fi
6171esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172# Find a good install program. We prefer a C program (faster),
6173# so one script is as good as another. But avoid the broken or
6174# incompatible versions:
6175# SysV /etc/install, /usr/sbin/install
6176# SunOS /usr/etc/install
6177# IRIX /sbin/install
6178# AIX /bin/install
6179# AmigaOS /C/install, which installs bootblocks on floppy discs
6180# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6181# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6182# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6183# OS/2's system install, which has a completely different semantic
6184# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185# Reject install programs that cannot install multiple files.
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6187$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006189if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191else
6192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6193for as_dir in $PATH
6194do
6195 IFS=$as_save_IFS
6196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 # Account for people who put trailing slashes in PATH elements.
6198case $as_dir/ in #((
6199 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 /usr/ucb/* ) ;;
6203 *)
6204 # OSF1 and SCO ODT 3.0 have their own names for install.
6205 # Don't use installbsd from OSF since it installs stuff as root
6206 # by default.
6207 for ac_prog in ginstall scoinst install; do
6208 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006209 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210 if test $ac_prog = install &&
6211 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6212 # AIX install. It has an incompatible calling convention.
6213 :
6214 elif test $ac_prog = install &&
6215 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6216 # program-specific install script used by HP pwplus--don't use.
6217 :
6218 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006219 rm -rf conftest.one conftest.two conftest.dir
6220 echo one > conftest.one
6221 echo two > conftest.two
6222 mkdir conftest.dir
6223 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6224 test -s conftest.one && test -s conftest.two &&
6225 test -s conftest.dir/conftest.one &&
6226 test -s conftest.dir/conftest.two
6227 then
6228 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6229 break 3
6230 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 fi
6232 fi
6233 done
6234 done
6235 ;;
6236esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006237
6238 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239IFS=$as_save_IFS
6240
Matthias Kloseb9621712010-04-24 17:59:49 +00006241rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242
6243fi
6244 if test "${ac_cv_path_install+set}" = set; then
6245 INSTALL=$ac_cv_path_install
6246 else
6247 # As a last resort, use the slow shell script. Don't cache a
6248 # value for INSTALL within a source directory, because that will
6249 # break other packages using the cache if that directory is
6250 # removed, or if the value is a relative name.
6251 INSTALL=$ac_install_sh
6252 fi
6253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6255$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006256
6257# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6258# It thinks the first close brace ends the variable substitution.
6259test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6260
6261test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6262
6263test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6264
Matthias Klose93a0ef12012-03-15 18:08:34 +01006265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6266$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6267if test -z "$MKDIR_P"; then
6268 if ${ac_cv_path_mkdir+:} false; then :
6269 $as_echo_n "(cached) " >&6
6270else
6271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6272for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6273do
6274 IFS=$as_save_IFS
6275 test -z "$as_dir" && as_dir=.
6276 for ac_prog in mkdir gmkdir; do
6277 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006278 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006279 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6280 'mkdir (GNU coreutils) '* | \
6281 'mkdir (coreutils) '* | \
6282 'mkdir (fileutils) '4.1*)
6283 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6284 break 3;;
6285 esac
6286 done
6287 done
6288 done
6289IFS=$as_save_IFS
6290
6291fi
6292
6293 test -d ./--version && rmdir ./--version
6294 if test "${ac_cv_path_mkdir+set}" = set; then
6295 MKDIR_P="$ac_cv_path_mkdir -p"
6296 else
6297 # As a last resort, use the slow shell script. Don't cache a
6298 # value for MKDIR_P within a source directory, because that will
6299 # break other packages using the cache if that directory is
6300 # removed, or if the value is a relative name.
6301 MKDIR_P="$ac_install_sh -d"
6302 fi
6303fi
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6305$as_echo "$MKDIR_P" >&6; }
6306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307
6308# Not every filesystem supports hard links
6309
6310if test -z "$LN" ; then
6311 case $ac_sys_system in
6312 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 *) LN=ln;;
6314 esac
6315fi
6316
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006317# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006318
6319ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6323$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
6325# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006326if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 withval=$with_pydebug;
6328if test "$withval" != no
6329then
6330
Matthias Kloseb9621712010-04-24 17:59:49 +00006331$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6334$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006336 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006337else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339fi
6340else
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343fi
6344
6345
Victor Stinnerf4e47032019-04-25 00:56:28 +02006346# Check for --with-trace-refs
6347# --with-trace-refs
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6349$as_echo_n "checking for --with-trace-refs... " >&6; }
6350
6351# Check whether --with-trace-refs was given.
6352if test "${with_trace_refs+set}" = set; then :
6353 withval=$with_trace_refs;
6354else
6355 with_trace_refs=no
6356fi
6357
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6359$as_echo "$with_trace_refs" >&6; }
6360
6361if test "$with_trace_refs" = "yes"
6362then
6363
6364$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6365
6366fi
6367
6368# Check for --with-assertions.
6369# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006370assertions='false'
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6372$as_echo_n "checking for --with-assertions... " >&6; }
6373
6374# Check whether --with-assertions was given.
6375if test "${with_assertions+set}" = set; then :
6376 withval=$with_assertions;
6377if test "$withval" != no
6378then
6379 assertions='true'
6380fi
6381fi
6382
6383if test "$assertions" = 'true'; then
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6385$as_echo "yes" >&6; }
6386elif test "$Py_DEBUG" = 'true'; then
6387 assertions='true'
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6389$as_echo "implied by --with-pydebug" >&6; }
6390else
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
Brett Cannon63d98bc2016-09-06 17:12:40 -07006395# Enable optimization flags
6396
6397
6398Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6400$as_echo_n "checking for --enable-optimizations... " >&6; }
6401# Check whether --enable-optimizations was given.
6402if test "${enable_optimizations+set}" = set; then :
6403 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006404if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006405then
6406 Py_OPT='true'
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6408$as_echo "yes" >&6; };
6409else
6410 Py_OPT='false'
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; };
6413fi
6414else
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
6417fi
6418
6419if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006420 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6421 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006422 # 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 +00006423 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006424 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006425 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006426 DEF_MAKE_RULE="build_all"
6427else
6428 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006429 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006430 DEF_MAKE_RULE="all"
6431fi
6432
Miss Islington (bot)24066722019-07-22 13:17:23 -07006433
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5
6435$as_echo_n "checking PROFILE_TASK... " >&6; }
6436if test -z "$PROFILE_TASK"
6437then
6438 PROFILE_TASK='-m test --pgo'
6439fi
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5
6441$as_echo "$PROFILE_TASK" >&6; }
6442
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006443# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6444# normal names in the default $PATH (ie: Ubuntu). They exist under the
6445# non-suffixed name in their versioned llvm directory.
6446
6447llvm_bin_dir=''
6448llvm_path="${PATH}"
6449if test "${CC}" = "clang"
6450then
6451 clang_bin=`which clang`
6452 # Some systems install clang elsewhere as a symlink to the real path
6453 # which is where the related llvm tools are located.
6454 if test -L "${clang_bin}"
6455 then
6456 clang_dir=`dirname "${clang_bin}"`
6457 clang_bin=`readlink "${clang_bin}"`
6458 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6459 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6460 fi
6461fi
6462
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006463# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6465$as_echo_n "checking for --with-lto... " >&6; }
6466
6467# Check whether --with-lto was given.
6468if test "${with_lto+set}" = set; then :
6469 withval=$with_lto;
6470if test "$withval" != no
6471then
6472 Py_LTO='true'
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6474$as_echo "yes" >&6; };
6475else
6476 Py_LTO='false'
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478$as_echo "no" >&6; };
6479fi
6480else
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485if test "$Py_LTO" = 'true' ; then
6486 case $CC in
6487 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006488
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006490$as_echo_n "checking target system type... " >&6; }
6491if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006492 $as_echo_n "(cached) " >&6
6493else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006494 if test "x$target_alias" = x; then
6495 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006496else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6498 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6499fi
6500
6501fi
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6503$as_echo "$ac_cv_target" >&6; }
6504case $ac_cv_target in
6505*-*-*) ;;
6506*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6507esac
6508target=$ac_cv_target
6509ac_save_IFS=$IFS; IFS='-'
6510set x $ac_cv_target
6511shift
6512target_cpu=$1
6513target_vendor=$2
6514shift; shift
6515# Remember, the first character of IFS is used to create $*,
6516# except with old shells:
6517target_os=$*
6518IFS=$ac_save_IFS
6519case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6520
6521
6522# The aliases save the names the user supplied, while $host etc.
6523# will get canonicalized.
6524test -n "$target_alias" &&
6525 test "$program_prefix$program_suffix$program_transform_name" = \
6526 NONENONEs,x,x, &&
6527 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006528# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6529set dummy $target_alias-llvm-ar; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_LLVM_AR+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534else
6535 case $LLVM_AR in
6536 [\\/]* | ?:[\\/]*)
6537 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6538 ;;
6539 *)
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in ${llvm_path}
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551done
6552 done
6553IFS=$as_save_IFS
6554
6555 ;;
6556esac
6557fi
6558LLVM_AR=$ac_cv_path_LLVM_AR
6559if test -n "$LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6561$as_echo "$LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567
6568if test -z "$ac_cv_path_LLVM_AR"; then
6569 if test "$build" = "$target"; then
6570 ac_pt_LLVM_AR=$LLVM_AR
6571 # Extract the first word of "llvm-ar", so it can be a program name with args.
6572set dummy llvm-ar; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6576 $as_echo_n "(cached) " >&6
6577else
6578 case $ac_pt_LLVM_AR in
6579 [\\/]* | ?:[\\/]*)
6580 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6581 ;;
6582 *)
6583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in ${llvm_path}
6585do
6586 IFS=$as_save_IFS
6587 test -z "$as_dir" && as_dir=.
6588 for ac_exec_ext in '' $ac_executable_extensions; do
6589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592 break 2
6593 fi
6594done
6595 done
6596IFS=$as_save_IFS
6597
6598 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6599 ;;
6600esac
6601fi
6602ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6603if test -n "$ac_pt_LLVM_AR"; then
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6605$as_echo "$ac_pt_LLVM_AR" >&6; }
6606else
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610
6611 LLVM_AR=$ac_pt_LLVM_AR
6612 else
6613 LLVM_AR="''"
6614 fi
6615else
6616 LLVM_AR="$ac_cv_path_LLVM_AR"
6617fi
6618
6619
6620 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6621 then
6622 LLVM_AR_FOUND="found"
6623 else
6624 LLVM_AR_FOUND="not-found"
6625 fi
6626 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6627 then
6628 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6629 if test -n "${found_llvm_ar}"
6630 then
6631 LLVM_AR='/usr/bin/xcrun llvm-ar'
6632 LLVM_AR_FOUND=found
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6634$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6635 fi
6636 fi
6637 if test $LLVM_AR_FOUND = not-found
6638 then
6639 LLVM_PROFR_ERR=yes
6640 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6641 else
6642 LLVM_AR_ERR=no
6643 fi
6644 AR="${LLVM_AR}"
6645 case $ac_sys_system in
6646 Darwin*)
6647 # Any changes made here should be reflected in the GCC+Darwin case below
6648 LTOFLAGS="-flto -Wl,-export_dynamic"
6649 ;;
6650 *)
6651 LTOFLAGS="-flto"
6652 ;;
6653 esac
6654 ;;
6655 *gcc*)
6656 case $ac_sys_system in
6657 Darwin*)
6658 LTOFLAGS="-flto -Wl,-export_dynamic"
6659 ;;
6660 *)
6661 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6662 ;;
6663 esac
6664 ;;
6665 esac
6666
6667 if test "$ac_cv_prog_cc_g" = "yes"
6668 then
6669 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6670 # to get debug symbols.
6671 LTOFLAGS="$LTOFLAGS -g"
6672 fi
6673
stratakisf92c7aa2018-12-04 15:54:01 +01006674 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006675 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006676fi
6677
6678# Enable PGO flags.
6679
6680
6681
6682
6683
6684
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6686set dummy $target_alias-llvm-profdata; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6690 $as_echo_n "(cached) " >&6
6691else
6692 case $LLVM_PROFDATA in
6693 [\\/]* | ?:[\\/]*)
6694 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6695 ;;
6696 *)
6697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699do
6700 IFS=$as_save_IFS
6701 test -z "$as_dir" && as_dir=.
6702 for ac_exec_ext in '' $ac_executable_extensions; do
6703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006704 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706 break 2
6707 fi
6708done
6709 done
6710IFS=$as_save_IFS
6711
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ;;
6713esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006714fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6716if test -n "$LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6718$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
Gregory P. Smith799520c2016-09-07 16:10:00 -07006725if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6726 if test "$build" = "$target"; then
6727 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6728 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6729set dummy llvm-profdata; ac_word=$2
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731$as_echo_n "checking for $ac_word... " >&6; }
6732if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6733 $as_echo_n "(cached) " >&6
6734else
6735 case $ac_pt_LLVM_PROFDATA in
6736 [\\/]* | ?:[\\/]*)
6737 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6738 ;;
6739 *)
6740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in ${llvm_path}
6742do
6743 IFS=$as_save_IFS
6744 test -z "$as_dir" && as_dir=.
6745 for ac_exec_ext in '' $ac_executable_extensions; do
6746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749 break 2
6750 fi
6751done
6752 done
6753IFS=$as_save_IFS
6754
6755 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6756 ;;
6757esac
6758fi
6759ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6760if test -n "$ac_pt_LLVM_PROFDATA"; then
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6762$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6763else
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6765$as_echo "no" >&6; }
6766fi
6767
6768 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6769 else
6770 LLVM_PROFDATA="''"
6771 fi
6772else
6773 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6774fi
6775
6776
6777if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6778then
6779 LLVM_PROF_FOUND="found"
6780else
6781 LLVM_PROF_FOUND="not-found"
6782fi
6783if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6784then
6785 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6786 if test -n "${found_llvm_profdata}"
6787 then
6788 # llvm-profdata isn't directly in $PATH in some cases.
6789 # https://apple.stackexchange.com/questions/197053/
6790 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6791 LLVM_PROF_FOUND=found
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6793$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6794 fi
6795fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796LLVM_PROF_ERR=no
6797case $CC in
6798 *clang*)
6799 # Any changes made here should be reflected in the GCC+Darwin case below
6800 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6804 if test $LLVM_PROF_FOUND = not-found
6805 then
6806 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 if test "${REQUIRE_PGO}" = "yes"
6808 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006809 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 -07006810 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 fi
6812 ;;
6813 *gcc*)
6814 case $ac_sys_system in
6815 Darwin*)
6816 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6817 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006818 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 then
6822 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006823 if test "${REQUIRE_PGO}" = "yes"
6824 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006825 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 -07006826 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827 fi
6828 ;;
6829 *)
6830 PGO_PROF_GEN_FLAG="-fprofile-generate"
6831 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6832 LLVM_PROF_MERGER="true"
6833 LLVM_PROF_FILE=""
6834 ;;
6835 esac
6836 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006837 *icc*)
6838 PGO_PROF_GEN_FLAG="-prof-gen"
6839 PGO_PROF_USE_FLAG="-prof-use"
6840 LLVM_PROF_MERGER="true"
6841 LLVM_PROF_FILE=""
6842 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006843esac
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6846# merged with this chunk of code?
6847
6848# Optimizer/debugger flags
6849# ------------------------
6850# (The following bit of code is complicated enough - please keep things
6851# indented properly. Just pretend you're editing Python code. ;-)
6852
6853# There are two parallel sets of case statements below, one that checks to
6854# see if OPT was set and one that does BASECFLAGS setting based upon
6855# compiler and platform. BASECFLAGS tweaks need to be made even if the
6856# user set OPT.
6857
Victor Stinner23a683a2019-04-12 21:27:37 +02006858case $CC in
6859 *clang*)
6860 cc_is_clang=1
6861 ;;
6862 *)
6863 if $CC --version 2>&1 | grep -q clang
6864 then
6865 cc_is_clang=1
6866 else
6867 cc_is_clang=
6868 fi
6869esac
6870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871# tweak OPT based on compiler and platform, only if the user didn't set
6872# it on the command line
6873
Victor Stinner9ed34a82017-05-02 22:35:58 +02006874
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006875if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876then
6877 case $GCC in
6878 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6880 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6881 WRAP="-fwrapv"
6882 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006883
Victor Stinner35f3d242017-04-21 12:35:24 +02006884 if test -n "${cc_is_clang}"
6885 then
6886 # Clang also needs -fwrapv
6887 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006888 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6889 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006890 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006891 fi
6892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 case $ac_cv_prog_cc_g in
6894 yes)
6895 if test "$Py_DEBUG" = 'true' ; then
6896 # Optimization messes up debuggers, so turn it off for
6897 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006898 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006899 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006900 else
Victor Stinner28205b22017-04-21 11:24:34 +02006901 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006902 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 else
Victor Stinner28205b22017-04-21 11:24:34 +02006904 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905 fi
6906 ;;
6907 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006908 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 ;;
6910 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912 case $ac_sys_system in
6913 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6914 ;;
6915 esac
6916 ;;
6917
6918 *)
6919 OPT="-O"
6920 ;;
6921 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
6923
6924
6925
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006926
stratakiscf10a752018-12-19 18:19:01 +01006927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928# The -arch flags for universal builds on OSX
6929UNIVERSAL_ARCH_FLAGS=
6930
6931
6932# tweak BASECFLAGS based on compiler and platform
6933case $GCC in
6934yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006935 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006936
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6938$as_echo_n "checking for -Wextra... " >&6; }
6939 ac_save_cc="$CC"
6940 CC="$CC -Wextra -Werror"
6941 if ${ac_cv_extra_warnings+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h. */
6946
6947
6948int
6949main ()
6950{
6951
6952 ;
6953 return 0;
6954}
6955
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"; then :
6958
6959 ac_cv_extra_warnings=yes
6960
6961else
6962
6963 ac_cv_extra_warnings=no
6964
6965fi
6966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967fi
6968
6969 CC="$ac_save_cc"
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6971$as_echo "$ac_cv_extra_warnings" >&6; }
6972
6973 if test $ac_cv_extra_warnings = yes
6974 then
6975 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6976 fi
6977
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978 # Python doesn't violate C99 aliasing rules, but older versions of
6979 # GCC produce warnings for legal Python code. Enable
6980 # -fno-strict-aliasing on versions of GCC that support but produce
6981 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6983$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 ac_save_cc="$CC"
6985 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006987 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006992
Matthias Kloseb159a552010-04-25 21:00:44 +00006993
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006994int
6995main ()
6996{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006997
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998 ;
6999 return 0;
7000}
Matthias Kloseb159a552010-04-25 21:00:44 +00007001
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007003if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
7005 CC="$ac_save_cc -fstrict-aliasing"
7006 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008/* end confdefs.h. */
7009
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007010 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011int
7012main ()
7013{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007014double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015 ;
7016 return 0;
7017}
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007020if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007021
7022 ac_cv_no_strict_aliasing=no
7023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024else
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=yes
7027
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007028fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031else
Matthias Kloseb159a552010-04-25 21:00:44 +00007032
7033 ac_cv_no_strict_aliasing=no
7034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007037fi
7038
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007039 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007040 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7042$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044 then
7045 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7046 fi
7047
Zachary Ware5af85642015-12-21 12:09:17 -06007048 # ICC doesn't recognize the option, but only emits a warning
7049 ## XXX does it emit an unused result warning and can it be disabled?
7050 case "$CC" in
7051 *icc*)
7052 ac_cv_disable_unused_result_warning=no
7053 ;;
7054 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7056$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7057 ac_save_cc="$CC"
7058 CC="$CC -Wunused-result -Werror"
7059 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007060 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007061 $as_echo_n "(cached) " >&6
7062else
7063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7064/* end confdefs.h. */
7065
7066
7067int
7068main ()
7069{
7070
7071 ;
7072 return 0;
7073}
7074
7075_ACEOF
7076if ac_fn_c_try_compile "$LINENO"; then :
7077
7078 ac_cv_disable_unused_result_warning=yes
7079
7080else
7081
7082 ac_cv_disable_unused_result_warning=no
7083
7084fi
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086fi
7087
7088 CFLAGS="$save_CFLAGS"
7089 CC="$ac_save_cc"
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7091$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007092 ;;
7093 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007094
7095 if test $ac_cv_disable_unused_result_warning = yes
7096 then
7097 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007098 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7099 fi
7100
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7102$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7103 ac_save_cc="$CC"
7104 CC="$CC -Wunused-parameter -Werror"
7105 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7106 $as_echo_n "(cached) " >&6
7107else
7108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7109/* end confdefs.h. */
7110
7111
7112int
7113main ()
7114{
7115
7116 ;
7117 return 0;
7118}
7119
7120_ACEOF
7121if ac_fn_c_try_compile "$LINENO"; then :
7122
7123 ac_cv_disable_unused_parameter_warning=yes
7124
7125else
7126
7127 ac_cv_disable_unused_parameter_warning=no
7128
7129fi
7130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7131fi
7132
7133 CC="$ac_save_cc"
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7135$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7136
7137 if test $ac_cv_disable_unused_parameter_warning = yes
7138 then
7139 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7140 fi
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7143$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7144 ac_save_cc="$CC"
7145 CC="$CC -Wmissing-field-initializers -Werror"
7146 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7147 $as_echo_n "(cached) " >&6
7148else
7149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150/* end confdefs.h. */
7151
7152
7153int
7154main ()
7155{
7156
7157 ;
7158 return 0;
7159}
7160
7161_ACEOF
7162if ac_fn_c_try_compile "$LINENO"; then :
7163
7164 ac_cv_disable_missing_field_initializers=yes
7165
7166else
7167
7168 ac_cv_disable_missing_field_initializers=no
7169
7170fi
7171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7172fi
7173
7174 CC="$ac_save_cc"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7176$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7177
7178 if test $ac_cv_disable_missing_field_initializers = yes
7179 then
7180 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007181 fi
7182
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7184$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7185 ac_save_cc="$CC"
7186 CC="$CC -Wsign-compare"
7187 save_CFLAGS="$CFLAGS"
7188 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7189 $as_echo_n "(cached) " >&6
7190else
7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h. */
7193
7194
7195int
7196main ()
7197{
7198
7199 ;
7200 return 0;
7201}
7202
7203_ACEOF
7204if ac_fn_c_try_compile "$LINENO"; then :
7205
7206 ac_cv_enable_sign_compare_warning=yes
7207
7208else
7209
7210 ac_cv_enable_sign_compare_warning=no
7211
7212fi
7213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214fi
7215
7216 CFLAGS="$save_CFLAGS"
7217 CC="$ac_save_cc"
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7219$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7220
7221 if test $ac_cv_enable_sign_compare_warning = yes
7222 then
7223 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7224 fi
7225
7226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7227$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7228 ac_save_cc="$CC"
7229 CC="$CC -Wunreachable-code"
7230 save_CFLAGS="$CFLAGS"
7231 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7232 $as_echo_n "(cached) " >&6
7233else
7234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7235/* end confdefs.h. */
7236
7237
7238int
7239main ()
7240{
7241
7242 ;
7243 return 0;
7244}
7245
7246_ACEOF
7247if ac_fn_c_try_compile "$LINENO"; then :
7248
7249 ac_cv_enable_unreachable_code_warning=yes
7250
7251else
7252
7253 ac_cv_enable_unreachable_code_warning=no
7254
7255fi
7256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7257fi
7258
7259 CFLAGS="$save_CFLAGS"
7260 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007261
7262 # Don't enable unreachable code warning in debug mode, since it usually
7263 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007264 # Issue #24324: Unfortunately, the unreachable code warning does not work
7265 # correctly on gcc and has been silently removed from the compiler.
7266 # It is supported on clang but on OS X systems gcc may be an alias
7267 # for clang. Try to determine if the compiler is not really gcc and,
7268 # if so, only then enable the warning.
7269 if test $ac_cv_enable_unreachable_code_warning = yes && \
7270 test "$Py_DEBUG" != "true" && \
7271 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007272 then
7273 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007274 else
7275 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7278$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007279
INADA Naokie3364842018-06-05 20:40:53 +09007280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7281$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7282 ac_save_cc="$CC"
7283 CC="$CC -Werror -Wstrict-prototypes"
7284 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7285 $as_echo_n "(cached) " >&6
7286else
7287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7288/* end confdefs.h. */
7289
7290
7291int
7292main ()
7293{
7294
7295 ;
7296 return 0;
7297}
7298
7299_ACEOF
7300if ac_fn_c_try_compile "$LINENO"; then :
7301
7302 ac_cv_enable_strict_prototypes_warning=yes
7303
7304else
7305
7306 ac_cv_enable_strict_prototypes_warning=no
7307
7308fi
7309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7310fi
7311
7312 CC="$ac_save_cc"
7313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7314$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7315
7316 if test $ac_cv_enable_strict_prototypes_warning = yes
7317 then
7318 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7319 fi
7320
Victor Stinner193ee0a2017-02-06 14:24:00 +01007321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7322$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7323 ac_save_cc="$CC"
7324 CC="$CC -Werror=implicit-function-declaration"
7325 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7326 $as_echo_n "(cached) " >&6
7327else
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329/* end confdefs.h. */
7330
7331
7332int
7333main ()
7334{
7335
7336 ;
7337 return 0;
7338}
7339
7340_ACEOF
7341if ac_fn_c_try_compile "$LINENO"; then :
7342
7343 ac_cv_enable_implicit_function_declaration_error=yes
7344
7345else
7346
7347 ac_cv_enable_implicit_function_declaration_error=no
7348
7349fi
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351fi
7352
7353 CC="$ac_save_cc"
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7355$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7356
7357 if test $ac_cv_enable_implicit_function_declaration_error = yes
7358 then
7359 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7360 fi
7361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7363 # support. Without this, treatment of subnormals doesn't follow
7364 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007365 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 alpha*)
7367 BASECFLAGS="$BASECFLAGS -mieee"
7368 ;;
7369 esac
7370
7371 case $ac_sys_system in
7372 SCO_SV*)
7373 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7374 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007375
Ned Deily87adb6e2013-10-18 21:09:56 -07007376 Darwin*)
7377 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7378 # used to be here, but non-Apple gcc doesn't accept them.
7379 if test "${CC}" = gcc
7380 then
7381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007382$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007383 case "${UNIVERSALSDK}" in
7384 */MacOSX10.4u.sdk)
7385 # Build using 10.4 SDK, force usage of gcc when the
7386 # compiler is gcc, otherwise the user will get very
7387 # confusing error messages when building on OSX 10.6
7388 CC=gcc-4.0
7389 CPP=cpp-4.0
7390 ;;
7391 esac
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007393$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007394 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395
Ned Deily87adb6e2013-10-18 21:09:56 -07007396 if test "${enable_universalsdk}"
7397 then
7398 case "$UNIVERSAL_ARCHS" in
7399 32-bit)
7400 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7401 LIPO_32BIT_FLAGS=""
7402 ARCH_RUN_32BIT=""
7403 ;;
7404 64-bit)
7405 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7406 LIPO_32BIT_FLAGS=""
7407 ARCH_RUN_32BIT="true"
7408 ;;
7409 all)
7410 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7411 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7412 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7413 ;;
7414 intel)
7415 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7416 LIPO_32BIT_FLAGS="-extract i386"
7417 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7418 ;;
7419 intel-32)
7420 UNIVERSAL_ARCH_FLAGS="-arch i386"
7421 LIPO_32BIT_FLAGS=""
7422 ARCH_RUN_32BIT=""
7423 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007424 intel-64)
7425 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7426 LIPO_32BIT_FLAGS=""
7427 ARCH_RUN_32BIT="true"
7428 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 3-way)
7430 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7431 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7432 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7433 ;;
7434 *)
7435 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7436 ;;
7437 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438
Ned Deily87adb6e2013-10-18 21:09:56 -07007439 if test "${UNIVERSALSDK}" != "/"
7440 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007441 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7442 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007444 else
7445 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7446 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 fi
7448 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 # Calculate an appropriate deployment target for this build:
7451 # The deployment target value is used explicitly to enable certain
7452 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007453 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007454 # component of the string returned by distutils.get_platform().
7455 #
7456 # Use the value from:
7457 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7458 # 2. the operating system version of the build machine if >= 10.6
7459 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7460 # below to pick either 10.3, 10.4, or 10.5 as the target.
7461 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462
Ned Deily87adb6e2013-10-18 21:09:56 -07007463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7464$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007465 cur_target_major=`sw_vers -productVersion | \
7466 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7467 cur_target_minor=`sw_vers -productVersion | \
7468 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7469 cur_target="${cur_target_major}.${cur_target_minor}"
7470 if test ${cur_target_major} -eq 10 && \
7471 test ${cur_target_minor} -ge 3 && \
7472 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007473 then
Ned Deily36820b62014-06-25 13:44:22 -07007474 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007475 cur_target=10.3
7476 if test ${enable_universalsdk}
7477 then
7478 case "$UNIVERSAL_ARCHS" in
7479 all|3-way|intel|64-bit)
7480 # These configurations were first supported in 10.5
7481 cur_target='10.5'
7482 ;;
7483 esac
7484 else
7485 if test `/usr/bin/arch` = "i386"
7486 then
7487 # 10.4 was the first release to support Intel archs
7488 cur_target="10.4"
7489 fi
7490 fi
7491 fi
7492 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007493
Ned Deily87adb6e2013-10-18 21:09:56 -07007494 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7495 # environment with a value that is the same as what we'll use
7496 # in the Makefile to ensure that we'll get the same compiler
7497 # environment during configure and build time.
7498 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7499 export MACOSX_DEPLOYMENT_TARGET
7500 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7502$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007503
Ned Deily87adb6e2013-10-18 21:09:56 -07007504 # end of Darwin* tests
7505 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506 esac
7507 ;;
7508
7509*)
7510 case $ac_sys_system in
7511 OpenUNIX*|UnixWare*)
7512 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7513 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514 SCO_SV*)
7515 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7516 ;;
7517 esac
7518 ;;
7519esac
7520
Zachary Ware5af85642015-12-21 12:09:17 -06007521# ICC needs -fp-model strict or floats behave badly
7522case "$CC" in
7523*icc*)
7524 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7525 ;;
7526esac
7527
T. Woutersddbfa2c2017-05-23 01:30:49 +02007528if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529 :
7530else
7531 OPT="-DNDEBUG $OPT"
7532fi
7533
7534if test "$ac_arch_flags"
7535then
7536 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7537fi
7538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539# On some compilers, pthreads are available without further options
7540# (e.g. MacOS X). On some of these systems, the compiler will not
7541# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7542# So we have to see first whether pthreads are available without
7543# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7545$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007546if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548else
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550 ac_cv_pthread_is_default=no
7551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553/* end confdefs.h. */
7554
Stefan Krah7dba5942012-11-22 22:49:11 +01007555#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556#include <pthread.h>
7557
7558void* routine(void* p){return NULL;}
7559
7560int main(){
7561 pthread_t p;
7562 if(pthread_create(&p,NULL,routine,NULL)!=0)
7563 return 1;
7564 (void)pthread_detach(p);
7565 return 0;
7566}
7567
7568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007569if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007570
7571 ac_cv_pthread_is_default=yes
7572 ac_cv_kthread=no
7573 ac_cv_pthread=no
7574
7575else
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580fi
7581
7582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
7584
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7586$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587
7588
7589if test $ac_cv_pthread_is_default = yes
7590then
7591 ac_cv_kpthread=no
7592else
7593# -Kpthread, if available, provides the right #defines
7594# and linker options to make pthread_create available
7595# Some compilers won't report that they do not support -Kpthread,
7596# so we need to run a program to see whether it really made the
7597# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7599$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007600if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602else
7603 ac_save_cc="$CC"
7604CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007605if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606 ac_cv_kpthread=no
7607else
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609/* end confdefs.h. */
7610
Stefan Krah7dba5942012-11-22 22:49:11 +01007611#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612#include <pthread.h>
7613
7614void* routine(void* p){return NULL;}
7615
7616int main(){
7617 pthread_t p;
7618 if(pthread_create(&p,NULL,routine,NULL)!=0)
7619 return 1;
7620 (void)pthread_detach(p);
7621 return 0;
7622}
7623
7624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007625if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626 ac_cv_kpthread=yes
7627else
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
7633
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634CC="$ac_save_cc"
7635fi
7636
Matthias Kloseb9621712010-04-24 17:59:49 +00007637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7638$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639fi
7640
7641if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7642then
7643# -Kthread, if available, provides the right #defines
7644# and linker options to make pthread_create available
7645# Some compilers won't report that they do not support -Kthread,
7646# so we need to run a program to see whether it really made the
7647# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7649$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007650if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652else
7653 ac_save_cc="$CC"
7654CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007655if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656 ac_cv_kthread=no
7657else
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659/* end confdefs.h. */
7660
Stefan Krah7dba5942012-11-22 22:49:11 +01007661#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662#include <pthread.h>
7663
7664void* routine(void* p){return NULL;}
7665
7666int main(){
7667 pthread_t p;
7668 if(pthread_create(&p,NULL,routine,NULL)!=0)
7669 return 1;
7670 (void)pthread_detach(p);
7671 return 0;
7672}
7673
7674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007675if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 ac_cv_kthread=yes
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682fi
7683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684CC="$ac_save_cc"
7685fi
7686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7688$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689fi
7690
7691if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7692then
7693# -pthread, if available, provides the right #defines
7694# and linker options to make pthread_create available
7695# Some compilers won't report that they do not support -pthread,
7696# so we need to run a program to see whether it really made the
7697# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7699$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007700if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702else
7703 ac_save_cc="$CC"
7704CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007705if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706 ac_cv_pthread=no
7707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709/* end confdefs.h. */
7710
Stefan Krah7dba5942012-11-22 22:49:11 +01007711#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712#include <pthread.h>
7713
7714void* routine(void* p){return NULL;}
7715
7716int main(){
7717 pthread_t p;
7718 if(pthread_create(&p,NULL,routine,NULL)!=0)
7719 return 1;
7720 (void)pthread_detach(p);
7721 return 0;
7722}
7723
7724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007725if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726 ac_cv_pthread=yes
7727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732fi
7733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734CC="$ac_save_cc"
7735fi
7736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7738$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739fi
7740
7741# If we have set a CC compiler flag for thread support then
7742# check if it works for CXX, too.
7743ac_cv_cxx_thread=no
7744if test ! -z "$CXX"
7745then
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7747$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748ac_save_cxx="$CXX"
7749
7750if test "$ac_cv_kpthread" = "yes"
7751then
7752 CXX="$CXX -Kpthread"
7753 ac_cv_cxx_thread=yes
7754elif test "$ac_cv_kthread" = "yes"
7755then
7756 CXX="$CXX -Kthread"
7757 ac_cv_cxx_thread=yes
7758elif test "$ac_cv_pthread" = "yes"
7759then
7760 CXX="$CXX -pthread"
7761 ac_cv_cxx_thread=yes
7762fi
7763
7764if test $ac_cv_cxx_thread = yes
7765then
7766 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7767 $CXX -c conftest.$ac_ext 2>&5
7768 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7769 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7770 then
7771 ac_cv_cxx_thread=yes
7772 else
7773 ac_cv_cxx_thread=no
7774 fi
7775 rm -fr conftest*
7776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7778$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007779fi
7780CXX="$ac_save_cxx"
7781
7782
7783# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7785$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790/* end confdefs.h. */
7791#include <stdlib.h>
7792#include <stdarg.h>
7793#include <string.h>
7794#include <float.h>
7795
7796int
7797main ()
7798{
7799
7800 ;
7801 return 0;
7802}
7803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007804if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805 ac_cv_header_stdc=yes
7806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7810
7811if test $ac_cv_header_stdc = yes; then
7812 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007814/* end confdefs.h. */
7815#include <string.h>
7816
7817_ACEOF
7818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 $EGREP "memchr" >/dev/null 2>&1; then :
7820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821else
7822 ac_cv_header_stdc=no
7823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007824rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825
7826fi
7827
7828if test $ac_cv_header_stdc = yes; then
7829 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007831/* end confdefs.h. */
7832#include <stdlib.h>
7833
7834_ACEOF
7835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 $EGREP "free" >/dev/null 2>&1; then :
7837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838else
7839 ac_cv_header_stdc=no
7840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007841rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842
7843fi
7844
7845if test $ac_cv_header_stdc = yes; then
7846 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848 :
7849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851/* end confdefs.h. */
7852#include <ctype.h>
7853#include <stdlib.h>
7854#if ((' ' & 0x0FF) == 0x020)
7855# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7856# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7857#else
7858# define ISLOWER(c) \
7859 (('a' <= (c) && (c) <= 'i') \
7860 || ('j' <= (c) && (c) <= 'r') \
7861 || ('s' <= (c) && (c) <= 'z'))
7862# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7863#endif
7864
7865#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7866int
7867main ()
7868{
7869 int i;
7870 for (i = 0; i < 256; i++)
7871 if (XOR (islower (i), ISLOWER (i))
7872 || toupper (i) != TOUPPER (i))
7873 return 2;
7874 return 0;
7875}
7876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007877if ac_fn_c_try_run "$LINENO"; then :
7878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879else
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884fi
7885
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886fi
7887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7889$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890if test $ac_cv_header_stdc = yes; then
7891
Matthias Kloseb9621712010-04-24 17:59:49 +00007892$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893
7894fi
7895
stratakise768c862018-01-23 16:11:24 +01007896for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007897fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007898ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007899sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007900utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007901poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007902sys/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 +01007903sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007904sys/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 +01007905sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007906sys/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 -07007907libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007908linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Zackery Spytz43fdbd22019-05-29 13:57:07 -06007909sys/endian.h sys/sysmacros.h linux/memfd.h sys/memfd.h sys/mman.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007910do :
7911 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7912ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007913if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007915#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007916_ACEOF
7917
7918fi
7919
Guido van Rossum627b2d71993-12-24 10:39:16 +00007920done
7921
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007922ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007923for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7926$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007927if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932#include <sys/types.h>
7933#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
7938if ((DIR *) 0)
7939return 0;
7940 ;
7941 return 0;
7942}
7943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007946else
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951eval ac_res=\$$as_ac_Header
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7953$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007954if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007957_ACEOF
7958
7959ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007962done
7963# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7964if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7966$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007967if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007969else
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974/* Override any GCC internal prototype to avoid an error.
7975 Use char because int might match the return type of a GCC
7976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977#ifdef __cplusplus
7978extern "C"
7979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007980char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007981int
7982main ()
7983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ;
7986 return 0;
7987}
7988_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989for ac_lib in '' dir; do
7990 if test -z "$ac_lib"; then
7991 ac_res="none required"
7992 else
7993 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999rm -f core conftest.err conftest.$ac_objext \
8000 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008001 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004done
Victor Stinnere0be4232011-10-25 13:06:09 +02008005if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007else
8008 ac_cv_search_opendir=no
8009fi
8010rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008011LIBS=$ac_func_search_save_LIBS
8012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8014$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008016if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Michael W. Hudson54241132001-12-07 15:38:26 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8023$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008024if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008026else
8027 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031/* Override any GCC internal prototype to avoid an error.
8032 Use char because int might match the return type of a GCC
8033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034#ifdef __cplusplus
8035extern "C"
8036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008037char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ;
8043 return 0;
8044}
8045_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046for ac_lib in '' x; do
8047 if test -z "$ac_lib"; then
8048 ac_res="none required"
8049 else
8050 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008051 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008058 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061done
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064else
8065 ac_cv_search_opendir=no
8066fi
8067rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008068LIBS=$ac_func_search_save_LIBS
8069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8071$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008073if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008076fi
8077
8078fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8081$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008082if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008087#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008088int
8089main ()
8090{
8091return makedev(0, 0);
8092 ;
8093 return 0;
8094}
8095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008097 ac_cv_header_sys_types_h_makedev=yes
8098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008101rm -f core conftest.err conftest.$ac_objext \
8102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008103
8104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8106$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107
8108if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008109ac_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 +02008110if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008111
Matthias Kloseb9621712010-04-24 17:59:49 +00008112$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008113
8114fi
8115
8116
8117
8118 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 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 +02008120if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008123
8124fi
8125
8126
8127 fi
8128fi
8129
Michael W. Hudson54241132001-12-07 15:38:26 +00008130
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008131# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8132# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8133SAVE_CFLAGS=$CFLAGS
8134CFLAGS="-std=c99 $CFLAGS"
8135for ac_header in bluetooth/bluetooth.h
8136do :
8137 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8138if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8139 cat >>confdefs.h <<_ACEOF
8140#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8141_ACEOF
8142
8143fi
8144
8145done
8146
8147CFLAGS=$SAVE_CFLAGS
8148
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008149# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8150for ac_header in net/if.h
8151do :
8152 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8153#ifdef STDC_HEADERS
8154# include <stdlib.h>
8155# include <stddef.h>
8156#else
8157# ifdef HAVE_STDLIB_H
8158# include <stdlib.h>
8159# endif
8160#endif
8161#ifdef HAVE_SYS_SOCKET_H
8162# include <sys/socket.h>
8163#endif
8164
8165"
Victor Stinnere0be4232011-10-25 13:06:09 +02008166if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008167 cat >>confdefs.h <<_ACEOF
8168#define HAVE_NET_IF_H 1
8169_ACEOF
8170
8171fi
8172
8173done
8174
8175
Martin v. Löwis11017b12006-01-14 18:12:57 +00008176# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008177for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008178do :
8179 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 +00008180#ifdef HAVE_ASM_TYPES_H
8181#include <asm/types.h>
8182#endif
8183#ifdef HAVE_SYS_SOCKET_H
8184#include <sys/socket.h>
8185#endif
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187"
Victor Stinnere0be4232011-10-25 13:06:09 +02008188if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008189 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008190#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008191_ACEOF
8192
8193fi
8194
8195done
8196
8197
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008198# On Linux, qrtr.h requires asm/types.h
8199for ac_header in linux/qrtr.h
8200do :
8201 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8202#ifdef HAVE_ASM_TYPES_H
8203#include <asm/types.h>
8204#endif
8205#ifdef HAVE_SYS_SOCKET_H
8206#include <sys/socket.h>
8207#endif
8208
8209"
8210if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8211 cat >>confdefs.h <<_ACEOF
8212#define HAVE_LINUX_QRTR_H 1
8213_ACEOF
8214
8215fi
8216
8217done
8218
8219
caaveryeffc12f2017-09-06 18:18:10 -04008220for ac_header in linux/vm_sockets.h
8221do :
8222 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8223#ifdef HAVE_SYS_SOCKET_H
8224#include <sys/socket.h>
8225#endif
8226
8227"
8228if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8229 cat >>confdefs.h <<_ACEOF
8230#define HAVE_LINUX_VM_SOCKETS_H 1
8231_ACEOF
8232
8233fi
8234
8235done
8236
8237
Charles-François Natali47413c12011-10-06 19:47:44 +02008238# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008239for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008240do :
8241 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8242ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8243#ifdef HAVE_SYS_SOCKET_H
8244#include <sys/socket.h>
8245#endif
8246
8247"
8248if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8249 cat >>confdefs.h <<_ACEOF
8250#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8251_ACEOF
8252
8253fi
8254
8255done
8256
8257
Guido van Rossum627b2d71993-12-24 10:39:16 +00008258# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008259was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8261$as_echo_n "checking for clock_t in time.h... " >&6; }
8262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008263/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008264#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
8266_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008269 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008270else
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008274
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008275
Guido van Rossum627b2d71993-12-24 10:39:16 +00008276fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008277rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8280$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008281
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8283$as_echo_n "checking for makedev... " >&6; }
8284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008285/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008286
Jesus Cea740f53a2010-04-28 11:35:30 +00008287#if defined(MAJOR_IN_MKDEV)
8288#include <sys/mkdev.h>
8289#elif defined(MAJOR_IN_SYSMACROS)
8290#include <sys/sysmacros.h>
8291#else
8292#include <sys/types.h>
8293#endif
8294
Neal Norwitz11690112002-07-30 01:08:28 +00008295int
8296main ()
8297{
Jesus Cea740f53a2010-04-28 11:35:30 +00008298
8299 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008300 ;
8301 return 0;
8302}
Matthias Kloseb159a552010-04-25 21:00:44 +00008303
Neal Norwitz11690112002-07-30 01:08:28 +00008304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008306 ac_cv_has_makedev=yes
8307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310rm -f core conftest.err conftest.$ac_objext \
8311 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8313$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008314if test "$ac_cv_has_makedev" = "yes"; then
8315
Matthias Kloseb9621712010-04-24 17:59:49 +00008316$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008317
8318fi
8319
Christian Heimes985ecdc2013-11-20 11:46:18 +01008320# byte swapping
8321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8322$as_echo_n "checking for le64toh... " >&6; }
8323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8324/* end confdefs.h. */
8325
8326#ifdef HAVE_ENDIAN_H
8327#include <endian.h>
8328#elif defined(HAVE_SYS_ENDIAN_H)
8329#include <sys/endian.h>
8330#endif
8331
8332int
8333main ()
8334{
8335
8336 le64toh(1)
8337 ;
8338 return 0;
8339}
8340
8341_ACEOF
8342if ac_fn_c_try_link "$LINENO"; then :
8343 ac_cv_has_le64toh=yes
8344else
8345 ac_cv_has_le64toh=no
8346fi
8347rm -f core conftest.err conftest.$ac_objext \
8348 conftest$ac_exeext conftest.$ac_ext
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8350$as_echo "$ac_cv_has_le64toh" >&6; }
8351if test "$ac_cv_has_le64toh" = "yes"; then
8352
8353$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8354
8355fi
8356
Martin v. Löwis399a6892002-10-04 10:22:02 +00008357use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008358# Don't use largefile support for GNU/Hurd
8359case $ac_sys_system in GNU*)
8360 use_lfs=no
8361esac
8362
Martin v. Löwis399a6892002-10-04 10:22:02 +00008363if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008364# Two defines needed to enable largefile support on various platforms
8365# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008366case $ac_sys_system/$ac_sys_release in
8367AIX*)
8368
8369$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8370
8371 ;;
8372esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
8376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008378
Martin v. Löwis399a6892002-10-04 10:22:02 +00008379fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008380
Guido van Rossum84e7b241996-08-19 21:59:00 +00008381# Add some code to confdefs.h so that the test for off_t works on SCO
8382cat >> confdefs.h <<\EOF
8383#if defined(SCO_DS)
8384#undef _OFF_T
8385#endif
8386EOF
8387
Guido van Rossumef2255b2000-03-10 22:30:29 +00008388# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008389ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008391
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008392else
Martin v. Löwis11437992002-04-12 09:54:03 +00008393
8394cat >>confdefs.h <<_ACEOF
8395#define mode_t int
8396_ACEOF
8397
8398fi
8399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008403else
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
8405cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
8408
8409fi
8410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008412if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414else
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
8416cat >>confdefs.h <<_ACEOF
8417#define pid_t int
8418_ACEOF
8419
8420fi
8421
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008424#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008425_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008426
Matthias Kloseb9621712010-04-24 17:59:49 +00008427ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008428if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008430else
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
8432cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008434_ACEOF
8435
8436fi
8437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8439$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008440if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008444/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008445#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
8447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450 ac_cv_type_uid_t=yes
8451else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452 ac_cv_type_uid_t=no
8453fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008454rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8458$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008459if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465
8466fi
8467
Mark Dickinson983bc162012-12-02 12:11:38 +00008468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008470if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008473
8474fi
8475
Stefan Krah1919b7e2012-03-21 18:25:23 +01008476ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8477if test "x$ac_cv_type___uint128_t" = xyes; then :
8478
8479$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8480
8481fi
8482
Jack Jansendd19cf82001-12-06 22:36:17 +00008483
Michael W. Hudson54241132001-12-07 15:38:26 +00008484# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008485# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486# The cast to long int works around a bug in the HP C Compiler
8487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8489# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8491$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008492if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 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 +00008496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 if test "$ac_cv_type_int" = yes; then
8499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008501as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008502See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 else
8504 ac_cv_sizeof_int=0
8505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8510$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512
8513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008515#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008516_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008517
8518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519# The cast to long int works around a bug in the HP C Compiler
8520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8522# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8524$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 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 +00008529
Martin v. Löwis11437992002-04-12 09:54:03 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 if test "$ac_cv_type_long" = yes; then
8532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008534as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536 else
8537 ac_cv_sizeof_long=0
8538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8543$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544
8545
8546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008548#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008549_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008550
8551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552# The cast to long int works around a bug in the HP C Compiler
8553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8555# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8557$as_echo_n "checking size of long long... " >&6; }
8558if ${ac_cv_sizeof_long_long+:} false; then :
8559 $as_echo_n "(cached) " >&6
8560else
8561 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8562
8563else
8564 if test "$ac_cv_type_long_long" = yes; then
8565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8567as_fn_error 77 "cannot compute sizeof (long long)
8568See \`config.log' for more details" "$LINENO" 5; }
8569 else
8570 ac_cv_sizeof_long_long=0
8571 fi
8572fi
8573
8574fi
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8576$as_echo "$ac_cv_sizeof_long_long" >&6; }
8577
8578
8579
8580cat >>confdefs.h <<_ACEOF
8581#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8582_ACEOF
8583
8584
8585# The cast to long int works around a bug in the HP C Compiler
8586# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8587# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8588# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8590$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008591if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008593else
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 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 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 if test "$ac_cv_type_void_p" = yes; then
8598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008600as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008601See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602 else
8603 ac_cv_sizeof_void_p=0
8604 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8609$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610
8611
8612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008614#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008616
8617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618# The cast to long int works around a bug in the HP C Compiler
8619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8621# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8623$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008624if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 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 +00008628
Martin v. Löwis11437992002-04-12 09:54:03 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 if test "$ac_cv_type_short" = yes; then
8631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008633as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008634See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 else
8636 ac_cv_sizeof_short=0
8637 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8642$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643
8644
8645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008647#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008648_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008649
8650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651# The cast to long int works around a bug in the HP C Compiler
8652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8654# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8656$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008657if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 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 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 if test "$ac_cv_type_float" = yes; then
8664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008666as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008667See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668 else
8669 ac_cv_sizeof_float=0
8670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8675$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676
8677
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008680#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008681_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008682
8683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684# The cast to long int works around a bug in the HP C Compiler
8685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8689$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 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 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 if test "$ac_cv_type_double" = yes; then
8697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008699as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008700See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 else
8702 ac_cv_sizeof_double=0
8703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8708$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709
8710
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008713#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008714_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008715
8716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717# The cast to long int works around a bug in the HP C Compiler
8718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8720# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8722$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008723if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 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 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 if test "$ac_cv_type_fpos_t" = yes; then
8730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008732as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008733See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734 else
8735 ac_cv_sizeof_fpos_t=0
8736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8741$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742
8743
8744
Martin v. Löwis11437992002-04-12 09:54:03 +00008745cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008746#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008747_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008748
Michael W. Hudson54241132001-12-07 15:38:26 +00008749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750# The cast to long int works around a bug in the HP C Compiler
8751# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8752# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8753# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8755$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008756if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 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 +00008760
Martin v. Löwis18e16552006-02-15 17:27:45 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 if test "$ac_cv_type_size_t" = yes; then
8763 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008765as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008766See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767 else
8768 ac_cv_sizeof_size_t=0
8769 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771
Martin v. Löwis18e16552006-02-15 17:27:45 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8774$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775
8776
8777
Martin v. Löwis18e16552006-02-15 17:27:45 +00008778cat >>confdefs.h <<_ACEOF
8779#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8780_ACEOF
8781
8782
Christian Heimes400adb02008-02-01 08:12:03 +00008783# The cast to long int works around a bug in the HP C Compiler
8784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8788$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 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 +00008793
Christian Heimes400adb02008-02-01 08:12:03 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type_pid_t" = yes; then
8796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008798as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008800 else
8801 ac_cv_sizeof_pid_t=0
8802 fi
8803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Christian Heimes400adb02008-02-01 08:12:03 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8807$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008808
8809
8810
8811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8813_ACEOF
8814
8815
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008816# The cast to long int works around a bug in the HP C Compiler
8817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8819# This bug is HP SR number 8606223364.
8820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8821$as_echo_n "checking size of uintptr_t... " >&6; }
8822if ${ac_cv_sizeof_uintptr_t+:} false; then :
8823 $as_echo_n "(cached) " >&6
8824else
8825 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8826
8827else
8828 if test "$ac_cv_type_uintptr_t" = yes; then
8829 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8831as_fn_error 77 "cannot compute sizeof (uintptr_t)
8832See \`config.log' for more details" "$LINENO" 5; }
8833 else
8834 ac_cv_sizeof_uintptr_t=0
8835 fi
8836fi
8837
8838fi
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8840$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8841
8842
8843
8844cat >>confdefs.h <<_ACEOF
8845#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8846_ACEOF
8847
8848
Michael W. Hudson54241132001-12-07 15:38:26 +00008849
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008850
Eitan Adler3055c942018-05-15 22:58:09 -07008851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8852$as_echo_n "checking for long double... " >&6; }
8853if ${ac_cv_type_long_double+:} false; then :
8854 $as_echo_n "(cached) " >&6
8855else
8856 if test "$GCC" = yes; then
8857 ac_cv_type_long_double=yes
8858 else
8859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8860/* end confdefs.h. */
8861/* The Stardent Vistra knows sizeof (long double), but does
8862 not support it. */
8863 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008864int
8865main ()
8866{
Eitan Adler3055c942018-05-15 22:58:09 -07008867static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8868 sizeof (double) <= sizeof (long double))];
8869test_array [0] = 0;
8870return test_array [0];
8871
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008872 ;
8873 return 0;
8874}
8875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008876if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008877 ac_cv_type_long_double=yes
8878else
8879 ac_cv_type_long_double=no
8880fi
8881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8882 fi
8883fi
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8885$as_echo "$ac_cv_type_long_double" >&6; }
8886 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887
Matthias Kloseb9621712010-04-24 17:59:49 +00008888$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008889
Eitan Adler3055c942018-05-15 22:58:09 -07008890 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008892# The cast to long int works around a bug in the HP C Compiler
8893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8897$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008898if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 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 +00008902
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 if test "$ac_cv_type_long_double" = yes; then
8905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008907as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008908See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008909 else
8910 ac_cv_sizeof_long_double=0
8911 fi
8912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8916$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008917
8918
8919
8920cat >>confdefs.h <<_ACEOF
8921#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8922_ACEOF
8923
8924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926# The cast to long int works around a bug in the HP C Compiler
8927# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8928# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8929# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8931$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008932if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008934else
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 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 +00008936
Thomas Woutersb2137042007-02-01 18:02:27 +00008937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 if test "$ac_cv_type__Bool" = yes; then
8939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008941as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008942See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943 else
8944 ac_cv_sizeof__Bool=0
8945 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008947
Thomas Woutersb2137042007-02-01 18:02:27 +00008948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8950$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951
8952
8953
Thomas Woutersb2137042007-02-01 18:02:27 +00008954cat >>confdefs.h <<_ACEOF
8955#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8956_ACEOF
8957
8958
Thomas Woutersb2137042007-02-01 18:02:27 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960# The cast to long int works around a bug in the HP C Compiler
8961# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8962# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8963# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8965$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008966if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968else
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970#ifdef HAVE_SYS_TYPES_H
8971#include <sys/types.h>
8972#endif
8973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976else
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 if test "$ac_cv_type_off_t" = yes; then
8978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008980as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008981See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982 else
8983 ac_cv_sizeof_off_t=0
8984 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8989$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008990
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008991
8992
Martin v. Löwis11437992002-04-12 09:54:03 +00008993cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008994#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008995_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008996
Michael W. Hudson54241132001-12-07 15:38:26 +00008997
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008998
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9000$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009001if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009002 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9007$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008else
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9010$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009011fi
9012
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013# The cast to long int works around a bug in the HP C Compiler
9014# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9015# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9016# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9018$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009019if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023#ifdef HAVE_SYS_TYPES_H
9024#include <sys/types.h>
9025#endif
9026#ifdef HAVE_TIME_H
9027#include <time.h>
9028#endif
9029
Matthias Kloseb9621712010-04-24 17:59:49 +00009030"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009032else
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 if test "$ac_cv_type_time_t" = yes; then
9034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009036as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009037See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038 else
9039 ac_cv_sizeof_time_t=0
9040 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9045$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009047
9048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009050#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009052
Michael W. Hudson54241132001-12-07 15:38:26 +00009053
9054
Trent Mick635f6fb2000-08-23 21:33:05 +00009055# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009056ac_save_cc="$CC"
9057if test "$ac_cv_kpthread" = "yes"
9058then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009059elif test "$ac_cv_kthread" = "yes"
9060then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009061elif test "$ac_cv_pthread" = "yes"
9062then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009063fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9066$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009067have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009069/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009070
9071 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009072int
9073main ()
9074{
Guido van Rossum12580492000-09-24 16:47:19 +00009075pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ;
9077 return 0;
9078}
Matthias Kloseb159a552010-04-25 21:00:44 +00009079
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009081if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009082 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9086$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009087if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009089# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9090# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9091# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9093$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009094if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096else
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098#ifdef HAVE_PTHREAD_H
9099#include <pthread.h>
9100#endif
9101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009104else
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 if test "$ac_cv_type_pthread_t" = yes; then
9106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009108as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009109See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009110 else
9111 ac_cv_sizeof_pthread_t=0
9112 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009114
Trent Mick635f6fb2000-08-23 21:33:05 +00009115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9117$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009119
9120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009122#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009124
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009125
Trent Mick635f6fb2000-08-23 21:33:05 +00009126fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009127
9128# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9129# This checking will be unnecessary after removing deprecated TLS API.
9130# The cast to long int works around a bug in the HP C Compiler
9131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9133# This bug is HP SR number 8606223364.
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9135$as_echo_n "checking size of pthread_key_t... " >&6; }
9136if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9137 $as_echo_n "(cached) " >&6
9138else
9139 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9140"; then :
9141
9142else
9143 if test "$ac_cv_type_pthread_key_t" = yes; then
9144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9146as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9147See \`config.log' for more details" "$LINENO" 5; }
9148 else
9149 ac_cv_sizeof_pthread_key_t=0
9150 fi
9151fi
9152
9153fi
9154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9155$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9156
9157
9158
9159cat >>confdefs.h <<_ACEOF
9160#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9161_ACEOF
9162
9163
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9165$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9166if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9168/* end confdefs.h. */
9169#include <pthread.h>
9170int
9171main ()
9172{
9173pthread_key_t k; k * 1;
9174 ;
9175 return 0;
9176}
9177_ACEOF
9178if ac_fn_c_try_compile "$LINENO"; then :
9179 ac_pthread_key_t_is_arithmetic_type=yes
9180else
9181 ac_pthread_key_t_is_arithmetic_type=no
9182
9183fi
9184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9186$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9187 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9188
9189$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9190
9191 fi
9192else
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
9195fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009196CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009197
Michael W. Hudson54241132001-12-07 15:38:26 +00009198
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009199case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009200 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009201 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9202 ;;
9203 Darwin/*)
9204 OTHER_LIBTOOL_OPT=""
9205 ;;
9206esac
9207
9208
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009209
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009210case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009211 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009212 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9213 if test "${enable_universalsdk}"; then
9214 :
9215 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009216 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009217 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009218 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009219 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009220 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009221 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009222 if test ${gcc_version} '<' 4.0
9223 then
9224 LIBTOOL_CRUFT="-lcc_dynamic"
9225 else
9226 LIBTOOL_CRUFT=""
9227 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009229 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230else
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009233
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234 #include <unistd.h>
9235 int main(int argc, char*argv[])
9236 {
9237 if (sizeof(long) == 4) {
9238 return 0;
9239 } else {
9240 return 1;
9241 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009242 }
9243
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009245if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009246 ac_osx_32bit=yes
9247else
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009252fi
9253
9254
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009256 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 i386)
9258 MACOSX_DEFAULT_ARCH="i386"
9259 ;;
9260 ppc)
9261 MACOSX_DEFAULT_ARCH="ppc"
9262 ;;
9263 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009264 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009265 ;;
9266 esac
9267 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009268 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 i386)
9270 MACOSX_DEFAULT_ARCH="x86_64"
9271 ;;
9272 ppc)
9273 MACOSX_DEFAULT_ARCH="ppc64"
9274 ;;
9275 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009276 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009277 ;;
9278 esac
9279
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009280 fi
9281
9282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009284 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9287$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009288if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009290 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009292 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define WITH_NEXT_FRAMEWORK 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: yes" >&5
9297$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009298 if test $enable_shared = "yes"
9299 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009300 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 +00009301 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302else
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9304$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305fi
9306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9308$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009309case $ac_sys_system/$ac_sys_release in
9310 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009313
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9315$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009316 ;;
9317 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9319$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009320 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009321esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009322
Guido van Rossum0a516c91994-09-12 10:58:40 +00009323# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324
Michael W. Hudson54241132001-12-07 15:38:26 +00009325
9326
9327
9328
Benjamin Peterson99f03762010-04-11 22:15:28 +00009329
Thomas Wouters477c8d52006-05-27 19:21:47 +00009330
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009331# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9332# -- usually .so, .sl on HP-UX, .dll on Cygwin
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9334$as_echo_n "checking the extension of shared libraries... " >&6; }
9335if test -z "$SHLIB_SUFFIX"; then
9336 case $ac_sys_system in
9337 hp*|HP*)
9338 case `uname -m` in
9339 ia64) SHLIB_SUFFIX=.so;;
9340 *) SHLIB_SUFFIX=.sl;;
9341 esac
9342 ;;
9343 CYGWIN*) SHLIB_SUFFIX=.dll;;
9344 *) SHLIB_SUFFIX=.so;;
9345 esac
9346fi
9347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9348$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009349
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009351# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352# (Shared libraries in this instance are shared modules to be loaded into
9353# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9355$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009356if test -z "$LDSHARED"
9357then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009358 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009359 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009360 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009361 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009362 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009364 if test "$GCC" = "yes" ; then
9365 LDSHARED='$(CC) -shared'
9366 LDCXXSHARED='$(CXX) -shared'
9367 else
9368 LDSHARED='$(CC) -G'
9369 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009370 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009371 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009372 if test "$GCC" = "yes" ; then
9373 LDSHARED='$(CC) -shared'
9374 LDCXXSHARED='$(CXX) -shared'
9375 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009376 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009377 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009378 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009379 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009380 LDSHARED='$(CC) -bundle'
9381 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009382 if test "$enable_framework" ; then
9383 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009384 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9385 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009386 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009387 else
9388 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009389 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009390 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009391 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009392 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009393 LDSHARED='$(CC) -bundle'
9394 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009395 if test "$enable_framework" ; then
9396 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009397 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9398 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009399 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009400 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009401 # No framework, use the Python app as bundle-loader
9402 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009403 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009404 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009405 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009406 Darwin/*)
9407 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9408 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009409
Ned Deily36820b62014-06-25 13:44:22 -07009410 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9411 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9412 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9413 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9414 if test ${dep_target_major} -eq 10 && \
9415 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009416 then
Ned Deily36820b62014-06-25 13:44:22 -07009417 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009418 LDSHARED='$(CC) -bundle'
9419 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009420 if test "$enable_framework" ; then
9421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009424 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009425 else
9426 # No framework, use the Python app as bundle-loader
9427 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9428 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009429 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009430 fi
Ned Deily36820b62014-06-25 13:44:22 -07009431 else
9432 # building for OS X 10.3 and later
9433 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9434 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9435 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009436 fi
9437 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009438 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009439 LDSHARED='$(CC) -shared'
9440 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009441 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009442 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009443 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009444 LDSHARED='$(CC) -shared'
9445 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009446 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009447 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009448 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009449 OpenBSD*)
9450 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9451 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009452 LDSHARED='$(CC) -shared $(CCSHARED)'
9453 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009454 else
9455 case `uname -r` in
9456 [01].* | 2.[0-7] | 2.[0-7].*)
9457 LDSHARED="ld -Bshareable ${LDFLAGS}"
9458 ;;
9459 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009460 LDSHARED='$(CC) -shared $(CCSHARED)'
9461 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009462 ;;
9463 esac
9464 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009465 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009466 LDSHARED='$(CC) -shared'
9467 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009468 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469 if test "$GCC" = "yes" ; then
9470 LDSHARED='$(CC) -shared'
9471 LDCXXSHARED='$(CXX) -shared'
9472 else
9473 LDSHARED='$(CC) -G'
9474 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009475 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009476 SCO_SV*)
9477 LDSHARED='$(CC) -Wl,-G,-Bexport'
9478 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9479 CYGWIN*)
9480 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9481 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482 *) LDSHARED="ld";;
9483 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9486$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009487LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009488BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009489# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009490# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9492$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493if test -z "$CCSHARED"
9494then
Guido van Rossum07397971997-04-29 21:49:50 +00009495 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009496 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009497 then CCSHARED="-fPIC";
9498 elif test `uname -p` = sparc;
9499 then CCSHARED="-xcode=pic32";
9500 else CCSHARED="-Kpic";
9501 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009502 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009503 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009504 else CCSHARED="+z";
9505 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009506 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009507 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009508 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009509 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009510 if test "$GCC" = "yes"
9511 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009512 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009513 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009514 SCO_SV*)
9515 if test "$GCC" = "yes"
9516 then CCSHARED="-fPIC"
9517 else CCSHARED="-Kpic -belf"
9518 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009519 VxWorks*)
9520 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9524$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009526# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9528$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529if test -z "$LINKFORSHARED"
9530then
Guido van Rossum07397971997-04-29 21:49:50 +00009531 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009532 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009533 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009534 LINKFORSHARED="-Wl,-E -Wl,+s";;
9535# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009536 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009537 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009538 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009540 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Miss Islington (bot)bd92b942019-07-02 00:31:07 -07009541
9542 # Issue #18075: the default maximum stack size (8MBytes) is too
9543 # small for the default recursion limit. Increase the stack size
9544 # to ensure that tests don't crash
9545 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9546
Jack Jansene578a632001-08-15 01:27:14 +00009547 if test "$enable_framework"
9548 then
Jack Jansenda49e192005-01-07 13:08:22 +00009549 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009550 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009551 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009552 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009553 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009554 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009555 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009556 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9557 then
9558 LINKFORSHARED="-Wl,--export-dynamic"
9559 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009560 SunOS/5*) case $CC in
9561 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009562 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009563 then
9564 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009565 fi;;
9566 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009567 CYGWIN*)
9568 if test $enable_shared = "no"
9569 then
9570 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9571 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009572 QNX*)
9573 # -Wl,-E causes the symbols to be added to the dynamic
9574 # symbol table so that they can be found when a module
9575 # is loaded. -N 2048K causes the stack size to be set
9576 # to 2048 kilobytes so that the stack doesn't overflow
9577 # when running test_compile.py.
9578 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009579 VxWorks*)
9580 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009581 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9584$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009585
Michael W. Hudson54241132001-12-07 15:38:26 +00009586
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009587
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9589$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009590if test ! "$LIBRARY" = "$LDLIBRARY"
9591then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009592 case $ac_sys_system in
9593 CYGWIN*)
9594 # Cygwin needs CCSHARED when building extension DLLs
9595 # but not when building the interpreter DLL.
9596 CFLAGSFORSHARED='';;
9597 *)
9598 CFLAGSFORSHARED='$(CCSHARED)'
9599 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9602$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009603
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009604# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9605# library (with --enable-shared).
9606# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009607# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9608# if it is not required, since it creates a dependency of the shared library
9609# to LIBS. This, in turn, means that applications linking the shared libpython
9610# don't need to link LIBS explicitly. The default should be only changed
9611# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009612
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9614$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009615case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009616 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009617 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009618esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9620$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009621
9622
Guido van Rossum627b2d71993-12-24 10:39:16 +00009623# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9625$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009627 $as_echo_n "(cached) " >&6
9628else
9629 ac_check_lib_save_LIBS=$LIBS
9630LIBS="-lsendfile $LIBS"
9631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9632/* end confdefs.h. */
9633
9634/* Override any GCC internal prototype to avoid an error.
9635 Use char because int might match the return type of a GCC
9636 builtin and then its argument prototype would still apply. */
9637#ifdef __cplusplus
9638extern "C"
9639#endif
9640char sendfile ();
9641int
9642main ()
9643{
9644return sendfile ();
9645 ;
9646 return 0;
9647}
9648_ACEOF
9649if ac_fn_c_try_link "$LINENO"; then :
9650 ac_cv_lib_sendfile_sendfile=yes
9651else
9652 ac_cv_lib_sendfile_sendfile=no
9653fi
9654rm -f core conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext conftest.$ac_ext
9656LIBS=$ac_check_lib_save_LIBS
9657fi
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9659$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009660if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009661 cat >>confdefs.h <<_ACEOF
9662#define HAVE_LIBSENDFILE 1
9663_ACEOF
9664
9665 LIBS="-lsendfile $LIBS"
9666
9667fi
9668
Matthias Kloseb9621712010-04-24 17:59:49 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9670$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009671if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009672 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009673else
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009675LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679/* Override any GCC internal prototype to avoid an error.
9680 Use char because int might match the return type of a GCC
9681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682#ifdef __cplusplus
9683extern "C"
9684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009685char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009686int
9687main ()
9688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ;
9691 return 0;
9692}
9693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009696else
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009699rm -f core conftest.err conftest.$ac_objext \
9700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009701LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9704$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 cat >>confdefs.h <<_ACEOF
9707#define HAVE_LIBDL 1
9708_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009710 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009711
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009712fi
9713 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9715$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009716if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009718else
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009720LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724/* Override any GCC internal prototype to avoid an error.
9725 Use char because int might match the return type of a GCC
9726 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727#ifdef __cplusplus
9728extern "C"
9729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009730char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009731int
9732main ()
9733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ;
9736 return 0;
9737}
9738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009741else
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744rm -f core conftest.err conftest.$ac_objext \
9745 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009746LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9749$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009750if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 cat >>confdefs.h <<_ACEOF
9752#define HAVE_LIBDLD 1
9753_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009754
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009755 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009756
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009757fi
9758 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009759
Michael Felt0d3ccb42017-12-30 22:39:20 +01009760# checks for uuid.h location
9761for ac_header in uuid/uuid.h uuid.h
9762do :
9763 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9764ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9765if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9766 cat >>confdefs.h <<_ACEOF
9767#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9768_ACEOF
9769
9770fi
9771
9772done
9773
9774
Berker Peksag9a10ff42017-11-08 23:09:16 +03009775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9776$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9778/* end confdefs.h. */
9779#include <uuid/uuid.h>
9780int
9781main ()
9782{
9783
9784#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009785void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009786#endif
9787
9788 ;
9789 return 0;
9790}
9791_ACEOF
9792if ac_fn_c_try_compile "$LINENO"; then :
9793
9794$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9795
9796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9797$as_echo "yes" >&6; }
9798else
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
9801
9802fi
9803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9804
Michael Felt0d3ccb42017-12-30 22:39:20 +01009805# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009806# FreeBSD and OpenBSD provides support as well
9807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9808$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9810/* end confdefs.h. */
9811#include <uuid.h>
9812int
9813main ()
9814{
9815
9816#ifndef uuid_create
9817void *x = uuid_create
9818#endif
9819
9820 ;
9821 return 0;
9822}
9823_ACEOF
9824if ac_fn_c_try_compile "$LINENO"; then :
9825
9826$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9827
9828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9829$as_echo "yes" >&6; }
9830else
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9832$as_echo "no" >&6; }
9833
9834fi
9835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9836
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009837# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9838# stream in big-endian byte-order
9839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9840$as_echo_n "checking for uuid_enc_be... " >&6; }
9841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9842/* end confdefs.h. */
9843#include <uuid.h>
9844int
9845main ()
9846{
9847
9848#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009849void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009850#endif
9851
9852 ;
9853 return 0;
9854}
9855_ACEOF
9856if ac_fn_c_try_compile "$LINENO"; then :
9857
9858$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9859
9860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9861$as_echo "yes" >&6; }
9862else
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
9865
9866fi
9867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9868
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009869# 'Real Time' functions on Solaris
9870# posix4 on Solaris 2.6
9871# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009873$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009874if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009876else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009877 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881/* Override any GCC internal prototype to avoid an error.
9882 Use char because int might match the return type of a GCC
9883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884#ifdef __cplusplus
9885extern "C"
9886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009887char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009888int
9889main ()
9890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ;
9893 return 0;
9894}
9895_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896for ac_lib in '' pthread rt posix4; do
9897 if test -z "$ac_lib"; then
9898 ac_res="none required"
9899 else
9900 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009901 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009908 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911done
Victor Stinnere0be4232011-10-25 13:06:09 +02009912if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914else
9915 ac_cv_search_sem_init=no
9916fi
9917rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009918LIBS=$ac_func_search_save_LIBS
9919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9921$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009923if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009925
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009926fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009927
Martin v. Löwis519adae2003-09-20 10:47:47 +00009928
Martin v. Löwis19d17342003-06-14 21:03:05 +00009929# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9931$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009932if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009934else
9935 ac_check_lib_save_LIBS=$LIBS
9936LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009938/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940/* Override any GCC internal prototype to avoid an error.
9941 Use char because int might match the return type of a GCC
9942 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943#ifdef __cplusplus
9944extern "C"
9945#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009946char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947int
9948main ()
9949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009950return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009951 ;
9952 return 0;
9953}
9954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009956 ac_cv_lib_intl_textdomain=yes
9957else
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960rm -f core conftest.err conftest.$ac_objext \
9961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009962LIBS=$ac_check_lib_save_LIBS
9963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9965$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009966if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009967
Matthias Kloseb9621712010-04-24 17:59:49 +00009968$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969
Brett Cannonc6d936e2009-06-07 20:09:53 +00009970 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009971fi
9972
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009973
9974# checks for system dependent C++ extensions support
9975case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9977$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009980
Georg Brandl59e87bd2011-02-15 19:48:59 +00009981 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009982int
9983main ()
9984{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009985loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ;
9987 return 0;
9988}
Matthias Kloseb159a552010-04-25 21:00:44 +00009989
Martin v. Löwis11437992002-04-12 09:54:03 +00009990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009992
Matthias Kloseb159a552010-04-25 21:00:44 +00009993
Matthias Kloseb9621712010-04-24 17:59:49 +00009994$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009995
Matthias Kloseb159a552010-04-25 21:00:44 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009997$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009998
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009999else
Matthias Kloseb159a552010-04-25 21:00:44 +000010000
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010002$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010003
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010005rm -f core conftest.err conftest.$ac_objext \
10006 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010007 *) ;;
10008esac
10009
Christian Heimes985ecdc2013-11-20 11:46:18 +010010010# check for systems that require aligned memory access
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10012$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010013if ${ac_cv_aligned_required+:} false; then :
10014 $as_echo_n "(cached) " >&6
10015else
10016 if test "$cross_compiling" = yes; then :
10017 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010018else
10019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10020/* end confdefs.h. */
10021
10022int main()
10023{
10024 char s[16];
10025 int i, *p1, *p2;
10026 for (i=0; i < 16; i++)
10027 s[i] = i;
10028 p1 = (int*)(s+1);
10029 p2 = (int*)(s+2);
10030 if (*p1 == *p2)
10031 return 1;
10032 return 0;
10033}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010034_ACEOF
10035if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010036 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010037else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010038 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010039fi
10040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10041 conftest.$ac_objext conftest.beam conftest.$ac_ext
10042fi
10043
10044
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010045fi
10046
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10048$as_echo "$ac_cv_aligned_required" >&6; }
10049if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010050
10051$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10052
10053fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010054
10055# str, bytes and memoryview hash algorithm
10056
10057
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10059$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10060
10061# Check whether --with-hash_algorithm was given.
10062if test "${with_hash_algorithm+set}" = set; then :
10063 withval=$with_hash_algorithm;
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10065$as_echo "$withval" >&6; }
10066case "$withval" in
10067 siphash24)
10068 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10069
10070 ;;
10071 fnv)
10072 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10073
10074 ;;
10075 *)
10076 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10077 ;;
10078esac
10079
10080else
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10082$as_echo "default" >&6; }
10083fi
10084
10085
Charles-François Natalid30b0222014-05-08 23:08:51 +010010086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10087$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10088
10089# Check whether --with-address_sanitizer was given.
10090if test "${with_address_sanitizer+set}" = set; then :
10091 withval=$with_address_sanitizer;
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10093$as_echo "$withval" >&6; }
10094BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10095LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010096# ASan works by controlling memory allocation, our own malloc interferes.
10097with_pymalloc="no"
10098
10099else
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
10102fi
10103
10104
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10106$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10107
10108# Check whether --with-memory_sanitizer was given.
10109if test "${with_memory_sanitizer+set}" = set; then :
10110 withval=$with_memory_sanitizer;
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10112$as_echo "$withval" >&6; }
10113BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10114LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10115# MSan works by controlling memory allocation, our own malloc interferes.
10116with_pymalloc="no"
10117
10118else
10119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10125$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10126
10127# Check whether --with-undefined_behavior_sanitizer was given.
10128if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10129 withval=$with_undefined_behavior_sanitizer;
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10131$as_echo "$withval" >&6; }
10132BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10133LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010134
10135else
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
10138fi
10139
10140
Guido van Rossum70c7f481998-03-26 18:44:10 +000010141# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10143$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010144if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010146else
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010148LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152/* Override any GCC internal prototype to avoid an error.
10153 Use char because int might match the return type of a GCC
10154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010155#ifdef __cplusplus
10156extern "C"
10157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010158char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ;
10164 return 0;
10165}
10166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010169else
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010172rm -f core conftest.err conftest.$ac_objext \
10173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010174LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10177$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010178if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010179 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010180fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010181 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10183$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010184if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010188LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192/* Override any GCC internal prototype to avoid an error.
10193 Use char because int might match the return type of a GCC
10194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010195#ifdef __cplusplus
10196extern "C"
10197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010198char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010199int
10200main ()
10201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010203 ;
10204 return 0;
10205}
10206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010209else
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010212rm -f core conftest.err conftest.$ac_objext \
10213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010214LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10217$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010218if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010219 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010220fi
10221 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010222
Matthias Kloseb9621712010-04-24 17:59:49 +000010223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10224$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010227if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10230$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010231LIBS="$withval $LIBS"
10232
10233else
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236fi
10237
Guido van Rossum7f43da71994-08-01 12:15:30 +000010238
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010239
10240
10241
10242
10243
10244
Victor Stinner23a683a2019-04-12 21:27:37 +020010245
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010246if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10247 if test -n "$ac_tool_prefix"; then
10248 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10249set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10251$as_echo_n "checking for $ac_word... " >&6; }
10252if ${ac_cv_path_PKG_CONFIG+:} false; then :
10253 $as_echo_n "(cached) " >&6
10254else
10255 case $PKG_CONFIG in
10256 [\\/]* | ?:[\\/]*)
10257 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10258 ;;
10259 *)
10260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10261for as_dir in $PATH
10262do
10263 IFS=$as_save_IFS
10264 test -z "$as_dir" && as_dir=.
10265 for ac_exec_ext in '' $ac_executable_extensions; do
10266 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10267 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10268 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10269 break 2
10270 fi
10271done
10272 done
10273IFS=$as_save_IFS
10274
10275 ;;
10276esac
10277fi
10278PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10279if test -n "$PKG_CONFIG"; then
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10281$as_echo "$PKG_CONFIG" >&6; }
10282else
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
10285fi
10286
10287
10288fi
10289if test -z "$ac_cv_path_PKG_CONFIG"; then
10290 ac_pt_PKG_CONFIG=$PKG_CONFIG
10291 # Extract the first word of "pkg-config", so it can be a program name with args.
10292set dummy pkg-config; ac_word=$2
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10294$as_echo_n "checking for $ac_word... " >&6; }
10295if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10296 $as_echo_n "(cached) " >&6
10297else
10298 case $ac_pt_PKG_CONFIG in
10299 [\\/]* | ?:[\\/]*)
10300 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10301 ;;
10302 *)
10303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10304for as_dir in $PATH
10305do
10306 IFS=$as_save_IFS
10307 test -z "$as_dir" && as_dir=.
10308 for ac_exec_ext in '' $ac_executable_extensions; do
10309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10310 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10312 break 2
10313 fi
10314done
10315 done
10316IFS=$as_save_IFS
10317
10318 ;;
10319esac
10320fi
10321ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10322if test -n "$ac_pt_PKG_CONFIG"; then
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10324$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10325else
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10327$as_echo "no" >&6; }
10328fi
10329
10330 if test "x$ac_pt_PKG_CONFIG" = x; then
10331 PKG_CONFIG=""
10332 else
10333 case $cross_compiling:$ac_tool_warned in
10334yes:)
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10336$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10337ac_tool_warned=yes ;;
10338esac
10339 PKG_CONFIG=$ac_pt_PKG_CONFIG
10340 fi
10341else
10342 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10343fi
10344
10345fi
10346if test -n "$PKG_CONFIG"; then
10347 _pkg_min_version=0.9.0
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10349$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10350 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10352$as_echo "yes" >&6; }
10353 else
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10355$as_echo "no" >&6; }
10356 PKG_CONFIG=""
10357 fi
10358fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010359
10360# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10362$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010363
10364# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010365if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010366 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010367else
10368 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010369fi
10370
10371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10373$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010374
10375# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10377$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010378
10379# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010381 withval=$with_system_ffi;
10382fi
10383
10384
Zachary Waref40d4dd2016-09-17 01:25:24 -050010385if test "$ac_sys_system" = "Darwin"
10386then
10387 case "$with_system_ffi" in
10388 "")
10389 with_system_ffi="no"
10390 ;;
10391 yes|no)
10392 ;;
10393 *)
10394 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10395 ;;
10396 esac
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10398$as_echo "$with_system_ffi" >&6; }
10399else
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10401$as_echo "yes" >&6; }
10402 if test "$with_system_ffi" != ""
10403 then
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10405$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10406 fi
10407 with_system_ffi="yes"
10408fi
Zachary Ware935043d2016-09-09 17:01:21 -070010409
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010410if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010411 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10412else
10413 LIBFFI_INCLUDEDIR=""
10414fi
10415
10416
Stefan Krah60187b52012-03-23 19:06:27 +010010417# Check for use of the system libmpdec library
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10419$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10420
10421# Check whether --with-system_libmpdec was given.
10422if test "${with_system_libmpdec+set}" = set; then :
10423 withval=$with_system_libmpdec;
10424else
10425 with_system_libmpdec="no"
10426fi
10427
10428
10429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10430$as_echo "$with_system_libmpdec" >&6; }
10431
Benjamin Peterson076ed002010-10-31 17:11:02 +000010432# Check for support for loadable sqlite extensions
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10434$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10435# Check whether --enable-loadable-sqlite-extensions was given.
10436if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10437 enableval=$enable_loadable_sqlite_extensions;
10438else
10439 enable_loadable_sqlite_extensions="no"
10440fi
10441
10442
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10444$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10445
Ned Deilyd819b932013-09-06 01:07:05 -070010446# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10447
10448
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10450$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10451
10452# Check whether --with-tcltk-includes was given.
10453if test "${with_tcltk_includes+set}" = set; then :
10454 withval=$with_tcltk_includes;
10455else
10456 with_tcltk_includes="default"
10457fi
10458
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10460$as_echo "$with_tcltk_includes" >&6; }
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10462$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10463
10464# Check whether --with-tcltk-libs was given.
10465if test "${with_tcltk_libs+set}" = set; then :
10466 withval=$with_tcltk_libs;
10467else
10468 with_tcltk_libs="default"
10469fi
10470
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10472$as_echo "$with_tcltk_libs" >&6; }
10473if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10474then
10475 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10476 then
10477 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10478 fi
10479 TCLTK_INCLUDES=""
10480 TCLTK_LIBS=""
10481else
10482 TCLTK_INCLUDES="$with_tcltk_includes"
10483 TCLTK_LIBS="$with_tcltk_libs"
10484fi
10485
Matthias Klose55708cc2009-04-30 08:06:49 +000010486# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10488$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010489
10490# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010491if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010492 withval=$with_dbmliborder;
10493if test x$with_dbmliborder = xyes
10494then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010495as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010496else
10497 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10498 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10499 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010500 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010501 fi
10502 done
10503fi
10504fi
10505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10507$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010508
Martin v. Löwis11437992002-04-12 09:54:03 +000010509# Templates for things AC_DEFINEd more than once.
10510# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010511
10512
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010513if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010514then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010515 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010517
10518 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010519elif test "$ac_cv_kpthread" = "yes"
10520then
10521 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010522 if test "$ac_cv_cxx_thread" = "yes"; then
10523 CXX="$CXX -Kpthread"
10524 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010525 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010526elif test "$ac_cv_kthread" = "yes"
10527then
10528 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010529 if test "$ac_cv_cxx_thread" = "yes"; then
10530 CXX="$CXX -Kthread"
10531 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010532 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533elif test "$ac_cv_pthread" = "yes"
10534then
10535 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010536 if test "$ac_cv_cxx_thread" = "yes"; then
10537 CXX="$CXX -pthread"
10538 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010540else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010541 if test ! -z "$withval" -a -d "$withval"
10542 then LDFLAGS="$LDFLAGS -L$withval"
10543 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010544
10545 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010546 # define _POSIX_THREADS in unistd.h. Some apparently don't
10547 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10549$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010552
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010554#ifdef _POSIX_THREADS
10555yes
10556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010557
10558_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561 unistd_defines_pthreads=yes
10562else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563 unistd_defines_pthreads=no
10564fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010565rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010566
Matthias Kloseb9621712010-04-24 17:59:49 +000010567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10568$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010571
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010572 # Just looking for pthread_create in libpthread is not enough:
10573 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10574 # So we really have to include pthread.h, and then link.
10575 _libs=$LIBS
10576 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10578$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010580/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010581
10582#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010583#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010584
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010585void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010586int
10587main ()
10588{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010589
10590pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ;
10592 return 0;
10593}
10594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10598$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010599 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010600
Guido van Rossum02a1c402000-02-25 19:26:31 +000010601else
Martin v. Löwis11437992002-04-12 09:54:03 +000010602
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010603 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010605if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010606
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010607 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010608
Guido van Rossumad678af1998-10-02 14:42:15 +000010609else
Guido van Rossumad678af1998-10-02 14:42:15 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10612$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010613if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615else
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010617LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621/* Override any GCC internal prototype to avoid an error.
10622 Use char because int might match the return type of a GCC
10623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010624#ifdef __cplusplus
10625extern "C"
10626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010627char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010628int
10629main ()
10630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ;
10633 return 0;
10634}
10635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010638else
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010641rm -f core conftest.err conftest.$ac_objext \
10642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010643LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10646$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010647if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010649 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010650 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010651
Greg Steinadf63d62000-07-05 10:38:09 +000010652else
Greg Steinadf63d62000-07-05 10:38:09 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10655$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010656if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010658else
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010660LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664/* Override any GCC internal prototype to avoid an error.
10665 Use char because int might match the return type of a GCC
10666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010667#ifdef __cplusplus
10668extern "C"
10669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010670char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010671int
10672main ()
10673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010684rm -f core conftest.err conftest.$ac_objext \
10685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10689$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010690if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010691
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010692 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010693 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010694
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010695else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10698$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010699if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010701else
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010703LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707/* Override any GCC internal prototype to avoid an error.
10708 Use char because int might match the return type of a GCC
10709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010710#ifdef __cplusplus
10711extern "C"
10712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010713char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010714int
10715main ()
10716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010727rm -f core conftest.err conftest.$ac_objext \
10728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010729LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10732$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010733if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010734
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010735 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010736 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010737
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010738else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10741$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010742if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010744else
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750/* Override any GCC internal prototype to avoid an error.
10751 Use char because int might match the return type of a GCC
10752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010753#ifdef __cplusplus
10754extern "C"
10755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010756char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010757int
10758main ()
10759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 ;
10762 return 0;
10763}
10764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010767else
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010770rm -f core conftest.err conftest.$ac_objext \
10771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010772LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10775$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010776if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010777
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010778 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010779 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010780
Guido van Rossumb93a8621998-05-07 13:27:32 +000010781else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010782
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010783 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10784
Guido van Rossum2d38f911996-06-26 19:47:01 +000010785fi
10786
Guido van Rossum627b2d71993-12-24 10:39:16 +000010787
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010788fi
10789
Guido van Rossum0be3e491997-05-22 20:33:33 +000010790fi
10791
Guido van Rossum49545951997-12-02 19:28:29 +000010792fi
10793
Guido van Rossumb93a8621998-05-07 13:27:32 +000010794fi
10795
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010797rm -f core conftest.err conftest.$ac_objext \
10798 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10801$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010802if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010804else
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010806LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010810/* Override any GCC internal prototype to avoid an error.
10811 Use char because int might match the return type of a GCC
10812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010813#ifdef __cplusplus
10814extern "C"
10815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010816char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010817int
10818main ()
10819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010821 ;
10822 return 0;
10823}
10824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010830rm -f core conftest.err conftest.$ac_objext \
10831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010832LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10835$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010836if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010837
Martin v. Löwis130fb172001-07-19 11:00:41 +000010838 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010839
Guido van Rossum627b2d71993-12-24 10:39:16 +000010840fi
10841
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010842
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010843fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010844
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010845if test "$posix_threads" = "yes"; then
10846 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849
10850 fi
10851
10852 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10853 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010854 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010855$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010856
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010857 ;;
10858 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010860
10861 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010862 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010864
10865 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010866 esac
10867
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10869$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010870 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872else
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010874 ac_cv_pthread_system_supported=no
10875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010878
10879 #include <stdio.h>
10880 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010881 void *foo(void *parm) {
10882 return NULL;
10883 }
10884 main() {
10885 pthread_attr_t attr;
10886 pthread_t id;
10887 if (pthread_attr_init(&attr)) exit(-1);
10888 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10889 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10890 exit(0);
10891 }
10892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010893if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894 ac_cv_pthread_system_supported=yes
10895else
Matthias Kloseb9621712010-04-24 17:59:49 +000010896 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010900fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010902
Guido van Rossum627b2d71993-12-24 10:39:16 +000010903fi
10904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10906$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010907 if test "$ac_cv_pthread_system_supported" = "yes"; then
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010910
10911 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 for ac_func in pthread_sigmask
10913do :
10914 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010915if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010916 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010919 case $ac_sys_system in
10920 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010923
10924 ;;
10925 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010926fi
10927done
10928
pdoxe14679c2017-10-05 00:01:56 -070010929 for ac_func in pthread_getcpuclockid
10930do :
10931 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10932if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10933 cat >>confdefs.h <<_ACEOF
10934#define HAVE_PTHREAD_GETCPUCLOCKID 1
10935_ACEOF
10936
10937fi
10938done
10939
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010940fi
10941
10942
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10946$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010948if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10952$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953 ipv6=no
10954 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10956$as_echo "yes" >&6; }
10957 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958
10959 ipv6=yes
10960 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962else
Martin v. Löwis11437992002-04-12 09:54:03 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966 /* AF_INET6 available check */
10967#include <sys/types.h>
10968#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010969int
10970main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010972int domain = AF_INET6;
10973 ;
10974 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010975}
Martin v. Löwis11437992002-04-12 09:54:03 +000010976_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010977if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10980$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010982
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983else
Matthias Kloseb159a552010-04-25 21:00:44 +000010984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010991
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010992if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10994$as_echo_n "checking if RFC2553 API is available... " >&6; }
10995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010996/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010997
10998 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010999#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011000int
11001main ()
11002{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011003struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011004 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ;
11006 return 0;
11007}
Matthias Kloseb159a552010-04-25 21:00:44 +000011008
Martin v. Löwis11437992002-04-12 09:54:03 +000011009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011011
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011013$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011014 ipv6=yes
11015
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011016else
Matthias Kloseb159a552010-04-25 21:00:44 +000011017
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011020 ipv6=no
11021
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011024fi
11025
11026if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011028
11029fi
11030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031fi
11032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033
11034ipv6type=unknown
11035ipv6lib=none
11036ipv6trylibc=no
11037
11038if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11040$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011041 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11042 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011043 case $i in
11044 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048#include <netinet/in.h>
11049#ifdef IPV6_INRIA_VERSION
11050yes
11051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011055 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011057rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058
11059 ;;
11060 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011063
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011064#include <netinet/in.h>
11065#ifdef __KAME__
11066yes
11067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011068_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071 ipv6type=$i;
11072 ipv6lib=inet6
11073 ipv6libdir=/usr/local/v6/lib
11074 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011076rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077
11078 ;;
11079 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011081/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011082
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011083#include <features.h>
11084#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11085yes
11086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011087_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090 ipv6type=$i;
11091 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011093rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094
11095 ;;
11096 linux-inet6)
11097 if test -d /usr/inet6; then
11098 ipv6type=$i
11099 ipv6lib=inet6
11100 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011101 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102 fi
11103 ;;
11104 solaris)
11105 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011106 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107 ipv6type=$i
11108 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 fi
11110 fi
11111 ;;
11112 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116#include <sys/param.h>
11117#ifdef _TOSHIBA_INET6
11118yes
11119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123 ipv6type=$i;
11124 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011125 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011127rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128
11129 ;;
11130 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011132/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134#include </usr/local/v6/include/sys/v6config.h>
11135#ifdef __V6D__
11136yes
11137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141 ipv6type=$i;
11142 ipv6lib=v6;
11143 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011144 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011146rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147
11148 ;;
11149 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011152
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153#include <sys/param.h>
11154#ifdef _ZETA_MINAMI_INET6
11155yes
11156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011157_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160 ipv6type=$i;
11161 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011162 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011164rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165
11166 ;;
11167 esac
11168 if test "$ipv6type" != "unknown"; then
11169 break
11170 fi
11171 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11173$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011174fi
11175
11176if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11177 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11178 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11179 echo "using lib$ipv6lib"
11180 else
11181 if test $ipv6trylibc = "yes"; then
11182 echo "using libc"
11183 else
11184 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11185 echo "You need to fetch lib$ipv6lib.a from appropriate"
11186 echo 'ipv6 kit and compile beforehand.'
11187 exit 1
11188 fi
11189 fi
11190fi
11191
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11193$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11195/* end confdefs.h. */
11196 /* CAN_RAW_FD_FRAMES available check */
11197#include <linux/can/raw.h>
11198int
11199main ()
11200{
11201int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11202 ;
11203 return 0;
11204}
11205_ACEOF
11206if ac_fn_c_try_compile "$LINENO"; then :
11207
11208
11209$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11210
11211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11212$as_echo "yes" >&6; }
11213
11214else
11215
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
11218
11219fi
11220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11221
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011222# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11224$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011227if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228 withval=$with_doc_strings;
11229fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011230
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011231
11232if test -z "$with_doc_strings"
11233then with_doc_strings="yes"
11234fi
11235if test "$with_doc_strings" != "no"
11236then
11237
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011239
11240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11242$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011243
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011244# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11246$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011249if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250 withval=$with_pymalloc;
11251fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011252
Neil Schemenauera35c6882001-02-27 04:45:05 +000011253
Neil Schemenauer16c22972002-03-22 15:34:49 +000011254if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011255then
11256 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011257fi
11258if test "$with_pymalloc" != "no"
11259then
Martin v. Löwis11437992002-04-12 09:54:03 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011262
11263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11265$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011266
Nick Coghlan6ea41862017-06-11 13:16:15 +100011267# Check for --with-c-locale-coercion
11268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11269$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11270
11271# Check whether --with-c-locale-coercion was given.
11272if test "${with_c_locale_coercion+set}" = set; then :
11273 withval=$with_c_locale_coercion;
11274fi
11275
11276
11277if test -z "$with_c_locale_coercion"
11278then
11279 with_c_locale_coercion="yes"
11280fi
11281if test "$with_c_locale_coercion" != "no"
11282then
11283
11284$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11285
11286fi
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11288$as_echo "$with_c_locale_coercion" >&6; }
11289
Benjamin Peterson05159c42009-12-03 03:01:27 +000011290# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11292$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011293
11294# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011296 withval=$with_valgrind;
11297else
11298 with_valgrind=no
11299fi
11300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11302$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011303if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 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 +020011305if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011308
11309else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011310 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011311
11312fi
11313
11314
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011315 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011316fi
11317
Łukasz Langaa785c872016-09-09 17:37:37 -070011318# Check for DTrace support
11319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11320$as_echo_n "checking for --with-dtrace... " >&6; }
11321
11322# Check whether --with-dtrace was given.
11323if test "${with_dtrace+set}" = set; then :
11324 withval=$with_dtrace;
11325else
11326 with_dtrace=no
11327fi
11328
11329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11330$as_echo "$with_dtrace" >&6; }
11331
11332
11333
11334
11335
11336DTRACE=
11337DFLAGS=
11338DTRACE_HEADERS=
11339DTRACE_OBJS=
11340
11341if test "$with_dtrace" = "yes"
11342then
11343 # Extract the first word of "dtrace", so it can be a program name with args.
11344set dummy dtrace; ac_word=$2
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11346$as_echo_n "checking for $ac_word... " >&6; }
11347if ${ac_cv_path_DTRACE+:} false; then :
11348 $as_echo_n "(cached) " >&6
11349else
11350 case $DTRACE in
11351 [\\/]* | ?:[\\/]*)
11352 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11353 ;;
11354 *)
11355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11356for as_dir in $PATH
11357do
11358 IFS=$as_save_IFS
11359 test -z "$as_dir" && as_dir=.
11360 for ac_exec_ext in '' $ac_executable_extensions; do
11361 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11362 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11364 break 2
11365 fi
11366done
11367 done
11368IFS=$as_save_IFS
11369
11370 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11371 ;;
11372esac
11373fi
11374DTRACE=$ac_cv_path_DTRACE
11375if test -n "$DTRACE"; then
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11377$as_echo "$DTRACE" >&6; }
11378else
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
11381fi
11382
11383
11384 if test "$DTRACE" = "not found"; then
11385 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11386 fi
11387
11388$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11389
11390 DTRACE_HEADERS="Include/pydtrace_probes.h"
11391
11392 # On OS X, DTrace providers do not need to be explicitly compiled and
11393 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11394 # generation flag '-G'. We check for presence of this flag, rather than
11395 # hardcoding support by OS, in the interest of robustness.
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11397$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11398if ${ac_cv_dtrace_link+:} false; then :
11399 $as_echo_n "(cached) " >&6
11400else
11401 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011402 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011403 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11404 ac_cv_dtrace_link=yes
11405
11406fi
11407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11408$as_echo "$ac_cv_dtrace_link" >&6; }
11409 if test "$ac_cv_dtrace_link" = "yes"; then
11410 DTRACE_OBJS="Python/pydtrace.o"
11411 fi
11412fi
11413
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011414# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011415
Guido van Rossum98935bf2001-09-05 19:13:16 +000011416DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011417
Guido van Rossume97ee181999-12-20 21:27:22 +000011418# the dlopen() function means we might want to use dynload_shlib.o. some
11419# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011420for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011421do :
11422 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011423if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011426_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011427
Guido van Rossume97ee181999-12-20 21:27:22 +000011428fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011429done
Guido van Rossume97ee181999-12-20 21:27:22 +000011430
Michael W. Hudson54241132001-12-07 15:38:26 +000011431
Guido van Rossume97ee181999-12-20 21:27:22 +000011432# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11433# loading of modules.
11434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11436$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011437if test -z "$DYNLOADFILE"
11438then
11439 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011440 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11441 if test "$ac_cv_func_dlopen" = yes
11442 then DYNLOADFILE="dynload_shlib.o"
11443 else DYNLOADFILE="dynload_aix.o"
11444 fi
11445 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011446 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011447 *)
11448 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11449 # out any dynamic loading
11450 if test "$ac_cv_func_dlopen" = yes
11451 then DYNLOADFILE="dynload_shlib.o"
11452 else DYNLOADFILE="dynload_stub.o"
11453 fi
11454 ;;
11455 esac
11456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11458$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011459if test "$DYNLOADFILE" != "dynload_stub.o"
11460then
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011463
11464fi
11465
Neil Schemenauer4e425612001-06-19 15:44:15 +000011466# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11467
Michael W. Hudson54241132001-12-07 15:38:26 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11470$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011471if test -z "$MACHDEP_OBJS"
11472then
Jack Jansene578a632001-08-15 01:27:14 +000011473 MACHDEP_OBJS=$extra_machdep_objs
11474else
11475 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011476fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011477if test -z "$MACHDEP_OBJS"; then
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11479$as_echo "none" >&6; }
11480else
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11482$as_echo "$MACHDEP_OBJS" >&6; }
11483fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011484
Guido van Rossum627b2d71993-12-24 10:39:16 +000011485# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011486for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Pablo Galindoaac4d032019-05-31 19:39:47 +010011487 clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
11488 faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011489 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011490 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011491 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011492 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011493 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011494 if_nameindex \
Inada Naokibee31ce2019-05-30 16:35:41 +090011495 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011496 memrchr mbrtowc mkdirat mkfifo \
Inada Naokibee31ce2019-05-30 16:35:41 +090011497 madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011498 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011499 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11500 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011501 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011502 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011503 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011504 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11505 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011506 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011507 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011508 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011509 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011510 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011511do :
11512 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11513ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011514if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011518
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011519fi
11520done
11521
Michael W. Hudson54241132001-12-07 15:38:26 +000011522
Benjamin Peterson40caa052018-09-12 15:52:40 -070011523# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11524# links. Some libc implementations have a stub lchmod implementation that always
11525# returns an error.
11526if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011527 for ac_func in lchmod
11528do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011529 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11530if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011531 cat >>confdefs.h <<_ACEOF
11532#define HAVE_LCHMOD 1
11533_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011534
11535fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011536done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011537
11538fi
11539
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011540ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11541 #include <dirent.h>
11542"
11543if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11544
11545$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11546
11547fi
11548
11549
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011550# For some functions, having a definition is not sufficient, since
11551# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11553$as_echo_n "checking for chroot... " >&6; }
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011556#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557int
11558main ()
11559{
11560void *x=chroot
11561 ;
11562 return 0;
11563}
11564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
Matthias Kloseb159a552010-04-25 21:00:44 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011574
11575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11578$as_echo_n "checking for link... " >&6; }
11579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011580/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011581#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582int
11583main ()
11584{
11585void *x=link
11586 ;
11587 return 0;
11588}
11589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
Matthias Kloseb159a552010-04-25 21:00:44 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596else
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11598$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011599
11600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11603$as_echo_n "checking for symlink... " >&6; }
11604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011606#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607int
11608main ()
11609{
11610void *x=symlink
11611 ;
11612 return 0;
11613}
11614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011618
Matthias Kloseb159a552010-04-25 21:00:44 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011621else
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11623$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011624
11625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11628$as_echo_n "checking for fchdir... " >&6; }
11629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011631#include <unistd.h>
11632int
11633main ()
11634{
11635void *x=fchdir
11636 ;
11637 return 0;
11638}
11639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
Matthias Kloseb159a552010-04-25 21:00:44 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011646else
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011649
11650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11653$as_echo_n "checking for fsync... " >&6; }
11654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011656#include <unistd.h>
11657int
11658main ()
11659{
11660void *x=fsync
11661 ;
11662 return 0;
11663}
11664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011666
Matthias Kloseb9621712010-04-24 17:59:49 +000011667$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
Matthias Kloseb159a552010-04-25 21:00:44 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011674
11675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11678$as_echo_n "checking for fdatasync... " >&6; }
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011680/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011681#include <unistd.h>
11682int
11683main ()
11684{
11685void *x=fdatasync
11686 ;
11687 return 0;
11688}
11689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011691
Matthias Kloseb9621712010-04-24 17:59:49 +000011692$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011693
Matthias Kloseb159a552010-04-25 21:00:44 +000011694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11698$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011699
11700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11703$as_echo_n "checking for epoll... " >&6; }
11704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011705/* end confdefs.h. */
11706#include <sys/epoll.h>
11707int
11708main ()
11709{
11710void *x=epoll_create
11711 ;
11712 return 0;
11713}
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011718
Matthias Kloseb159a552010-04-25 21:00:44 +000011719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011724
11725fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11728$as_echo_n "checking for epoll_create1... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11730/* end confdefs.h. */
11731#include <sys/epoll.h>
11732int
11733main ()
11734{
11735void *x=epoll_create1
11736 ;
11737 return 0;
11738}
11739_ACEOF
11740if ac_fn_c_try_compile "$LINENO"; then :
11741
11742$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11743
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11745$as_echo "yes" >&6; }
11746else
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748$as_echo "no" >&6; }
11749
11750fi
11751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11753$as_echo_n "checking for kqueue... " >&6; }
11754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011755/* end confdefs.h. */
11756
11757#include <sys/types.h>
11758#include <sys/event.h>
11759
11760int
11761main ()
11762{
11763int x=kqueue()
11764 ;
11765 return 0;
11766}
11767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011768if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011771
Matthias Kloseb159a552010-04-25 21:00:44 +000011772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011774else
Matthias Kloseb9621712010-04-24 17:59:49 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11776$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011777
11778fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11781$as_echo_n "checking for prlimit... " >&6; }
11782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11783/* end confdefs.h. */
11784
11785#include <sys/time.h>
11786#include <sys/resource.h>
11787
11788int
11789main ()
11790{
11791void *x=prlimit
11792 ;
11793 return 0;
11794}
11795_ACEOF
11796if ac_fn_c_try_compile "$LINENO"; then :
11797
11798$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11799
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11801$as_echo "yes" >&6; }
11802else
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
11805
11806fi
11807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11808
Zackery Spytz43fdbd22019-05-29 13:57:07 -060011809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5
11810$as_echo_n "checking for memfd_create... " >&6; }
11811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11812/* end confdefs.h. */
11813
11814#ifdef HAVE_SYS_MMAN_H
11815#include <sys/mman.h>
11816#endif
11817#ifdef HAVE_SYS_MEMFD_H
11818#include <sys/memfd.h>
11819#endif
11820
11821int
11822main ()
11823{
11824void *x=memfd_create
11825 ;
11826 return 0;
11827}
11828_ACEOF
11829if ac_fn_c_try_compile "$LINENO"; then :
11830
11831$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h
11832
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11834$as_echo "yes" >&6; }
11835else
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11837$as_echo "no" >&6; }
11838
11839fi
11840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11841
Martin v. Löwisd5843682002-11-21 20:41:28 +000011842# On some systems (eg. FreeBSD 5), we would find a definition of the
11843# functions ctermid_r, setgroups in the library, but no prototype
11844# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11845# address to avoid compiler warnings and potential miscompilations
11846# because of the missing prototypes.
11847
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11849$as_echo_n "checking for ctermid_r... " >&6; }
11850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011851/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011852
Martin v. Löwisd5843682002-11-21 20:41:28 +000011853#include <stdio.h>
11854
Martin v. Löwisd5843682002-11-21 20:41:28 +000011855int
11856main ()
11857{
11858void* p = ctermid_r
11859 ;
11860 return 0;
11861}
11862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011866
Matthias Kloseb159a552010-04-25 21:00:44 +000011867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011868$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011872
11873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11875
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11877$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011878if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011879 $as_echo_n "(cached) " >&6
11880else
11881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011882/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011883#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011884int
11885main ()
11886{
11887void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011888
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011889 ;
11890 return 0;
11891}
11892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011894 ac_cv_flock_decl=yes
11895else
11896 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011897
11898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011900
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011901fi
11902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11903$as_echo "$ac_cv_flock_decl" >&6; }
11904if test "x${ac_cv_flock_decl}" = xyes; then
11905 for ac_func in flock
11906do :
11907 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011909 cat >>confdefs.h <<_ACEOF
11910#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011911_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011912
Antoine Pitroua3000072010-09-07 14:52:42 +000011913else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011915$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011916if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011917 $as_echo_n "(cached) " >&6
11918else
11919 ac_check_lib_save_LIBS=$LIBS
11920LIBS="-lbsd $LIBS"
11921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922/* end confdefs.h. */
11923
11924/* Override any GCC internal prototype to avoid an error.
11925 Use char because int might match the return type of a GCC
11926 builtin and then its argument prototype would still apply. */
11927#ifdef __cplusplus
11928extern "C"
11929#endif
11930char flock ();
11931int
11932main ()
11933{
11934return flock ();
11935 ;
11936 return 0;
11937}
11938_ACEOF
11939if ac_fn_c_try_link "$LINENO"; then :
11940 ac_cv_lib_bsd_flock=yes
11941else
11942 ac_cv_lib_bsd_flock=no
11943fi
11944rm -f core conftest.err conftest.$ac_objext \
11945 conftest$ac_exeext conftest.$ac_ext
11946LIBS=$ac_check_lib_save_LIBS
11947fi
11948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11949$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011950if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011951 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011952
11953
11954$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11955
11956
11957fi
11958
11959
11960fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011961done
11962
Antoine Pitroua3000072010-09-07 14:52:42 +000011963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11966$as_echo_n "checking for getpagesize... " >&6; }
11967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011968/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011969
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011970#include <unistd.h>
11971
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011972int
11973main ()
11974{
11975void* p = getpagesize
11976 ;
11977 return 0;
11978}
11979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011980if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011983
Matthias Kloseb159a552010-04-25 21:00:44 +000011984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011989
11990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011992
Victor Stinner984890f2011-11-24 13:53:38 +010011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11994$as_echo_n "checking for broken unsetenv... " >&6; }
11995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11996/* end confdefs.h. */
11997
11998#include <stdlib.h>
11999
12000int
12001main ()
12002{
12003int res = unsetenv("DUMMY")
12004 ;
12005 return 0;
12006}
12007_ACEOF
12008if ac_fn_c_try_compile "$LINENO"; then :
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12010$as_echo "no" >&6; }
12011else
12012
12013$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
12014
12015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12016$as_echo "yes" >&6; }
12017
12018fi
12019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12020
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012021for ac_prog in true
12022do
12023 # Extract the first word of "$ac_prog", so it can be a program name with args.
12024set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012027if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012029else
12030 if test -n "$TRUE"; then
12031 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12032else
12033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036 IFS=$as_save_IFS
12037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012040 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 $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 +000012042 break 2
12043 fi
12044done
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012047
12048fi
12049fi
12050TRUE=$ac_cv_prog_TRUE
12051if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12053$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12056$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012057fi
12058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012060 test -n "$TRUE" && break
12061done
12062test -n "$TRUE" || TRUE="/bin/true"
12063
12064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12066$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012067if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069else
12070 ac_check_lib_save_LIBS=$LIBS
12071LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012073/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075/* Override any GCC internal prototype to avoid an error.
12076 Use char because int might match the return type of a GCC
12077 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078#ifdef __cplusplus
12079extern "C"
12080#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012082int
12083main ()
12084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012091 ac_cv_lib_c_inet_aton=yes
12092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095rm -f core conftest.err conftest.$ac_objext \
12096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012097LIBS=$ac_check_lib_save_LIBS
12098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12100$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012102 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12105$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012106if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108else
12109 ac_check_lib_save_LIBS=$LIBS
12110LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012112/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114/* Override any GCC internal prototype to avoid an error.
12115 Use char because int might match the return type of a GCC
12116 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012117#ifdef __cplusplus
12118extern "C"
12119#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012120char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012121int
12122main ()
12123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012130 ac_cv_lib_resolv_inet_aton=yes
12131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012134rm -f core conftest.err conftest.$ac_objext \
12135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012136LIBS=$ac_check_lib_save_LIBS
12137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12139$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012141 cat >>confdefs.h <<_ACEOF
12142#define HAVE_LIBRESOLV 1
12143_ACEOF
12144
12145 LIBS="-lresolv $LIBS"
12146
12147fi
12148
12149
12150fi
12151
12152
Christian Heimesd0764e22007-12-04 15:00:33 +000012153# On Tru64, chflags seems to be present, but calling it will
12154# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12156$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012159else
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012161 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012164/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012165
Christian Heimesd0764e22007-12-04 15:00:33 +000012166#include <sys/stat.h>
12167#include <unistd.h>
12168int main(int argc, char*argv[])
12169{
12170 if(chflags(argv[0], 0) != 0)
12171 return 1;
12172 return 0;
12173}
Ned Deily3eb67d52011-06-28 00:00:28 -070012174
Christian Heimesd0764e22007-12-04 15:00:33 +000012175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012176if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012177 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12182 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012183fi
12184
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12188$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012189if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012192 ac_cv_have_chflags="yes"
12193else
12194 ac_cv_have_chflags="no"
12195fi
12196
12197fi
12198if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012199
Matthias Kloseb9621712010-04-24 17:59:49 +000012200$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012201
12202fi
12203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12205$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012206if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012208else
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012210 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012213/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012214
Christian Heimesd0764e22007-12-04 15:00:33 +000012215#include <sys/stat.h>
12216#include <unistd.h>
12217int main(int argc, char*argv[])
12218{
12219 if(lchflags(argv[0], 0) != 0)
12220 return 1;
12221 return 0;
12222}
Ned Deily3eb67d52011-06-28 00:00:28 -070012223
Christian Heimesd0764e22007-12-04 15:00:33 +000012224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012225if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012226 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012227else
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012232fi
12233
12234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12237$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012238if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012241 ac_cv_have_lchflags="yes"
12242else
12243 ac_cv_have_lchflags="no"
12244fi
12245
12246fi
12247if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012248
Matthias Kloseb9621712010-04-24 17:59:49 +000012249$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012250
12251fi
12252
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012253case $ac_sys_system/$ac_sys_release in
12254Darwin/*)
12255 _CUR_CFLAGS="${CFLAGS}"
12256 _CUR_LDFLAGS="${LDFLAGS}"
12257 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12258 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12259 ;;
12260esac
12261
Matthias Kloseb9621712010-04-24 17:59:49 +000012262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12263$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012264if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012266else
12267 ac_check_lib_save_LIBS=$LIBS
12268LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012270/* end confdefs.h. */
12271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272/* Override any GCC internal prototype to avoid an error.
12273 Use char because int might match the return type of a GCC
12274 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012275#ifdef __cplusplus
12276extern "C"
12277#endif
12278char inflateCopy ();
12279int
12280main ()
12281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012282return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012283 ;
12284 return 0;
12285}
12286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012288 ac_cv_lib_z_inflateCopy=yes
12289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012292rm -f core conftest.err conftest.$ac_objext \
12293 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012294LIBS=$ac_check_lib_save_LIBS
12295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12297$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012298if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012299
Matthias Kloseb9621712010-04-24 17:59:49 +000012300$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012301
12302fi
12303
12304
12305case $ac_sys_system/$ac_sys_release in
12306Darwin/*)
12307 CFLAGS="${_CUR_CFLAGS}"
12308 LDFLAGS="${_CUR_LDFLAGS}"
12309 ;;
12310esac
12311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12313$as_echo_n "checking for hstrerror... " >&6; }
12314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012316
Martin v. Löwise9416172003-05-03 10:12:45 +000012317#include <netdb.h>
12318
Martin v. Löwise9416172003-05-03 10:12:45 +000012319int
12320main ()
12321{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012322void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012323 ;
12324 return 0;
12325}
12326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Matthias Kloseb159a552010-04-25 21:00:44 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012332$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012336
12337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012338rm -f core conftest.err conftest.$ac_objext \
12339 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12342$as_echo_n "checking for inet_aton... " >&6; }
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012345
Martin v. Löwis86d66262006-02-17 08:40:11 +000012346#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012347#include <sys/socket.h>
12348#include <netinet/in.h>
12349#include <arpa/inet.h>
12350
Martin v. Löwise9416172003-05-03 10:12:45 +000012351int
12352main ()
12353{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012354void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012362
Matthias Kloseb159a552010-04-25 21:00:44 +000012363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012364$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12367$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012368
12369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012370rm -f core conftest.err conftest.$ac_objext \
12371 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12374$as_echo_n "checking for inet_pton... " >&6; }
12375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012377
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012378#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012379#include <sys/socket.h>
12380#include <netinet/in.h>
12381#include <arpa/inet.h>
12382
Martin v. Löwise9416172003-05-03 10:12:45 +000012383int
12384main ()
12385{
12386void* p = inet_pton
12387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012394
Matthias Kloseb159a552010-04-25 21:00:44 +000012395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012400
12401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012403
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012404# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12406$as_echo_n "checking for setgroups... " >&6; }
12407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012408/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012409
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012410#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012411#ifdef HAVE_GRP_H
12412#include <grp.h>
12413#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012414
Martin v. Löwisd5843682002-11-21 20:41:28 +000012415int
12416main ()
12417{
12418void* p = setgroups
12419 ;
12420 return 0;
12421}
12422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012426
Matthias Kloseb159a552010-04-25 21:00:44 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012428$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012429else
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12431$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012432
12433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012435
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012436# check for openpty and forkpty
12437
12438for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012439do :
12440 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012441if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012444_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012446else
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12448$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012449if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012451else
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457/* Override any GCC internal prototype to avoid an error.
12458 Use char because int might match the return type of a GCC
12459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012460#ifdef __cplusplus
12461extern "C"
12462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012463char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
12466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ;
12469 return 0;
12470}
12471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012474else
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012477rm -f core conftest.err conftest.$ac_objext \
12478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012479LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12482$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012483if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012485 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012486else
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12488$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012489if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012491else
12492 ac_check_lib_save_LIBS=$LIBS
12493LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012495/* end confdefs.h. */
12496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497/* Override any GCC internal prototype to avoid an error.
12498 Use char because int might match the return type of a GCC
12499 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012500#ifdef __cplusplus
12501extern "C"
12502#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012503char openpty ();
12504int
12505main ()
12506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012508 ;
12509 return 0;
12510}
12511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012512if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012513 ac_cv_lib_bsd_openpty=yes
12514else
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012517rm -f core conftest.err conftest.$ac_objext \
12518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012519LIBS=$ac_check_lib_save_LIBS
12520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12522$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012523if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012525 LIBS="$LIBS -lbsd"
12526fi
12527
12528
12529fi
12530
Fred Drake8cef4cf2000-06-28 16:40:38 +000012531
12532fi
12533done
12534
12535for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012536do :
12537 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012541_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012542
Fred Drake8cef4cf2000-06-28 16:40:38 +000012543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12545$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012546if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012548else
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012550LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554/* Override any GCC internal prototype to avoid an error.
12555 Use char because int might match the return type of a GCC
12556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012557#ifdef __cplusplus
12558extern "C"
12559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012560char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012561int
12562main ()
12563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 ;
12566 return 0;
12567}
12568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012574rm -f core conftest.err conftest.$ac_objext \
12575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012576LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12579$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012580if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012582 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12585$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012586if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012588else
12589 ac_check_lib_save_LIBS=$LIBS
12590LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012592/* end confdefs.h. */
12593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594/* Override any GCC internal prototype to avoid an error.
12595 Use char because int might match the return type of a GCC
12596 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012597#ifdef __cplusplus
12598extern "C"
12599#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012600char forkpty ();
12601int
12602main ()
12603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012604return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012605 ;
12606 return 0;
12607}
12608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012610 ac_cv_lib_bsd_forkpty=yes
12611else
Matthias Kloseb9621712010-04-24 17:59:49 +000012612 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012614rm -f core conftest.err conftest.$ac_objext \
12615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012616LIBS=$ac_check_lib_save_LIBS
12617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12619$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012620if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012622 LIBS="$LIBS -lbsd"
12623fi
12624
12625
12626fi
12627
Fred Drake8cef4cf2000-06-28 16:40:38 +000012628
12629fi
12630done
12631
Jack Jansendd19cf82001-12-06 22:36:17 +000012632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012634for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012635do :
12636 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12637ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012638if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012640#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012641_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012642
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012644done
12645
Michael W. Hudson54241132001-12-07 15:38:26 +000012646
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012647ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012648if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012649 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012650
Martin v. Löwis1142de32002-03-29 16:28:31 +000012651else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012653 *" dup2.$ac_objext "* ) ;;
12654 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012656esac
12657
Martin v. Löwis1142de32002-03-29 16:28:31 +000012658fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012659
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012660ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012661if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012662 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12663
12664else
12665 case " $LIBOBJS " in
12666 *" strdup.$ac_objext "* ) ;;
12667 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12668 ;;
12669esac
12670
12671fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012672
12673
12674for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012675do :
12676 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012677if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012684int
12685main ()
12686{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012695
Guido van Rossum627b2d71993-12-24 10:39:16 +000012696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012698
Guido van Rossum627b2d71993-12-24 10:39:16 +000012699fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012700done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012701
Jack Jansen150753c2003-03-29 22:07:47 +000012702for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012703do :
12704 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012705if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012706 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012711#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012712int
12713main ()
12714{
12715setpgrp(0,0);
12716 ;
12717 return 0;
12718}
12719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012723
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012726
12727fi
12728done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012729
Thomas Wouters3a584202000-08-05 23:28:51 +000012730for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012731do :
12732 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012733if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012735#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012739#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012743gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ;
12745 return 0;
12746}
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_compile "$LINENO"; then :
12749
Guido van Rossum627b2d71993-12-24 10:39:16 +000012750else
Skip Montanaro6dead952003-09-25 14:50:04 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012753
Martin v. Löwis11437992002-04-12 09:54:03 +000012754
Guido van Rossum627b2d71993-12-24 10:39:16 +000012755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012759done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760
Michael W. Hudson54241132001-12-07 15:38:26 +000012761
Gregory P. Smith387512c2018-12-30 15:42:32 -080012762# We search for both crypt and crypt_r as one or the other may be defined
12763# This gets us our -lcrypt in LIBS when required on the target platform.
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12765$as_echo_n "checking for library containing crypt... " >&6; }
12766if ${ac_cv_search_crypt+:} false; then :
12767 $as_echo_n "(cached) " >&6
12768else
12769 ac_func_search_save_LIBS=$LIBS
12770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12771/* end confdefs.h. */
12772
12773/* Override any GCC internal prototype to avoid an error.
12774 Use char because int might match the return type of a GCC
12775 builtin and then its argument prototype would still apply. */
12776#ifdef __cplusplus
12777extern "C"
12778#endif
12779char crypt ();
12780int
12781main ()
12782{
12783return crypt ();
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788for ac_lib in '' crypt; do
12789 if test -z "$ac_lib"; then
12790 ac_res="none required"
12791 else
12792 ac_res=-l$ac_lib
12793 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12794 fi
12795 if ac_fn_c_try_link "$LINENO"; then :
12796 ac_cv_search_crypt=$ac_res
12797fi
12798rm -f core conftest.err conftest.$ac_objext \
12799 conftest$ac_exeext
12800 if ${ac_cv_search_crypt+:} false; then :
12801 break
12802fi
12803done
12804if ${ac_cv_search_crypt+:} false; then :
12805
12806else
12807 ac_cv_search_crypt=no
12808fi
12809rm conftest.$ac_ext
12810LIBS=$ac_func_search_save_LIBS
12811fi
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12813$as_echo "$ac_cv_search_crypt" >&6; }
12814ac_res=$ac_cv_search_crypt
12815if test "$ac_res" != no; then :
12816 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12817
12818fi
12819
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12821$as_echo_n "checking for library containing crypt_r... " >&6; }
12822if ${ac_cv_search_crypt_r+:} false; then :
12823 $as_echo_n "(cached) " >&6
12824else
12825 ac_func_search_save_LIBS=$LIBS
12826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827/* end confdefs.h. */
12828
12829/* Override any GCC internal prototype to avoid an error.
12830 Use char because int might match the return type of a GCC
12831 builtin and then its argument prototype would still apply. */
12832#ifdef __cplusplus
12833extern "C"
12834#endif
12835char crypt_r ();
12836int
12837main ()
12838{
12839return crypt_r ();
12840 ;
12841 return 0;
12842}
12843_ACEOF
12844for ac_lib in '' crypt; do
12845 if test -z "$ac_lib"; then
12846 ac_res="none required"
12847 else
12848 ac_res=-l$ac_lib
12849 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12850 fi
12851 if ac_fn_c_try_link "$LINENO"; then :
12852 ac_cv_search_crypt_r=$ac_res
12853fi
12854rm -f core conftest.err conftest.$ac_objext \
12855 conftest$ac_exeext
12856 if ${ac_cv_search_crypt_r+:} false; then :
12857 break
12858fi
12859done
12860if ${ac_cv_search_crypt_r+:} false; then :
12861
12862else
12863 ac_cv_search_crypt_r=no
12864fi
12865rm conftest.$ac_ext
12866LIBS=$ac_func_search_save_LIBS
12867fi
12868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12869$as_echo "$ac_cv_search_crypt_r" >&6; }
12870ac_res=$ac_cv_search_crypt_r
12871if test "$ac_res" != no; then :
12872 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12873
12874fi
12875
12876
12877ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12878if test "x$ac_cv_func_crypt_r" = xyes; then :
12879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880/* end confdefs.h. */
12881
12882#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12883#include <crypt.h>
12884
12885int
12886main ()
12887{
12888
12889struct crypt_data d;
12890char *r = crypt_r("", "", &d);
12891
12892 ;
12893 return 0;
12894}
12895_ACEOF
12896if ac_fn_c_try_compile "$LINENO"; then :
12897
12898$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12899
12900fi
12901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12902
12903fi
12904
12905
Victor Stinnere0be4232011-10-25 13:06:09 +020012906for ac_func in clock_gettime
12907do :
12908 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12909if test "x$ac_cv_func_clock_gettime" = xyes; then :
12910 cat >>confdefs.h <<_ACEOF
12911#define HAVE_CLOCK_GETTIME 1
12912_ACEOF
12913
12914else
12915
12916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12917$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12918if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12919 $as_echo_n "(cached) " >&6
12920else
12921 ac_check_lib_save_LIBS=$LIBS
12922LIBS="-lrt $LIBS"
12923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12924/* end confdefs.h. */
12925
12926/* Override any GCC internal prototype to avoid an error.
12927 Use char because int might match the return type of a GCC
12928 builtin and then its argument prototype would still apply. */
12929#ifdef __cplusplus
12930extern "C"
12931#endif
12932char clock_gettime ();
12933int
12934main ()
12935{
12936return clock_gettime ();
12937 ;
12938 return 0;
12939}
12940_ACEOF
12941if ac_fn_c_try_link "$LINENO"; then :
12942 ac_cv_lib_rt_clock_gettime=yes
12943else
12944 ac_cv_lib_rt_clock_gettime=no
12945fi
12946rm -f core conftest.err conftest.$ac_objext \
12947 conftest$ac_exeext conftest.$ac_ext
12948LIBS=$ac_check_lib_save_LIBS
12949fi
12950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12951$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12952if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12953
Victor Stinner7efb8332014-08-29 15:41:08 +020012954 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012955 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12956
12957
12958$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12959
12960
12961fi
12962
12963
12964fi
12965done
12966
12967
12968for ac_func in clock_getres
12969do :
12970 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12971if test "x$ac_cv_func_clock_getres" = xyes; then :
12972 cat >>confdefs.h <<_ACEOF
12973#define HAVE_CLOCK_GETRES 1
12974_ACEOF
12975
12976else
12977
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12979$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12980if ${ac_cv_lib_rt_clock_getres+:} false; then :
12981 $as_echo_n "(cached) " >&6
12982else
12983 ac_check_lib_save_LIBS=$LIBS
12984LIBS="-lrt $LIBS"
12985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12986/* end confdefs.h. */
12987
12988/* Override any GCC internal prototype to avoid an error.
12989 Use char because int might match the return type of a GCC
12990 builtin and then its argument prototype would still apply. */
12991#ifdef __cplusplus
12992extern "C"
12993#endif
12994char clock_getres ();
12995int
12996main ()
12997{
12998return clock_getres ();
12999 ;
13000 return 0;
13001}
13002_ACEOF
13003if ac_fn_c_try_link "$LINENO"; then :
13004 ac_cv_lib_rt_clock_getres=yes
13005else
13006 ac_cv_lib_rt_clock_getres=no
13007fi
13008rm -f core conftest.err conftest.$ac_objext \
13009 conftest$ac_exeext conftest.$ac_ext
13010LIBS=$ac_check_lib_save_LIBS
13011fi
13012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
13013$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
13014if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
13015
13016 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
13017
13018
13019fi
13020
13021
13022fi
13023done
13024
13025
Benjamin Peterson37098cd2016-09-13 22:55:09 -070013026for ac_func in clock_settime
13027do :
13028 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
13029if test "x$ac_cv_func_clock_settime" = xyes; then :
13030 cat >>confdefs.h <<_ACEOF
13031#define HAVE_CLOCK_SETTIME 1
13032_ACEOF
13033
13034else
13035
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13037$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13038if ${ac_cv_lib_rt_clock_settime+:} false; then :
13039 $as_echo_n "(cached) " >&6
13040else
13041 ac_check_lib_save_LIBS=$LIBS
13042LIBS="-lrt $LIBS"
13043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044/* end confdefs.h. */
13045
13046/* Override any GCC internal prototype to avoid an error.
13047 Use char because int might match the return type of a GCC
13048 builtin and then its argument prototype would still apply. */
13049#ifdef __cplusplus
13050extern "C"
13051#endif
13052char clock_settime ();
13053int
13054main ()
13055{
13056return clock_settime ();
13057 ;
13058 return 0;
13059}
13060_ACEOF
13061if ac_fn_c_try_link "$LINENO"; then :
13062 ac_cv_lib_rt_clock_settime=yes
13063else
13064 ac_cv_lib_rt_clock_settime=no
13065fi
13066rm -f core conftest.err conftest.$ac_objext \
13067 conftest$ac_exeext conftest.$ac_ext
13068LIBS=$ac_check_lib_save_LIBS
13069fi
13070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13071$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13072if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13073
13074 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13075
13076
13077fi
13078
13079
13080fi
13081done
13082
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13085$as_echo_n "checking for major... " >&6; }
13086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013088
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013089#if defined(MAJOR_IN_MKDEV)
13090#include <sys/mkdev.h>
13091#elif defined(MAJOR_IN_SYSMACROS)
13092#include <sys/sysmacros.h>
13093#else
13094#include <sys/types.h>
13095#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013097int
13098main ()
13099{
13100
13101 makedev(major(0),minor(0));
13102
13103 ;
13104 return 0;
13105}
13106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013108
13109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13113$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013114
13115else
Skip Montanaro6dead952003-09-25 14:50:04 +000013116
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13118$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013119
13120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013121rm -f core conftest.err conftest.$ac_objext \
13122 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013123
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013124# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013125# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13127$as_echo_n "checking for getaddrinfo... " >&6; }
13128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013129/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013130
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013131#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013132#include <sys/socket.h>
13133#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013134#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136int
13137main ()
13138{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013139getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 ;
13141 return 0;
13142}
13143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145 have_getaddrinfo=yes
13146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013149rm -f core conftest.err conftest.$ac_objext \
13150 conftest$ac_exeext conftest.$ac_ext
13151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13152$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153if test $have_getaddrinfo = yes
13154then
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13156$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013157 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013158 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013159else
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013161
13162if test "${enable_ipv6+set}" = set; then
13163 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13164else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013165 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013166fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013169/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170
Stefan Krah19c21392012-11-22 23:47:32 +010013171#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172#include <sys/types.h>
13173#include <netdb.h>
13174#include <string.h>
13175#include <sys/socket.h>
13176#include <netinet/in.h>
13177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013179{
13180 int passive, gaierr, inet4 = 0, inet6 = 0;
13181 struct addrinfo hints, *ai, *aitop;
13182 char straddr[INET6_ADDRSTRLEN], strport[16];
13183
13184 for (passive = 0; passive <= 1; passive++) {
13185 memset(&hints, 0, sizeof(hints));
13186 hints.ai_family = AF_UNSPEC;
13187 hints.ai_flags = passive ? AI_PASSIVE : 0;
13188 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013189 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013190 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13191 (void)gai_strerror(gaierr);
13192 goto bad;
13193 }
13194 for (ai = aitop; ai; ai = ai->ai_next) {
13195 if (ai->ai_addr == NULL ||
13196 ai->ai_addrlen == 0 ||
13197 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13198 straddr, sizeof(straddr), strport, sizeof(strport),
13199 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13200 goto bad;
13201 }
13202 switch (ai->ai_family) {
13203 case AF_INET:
13204 if (strcmp(strport, "54321") != 0) {
13205 goto bad;
13206 }
13207 if (passive) {
13208 if (strcmp(straddr, "0.0.0.0") != 0) {
13209 goto bad;
13210 }
13211 } else {
13212 if (strcmp(straddr, "127.0.0.1") != 0) {
13213 goto bad;
13214 }
13215 }
13216 inet4++;
13217 break;
13218 case AF_INET6:
13219 if (strcmp(strport, "54321") != 0) {
13220 goto bad;
13221 }
13222 if (passive) {
13223 if (strcmp(straddr, "::") != 0) {
13224 goto bad;
13225 }
13226 } else {
13227 if (strcmp(straddr, "::1") != 0) {
13228 goto bad;
13229 }
13230 }
13231 inet6++;
13232 break;
13233 case AF_UNSPEC:
13234 goto bad;
13235 break;
13236 default:
13237 /* another family support? */
13238 break;
13239 }
13240 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013241 freeaddrinfo(aitop);
13242 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243 }
13244
13245 if (!(inet4 == 0 || inet4 == 2))
13246 goto bad;
13247 if (!(inet6 == 0 || inet6 == 2))
13248 goto bad;
13249
13250 if (aitop)
13251 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253
13254 bad:
13255 if (aitop)
13256 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013257 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258}
13259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013261if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013262 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013271
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13275$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13276
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013277if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278then
13279 if test $ipv6 = yes
13280 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281 echo 'Fatal: You must get working getaddrinfo() function.'
13282 echo ' or you can specify "--disable-ipv6"'.
13283 exit 1
13284 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013285else
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013288
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013290
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013291for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013292do :
13293 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013294if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013296#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013297_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013299fi
13300done
13301
Michael W. Hudson54241132001-12-07 15:38:26 +000013302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13305$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013306if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311#include <sys/types.h>
13312#include <sys/time.h>
13313#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Martin v. Löwis11437992002-04-12 09:54:03 +000013315int
13316main ()
13317{
13318if ((struct tm *) 0)
13319return 0;
13320 ;
13321 return 0;
13322}
13323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013324if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13332$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013333if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336
13337fi
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13340$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013341if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346#include <sys/types.h>
13347#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349int
13350main ()
13351{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352struct tm tm;
13353 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 ;
13356 return 0;
13357}
13358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013359if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360 ac_cv_struct_tm=time.h
13361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13367$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013368if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Matthias Kloseb9621712010-04-24 17:59:49 +000013370$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371
13372fi
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374ac_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 +000013375#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377"
Victor Stinnere0be4232011-10-25 13:06:09 +020013378if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
13380cat >>confdefs.h <<_ACEOF
13381#define HAVE_STRUCT_TM_TM_ZONE 1
13382_ACEOF
13383
13384
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013385fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390
13391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13393"
Victor Stinnere0be4232011-10-25 13:06:09 +020013394if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398fi
13399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013401#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402_ACEOF
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13405$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013406if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013410/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412#if !HAVE_DECL_TZNAME
13413extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416int
13417main ()
13418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013424if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013425 ac_cv_var_tzname=yes
13426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013429rm -f core conftest.err conftest.$ac_objext \
13430 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13433$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013434 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013438 fi
13439fi
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441ac_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 +020013442if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
13444cat >>confdefs.h <<_ACEOF
13445#define HAVE_STRUCT_STAT_ST_RDEV 1
13446_ACEOF
13447
13448
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451ac_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 +020013452if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454cat >>confdefs.h <<_ACEOF
13455#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13456_ACEOF
13457
13458
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461ac_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 +020013462if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013463
13464cat >>confdefs.h <<_ACEOF
13465#define HAVE_STRUCT_STAT_ST_FLAGS 1
13466_ACEOF
13467
13468
13469fi
13470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471ac_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 +020013472if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013473
13474cat >>confdefs.h <<_ACEOF
13475#define HAVE_STRUCT_STAT_ST_GEN 1
13476_ACEOF
13477
13478
13479fi
13480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481ac_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 +020013482if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013483
13484cat >>confdefs.h <<_ACEOF
13485#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13486_ACEOF
13487
13488
13489fi
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491ac_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 +020013492if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013493
Martin v. Löwis11437992002-04-12 09:54:03 +000013494cat >>confdefs.h <<_ACEOF
13495#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13496_ACEOF
13497
13498
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013499fi
13500
Stefan Krah267b6392016-04-26 01:09:18 +020013501ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13502 #include <sys/types.h>
13503 #include <pwd.h>
13504
13505"
13506if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13507
13508cat >>confdefs.h <<_ACEOF
13509#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13510_ACEOF
13511
13512
13513fi
13514ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13515 #include <sys/types.h>
13516 #include <pwd.h>
13517
13518"
13519if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13520
13521cat >>confdefs.h <<_ACEOF
13522#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13523_ACEOF
13524
13525
13526fi
13527
Zachary Ware6a6967e2016-10-01 00:47:27 -050013528# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13529ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13530"
13531if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13532
13533cat >>confdefs.h <<_ACEOF
13534#define HAVE_SIGINFO_T_SI_BAND 1
13535_ACEOF
13536
13537
13538fi
13539
Michael W. Hudson54241132001-12-07 15:38:26 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13542$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013543if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545else
Matthias Kloseb159a552010-04-25 21:00:44 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013548/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013549#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013550int
13551main ()
13552{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ;
13555 return 0;
13556}
13557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559 ac_cv_header_time_altzone=yes
13560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565fi
13566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13568$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572
13573fi
13574
Guido van Rossumda88dad1995-01-26 00:46:29 +000013575was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13577$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013580
13581#include <sys/types.h>
13582#include <sys/select.h>
13583#include <sys/time.h>
13584
Martin v. Löwis11437992002-04-12 09:54:03 +000013585int
13586main ()
13587{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588;
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 ;
13590 return 0;
13591}
13592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
13595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013598 was_it_defined=yes
13599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13603$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13606$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013612#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013613int
13614main ()
13615{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 ;
13618 return 0;
13619}
13620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013622 ac_cv_struct_addrinfo=yes
13623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13627fi
13628
Matthias Kloseb9621712010-04-24 17:59:49 +000013629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13630$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013631if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634
13635fi
13636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13638$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013644
13645# include <sys/types.h>
13646# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013647int
13648main ()
13649{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013656 ac_cv_struct_sockaddr_storage=yes
13657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13661fi
13662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13664$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013665if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013668
13669fi
13670
Christian Heimesdffa3942016-09-05 23:54:41 +020013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13672$as_echo_n "checking for sockaddr_alg... " >&6; }
13673if ${ac_cv_struct_sockaddr_alg+:} false; then :
13674 $as_echo_n "(cached) " >&6
13675else
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13677/* end confdefs.h. */
13678
13679# include <sys/types.h>
13680# include <sys/socket.h>
13681# include <linux/if_alg.h>
13682int
13683main ()
13684{
13685struct sockaddr_alg s
13686 ;
13687 return 0;
13688}
13689_ACEOF
13690if ac_fn_c_try_compile "$LINENO"; then :
13691 ac_cv_struct_sockaddr_alg=yes
13692else
13693 ac_cv_struct_sockaddr_alg=no
13694fi
13695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13696fi
13697
13698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13699$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13700if test $ac_cv_struct_sockaddr_alg = yes; then
13701
13702$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13703
13704fi
13705
Guido van Rossum627b2d71993-12-24 10:39:16 +000013706# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013707
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13709$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013710if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013712else
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013716int
13717main ()
13718{
13719static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013720test_array [0] = 0;
13721return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
13723 ;
13724 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013725}
Martin v. Löwis11437992002-04-12 09:54:03 +000013726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013728 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013729else
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13735$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013736if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738
13739fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13742$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013743if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013747/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749int
13750main ()
13751{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013754 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013756 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758 char const *const *pcpcc;
13759 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 /* NEC SVR4.0.2 mips cc rejects this. */
13761 struct point {int x, y;};
13762 static struct point const zero = {0,0};
13763 /* AIX XL C 1.02.0.0 rejects this.
13764 It does not let you subtract one const X* pointer from another in
13765 an arm of an if-expression whose if-part is not a constant
13766 expression */
13767 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 ++pcpcc;
13771 ppc = (char**) pcpcc;
13772 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013773 { /* SCO 3.2v4 cc rejects this sort of thing. */
13774 char tx;
13775 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013779 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 }
13781 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13782 int x[] = {25, 17};
13783 const int *foo = &x[0];
13784 ++foo;
13785 }
13786 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13787 typedef const int *iptr;
13788 iptr p = 0;
13789 ++p;
13790 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013791 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013793 struct s { int j; const int *ap[3]; } bx;
13794 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 }
13796 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13797 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013801#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013802
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ;
13804 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013805}
Martin v. Löwis11437992002-04-12 09:54:03 +000013806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808 ac_cv_c_const=yes
13809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13815$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819
13820fi
13821
Michael W. Hudson54241132001-12-07 15:38:26 +000013822
Guido van Rossumda88dad1995-01-26 00:46:29 +000013823works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13825$as_echo_n "checking for working signed char... " >&6; }
13826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013827/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013828
Martin v. Löwis11437992002-04-12 09:54:03 +000013829int
13830main ()
13831{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ;
13834 return 0;
13835}
13836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013837if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013838 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013839else
Skip Montanaro6dead952003-09-25 14:50:04 +000013840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013842
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013843
Guido van Rossum7f43da71994-08-01 12:15:30 +000013844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13847$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013848
Guido van Rossumda88dad1995-01-26 00:46:29 +000013849have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13851$as_echo_n "checking for prototypes... " >&6; }
13852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013853/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013854int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013855int
13856main ()
13857{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013858return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 ;
13860 return 0;
13861}
13862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Matthias Kloseb159a552010-04-25 21:00:44 +000013867 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13871$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013872
Guido van Rossumda88dad1995-01-26 00:46:29 +000013873works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13875$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013877/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013878
13879#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013880int foo(int x, ...) {
13881 va_list va;
13882 va_start(va, x);
13883 va_arg(va, int);
13884 va_arg(va, char *);
13885 va_arg(va, double);
13886 return 0;
13887}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889int
13890main ()
13891{
Guido van Rossum90eea071996-08-30 20:58:57 +000013892return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013897if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
13899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013901
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013902 works=yes
13903
Guido van Rossum627b2d71993-12-24 10:39:16 +000013904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13907$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013908
Martin v. Löwisd6320502004-08-12 13:45:08 +000013909# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13911$as_echo_n "checking for socketpair... " >&6; }
13912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013913/* end confdefs.h. */
13914
13915#include <sys/types.h>
13916#include <sys/socket.h>
13917
13918int
13919main ()
13920{
13921void *x=socketpair
13922 ;
13923 return 0;
13924}
13925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013929
Matthias Kloseb159a552010-04-25 21:00:44 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013931$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013932else
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13934$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013935
13936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013938
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013939# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13941$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013943/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013944#include <sys/types.h>
13945#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013946int
13947main ()
13948{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013949struct sockaddr x;
13950x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 ;
13952 return 0;
13953}
13954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013955if ac_fn_c_try_compile "$LINENO"; then :
13956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13957$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013960
13961else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13963$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013964
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013967
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
13970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013972if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13977$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013978 OLD_CFLAGS=$CFLAGS
13979 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013981/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013982
13983# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013984
Martin v. Löwis11437992002-04-12 09:54:03 +000013985int
13986main ()
13987{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988
13989 char *name;
13990 struct hostent *he, *res;
13991 char buffer[2048];
13992 int buflen = 2048;
13993 int h_errnop;
13994
13995 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
13997 ;
13998 return 0;
13999}
14000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014004
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14009$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011else
Skip Montanaro6dead952003-09-25 14:50:04 +000014012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14014$as_echo "no" >&6; }
14015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
14016$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
14017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014018/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014019
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014020# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022int
14023main ()
14024{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014025
14026 char *name;
14027 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000014028 char buffer[2048];
14029 int buflen = 2048;
14030 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014031
Matthias Kloseb159a552010-04-25 21:00:44 +000014032 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
14034 ;
14035 return 0;
14036}
14037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014041
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Matthias Kloseb159a552010-04-25 21:00:44 +000014043$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14046$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048else
Skip Montanaro6dead952003-09-25 14:50:04 +000014049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14051$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14053$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055/* end confdefs.h. */
14056
14057# include <netdb.h>
14058
14059int
14060main ()
14061{
14062
14063 char *name;
14064 struct hostent *he;
14065 struct hostent_data data;
14066
14067 (void) gethostbyname_r(name, he, &data);
14068
14069 ;
14070 return 0;
14071}
14072_ACEOF
14073if ac_fn_c_try_compile "$LINENO"; then :
14074
14075 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14076
14077
14078$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14079
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14081$as_echo "yes" >&6; }
14082
14083else
14084
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14086$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014093
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014096 CFLAGS=$OLD_CFLAGS
14097
14098else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 for ac_func in gethostbyname
14101do :
14102 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014103if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014105#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014106_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014107
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014108fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014109done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014110
Michael W. Hudson54241132001-12-07 15:38:26 +000014111
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112fi
14113
Michael W. Hudson54241132001-12-07 15:38:26 +000014114
14115
14116
14117
14118
14119
Guido van Rossum627b2d71993-12-24 10:39:16 +000014120# checks for system services
14121# (none yet)
14122
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014124ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014125if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014126
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014127else
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14129$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014130if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014132else
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014134LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138/* Override any GCC internal prototype to avoid an error.
14139 Use char because int might match the return type of a GCC
14140 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014141#ifdef __cplusplus
14142extern "C"
14143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014144char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014145int
14146main ()
14147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 ;
14150 return 0;
14151}
14152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014155else
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014158rm -f core conftest.err conftest.$ac_objext \
14159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14163$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014164if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 cat >>confdefs.h <<_ACEOF
14166#define HAVE_LIBIEEE 1
14167_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014168
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014169 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014170
Guido van Rossum627b2d71993-12-24 10:39:16 +000014171fi
14172
Michael W. Hudson54241132001-12-07 15:38:26 +000014173
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014174fi
14175
Michael W. Hudson54241132001-12-07 15:38:26 +000014176
Guido van Rossum7f43da71994-08-01 12:15:30 +000014177# check for --with-libm=...
14178
Guido van Rossum563e7081996-09-10 18:20:48 +000014179case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014180Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014181*) LIBM=-lm
14182esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14184$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014187if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014189if test "$withval" = no
14190then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14192$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014193elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014194then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14196$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014197else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014198fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014199else
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14201$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202fi
14203
Guido van Rossum7f43da71994-08-01 12:15:30 +000014204
14205# check for --with-libc=...
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14208$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014211if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014213if test "$withval" = no
14214then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14216$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014217elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014218then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14220$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014221else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014222fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014223else
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14225$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226fi
14227
Guido van Rossum7f43da71994-08-01 12:15:30 +000014228
Stefan Krah1919b7e2012-03-21 18:25:23 +010014229# **************************************
14230# * Check for gcc x64 inline assembler *
14231# **************************************
14232
14233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14234$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14236/* end confdefs.h. */
14237
14238int
14239main ()
14240{
14241
14242 __asm__ __volatile__ ("movq %rcx, %rax");
14243
14244 ;
14245 return 0;
14246}
14247_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014248if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014249 have_gcc_asm_for_x64=yes
14250else
14251 have_gcc_asm_for_x64=no
14252fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014253rm -f core conftest.err conftest.$ac_objext \
14254 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14256$as_echo "$have_gcc_asm_for_x64" >&6; }
14257if test "$have_gcc_asm_for_x64" = yes
14258then
14259
14260$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14261
14262fi
14263
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014264# **************************************************
14265# * Check for various properties of floating point *
14266# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014267
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14269$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14270if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014272else
14273
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014274
14275ax_cv_c_float_words_bigendian=unknown
14276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014277/* end confdefs.h. */
14278
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014279
14280double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14281
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014282
14283_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014284if ac_fn_c_try_compile "$LINENO"; then :
14285
14286
14287if grep noonsees conftest.$ac_objext >/dev/null ; then
14288 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014289fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014290if grep seesnoon conftest.$ac_objext >/dev/null ; then
14291 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14292 ax_cv_c_float_words_bigendian=no
14293 else
14294 ax_cv_c_float_words_bigendian=unknown
14295 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014296fi
14297
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298
14299fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14303$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014304
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014305case $ax_cv_c_float_words_bigendian in
14306 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014307
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014308$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14309 ;;
14310 no)
14311 ;;
14312 *)
14313 as_fn_error $? "
14314
14315Unknown float word ordering. You need to manually preset
14316ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14317
14318 " "$LINENO" 5 ;;
14319esac
14320
14321
14322if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014323then
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014326
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014327elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328then
14329
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014330$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14331
14332else
14333 # Some ARM platforms use a mixed-endian representation for doubles.
14334 # While Python doesn't currently have full support for these platforms
14335 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14336 # conversions work.
14337 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14338 # or little, then it must be this?
14339
Matthias Kloseb9621712010-04-24 17:59:49 +000014340$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014341
14342fi
14343
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014344# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014345# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014346# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014347# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014348# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014349# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014350
14351# This inline assembler syntax may also work for suncc and icc,
14352# so we try it on all platforms.
14353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14355$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014357/* end confdefs.h. */
14358
14359int
14360main ()
14361{
14362
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014363 unsigned short cw;
14364 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14365 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014366
14367 ;
14368 return 0;
14369}
14370_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014371if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014372 have_gcc_asm_for_x87=yes
14373else
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014375fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014376rm -f core conftest.err conftest.$ac_objext \
14377 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14379$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014380if test "$have_gcc_asm_for_x87" = yes
14381then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014384
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14388$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14390/* end confdefs.h. */
14391
14392int
14393main ()
14394{
14395
14396 unsigned int fpcr;
14397 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14398 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14399
14400 ;
14401 return 0;
14402}
14403_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014404if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014405 have_gcc_asm_for_mc68881=yes
14406else
14407 have_gcc_asm_for_mc68881=no
14408fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014409rm -f core conftest.err conftest.$ac_objext \
14410 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14412$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14413if test "$have_gcc_asm_for_mc68881" = yes
14414then
14415
14416$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14417
14418fi
14419
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014420# Detect whether system arithmetic is subject to x87-style double
14421# rounding issues. The result of this test has little meaning on non
14422# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14423# mode is round-to-nearest and double rounding issues are present, and
14424# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14426$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014427# $BASECFLAGS may affect the result
14428ac_save_cc="$CC"
14429CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014430if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014431 ac_cv_x87_double_rounding=no
14432else
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014434/* end confdefs.h. */
14435
14436#include <stdlib.h>
14437#include <math.h>
14438int main() {
14439 volatile double x, y, z;
14440 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14441 x = 0.99999999999999989; /* 1-2**-53 */
14442 y = 1./x;
14443 if (y != 1.)
14444 exit(0);
14445 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14446 x = 1e16;
14447 y = 2.99999;
14448 z = x + y;
14449 if (z != 1e16+4.)
14450 exit(0);
14451 /* both tests show evidence of double rounding */
14452 exit(1);
14453}
14454
14455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014456if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014457 ac_cv_x87_double_rounding=no
14458else
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14462 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014463fi
14464
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014465CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14467$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014468if test "$ac_cv_x87_double_rounding" = yes
14469then
14470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014472
14473fi
14474
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014475# ************************************
14476# * Check for mathematical functions *
14477# ************************************
14478
14479LIBS_SAVE=$LIBS
14480LIBS="$LIBS $LIBM"
14481
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014482for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14483do :
14484 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14485ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014486if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014487 cat >>confdefs.h <<_ACEOF
14488#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14489_ACEOF
14490
14491fi
14492done
14493
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014494for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014495do :
14496 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14497ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014498if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014499 cat >>confdefs.h <<_ACEOF
14500#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14501_ACEOF
14502
14503fi
14504done
14505
14506ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14507"
Victor Stinnere0be4232011-10-25 13:06:09 +020014508if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014509 ac_have_decl=1
14510else
14511 ac_have_decl=0
14512fi
14513
14514cat >>confdefs.h <<_ACEOF
14515#define HAVE_DECL_ISINF $ac_have_decl
14516_ACEOF
14517ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14518"
Victor Stinnere0be4232011-10-25 13:06:09 +020014519if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014520 ac_have_decl=1
14521else
14522 ac_have_decl=0
14523fi
14524
14525cat >>confdefs.h <<_ACEOF
14526#define HAVE_DECL_ISNAN $ac_have_decl
14527_ACEOF
14528ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14529"
Victor Stinnere0be4232011-10-25 13:06:09 +020014530if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014531 ac_have_decl=1
14532else
14533 ac_have_decl=0
14534fi
14535
14536cat >>confdefs.h <<_ACEOF
14537#define HAVE_DECL_ISFINITE $ac_have_decl
14538_ACEOF
14539
14540
Mark Dickinsona614f042009-11-28 12:48:43 +000014541# For multiprocessing module, check that sem_open
14542# actually works. For FreeBSD versions <= 7.2,
14543# the kernel module that provides POSIX semaphores
14544# isn't loaded by default, so an attempt to call
14545# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14547$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014548if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014550else
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014552 ac_cv_posix_semaphores_enabled=yes
14553else
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014555/* end confdefs.h. */
14556
14557#include <unistd.h>
14558#include <fcntl.h>
14559#include <stdio.h>
14560#include <semaphore.h>
14561#include <sys/stat.h>
14562
14563int main(void) {
14564 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14565 if (a == SEM_FAILED) {
14566 perror("sem_open");
14567 return 1;
14568 }
14569 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014570 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014571 return 0;
14572}
14573
14574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014576 ac_cv_posix_semaphores_enabled=yes
14577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014582fi
14583
14584
Mark Dickinsona614f042009-11-28 12:48:43 +000014585fi
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14588$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014589if test $ac_cv_posix_semaphores_enabled = no
14590then
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014593
14594fi
14595
Mark Dickinson10683072009-04-18 21:18:19 +000014596# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14598$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014599if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014603 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014606/* end confdefs.h. */
14607
14608#include <unistd.h>
14609#include <fcntl.h>
14610#include <stdio.h>
14611#include <semaphore.h>
14612#include <sys/stat.h>
14613
14614int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014615 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014616 int count;
14617 int res;
14618 if(a==SEM_FAILED){
14619 perror("sem_open");
14620 return 1;
14621
14622 }
14623 res = sem_getvalue(a, &count);
14624 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014625 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014626 return res==-1 ? 1 : 0;
14627}
14628
Mark Dickinson10683072009-04-18 21:18:19 +000014629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014631 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014632else
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014637fi
14638
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014639
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014640fi
14641
Matthias Kloseb9621712010-04-24 17:59:49 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14643$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014644if test $ac_cv_broken_sem_getvalue = yes
14645then
14646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014648
14649fi
14650
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014651ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14652"
14653if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14654 ac_have_decl=1
14655else
14656 ac_have_decl=0
14657fi
14658
14659cat >>confdefs.h <<_ACEOF
14660#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14661_ACEOF
14662ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14663"
14664if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14665 ac_have_decl=1
14666else
14667 ac_have_decl=0
14668fi
14669
14670cat >>confdefs.h <<_ACEOF
14671#define HAVE_DECL_RTLD_NOW $ac_have_decl
14672_ACEOF
14673ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14674"
14675if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14676 ac_have_decl=1
14677else
14678 ac_have_decl=0
14679fi
14680
14681cat >>confdefs.h <<_ACEOF
14682#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14683_ACEOF
14684ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14685"
14686if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14687 ac_have_decl=1
14688else
14689 ac_have_decl=0
14690fi
14691
14692cat >>confdefs.h <<_ACEOF
14693#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14694_ACEOF
14695ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14696"
14697if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14698 ac_have_decl=1
14699else
14700 ac_have_decl=0
14701fi
14702
14703cat >>confdefs.h <<_ACEOF
14704#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14705_ACEOF
14706ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14707"
14708if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14709 ac_have_decl=1
14710else
14711 ac_have_decl=0
14712fi
14713
14714cat >>confdefs.h <<_ACEOF
14715#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14716_ACEOF
14717ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14718"
14719if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14720 ac_have_decl=1
14721else
14722 ac_have_decl=0
14723fi
14724
14725cat >>confdefs.h <<_ACEOF
14726#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14727_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014728ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14729"
14730if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14731 ac_have_decl=1
14732else
14733 ac_have_decl=0
14734fi
14735
14736cat >>confdefs.h <<_ACEOF
14737#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14738_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014739
14740
Mark Dickinsonbd792642009-03-18 20:06:12 +000014741# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14743$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014744# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014745if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014746 enableval=$enable_big_digits; case $enable_big_digits in
14747yes)
14748 enable_big_digits=30 ;;
14749no)
14750 enable_big_digits=15 ;;
1475115|30)
14752 ;;
14753*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014754 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 +000014755esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14757$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014758
14759cat >>confdefs.h <<_ACEOF
14760#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14761_ACEOF
14762
14763
14764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14766$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014767fi
14768
14769
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014771ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014772if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014773
14774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014776
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014777 wchar_h="yes"
14778
Guido van Rossumef2255b2000-03-10 22:30:29 +000014779else
Martin v. Löwis11437992002-04-12 09:54:03 +000014780 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014781
14782fi
14783
Michael W. Hudson54241132001-12-07 15:38:26 +000014784
Martin v. Löwis11437992002-04-12 09:54:03 +000014785
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014786# determine wchar_t size
14787if test "$wchar_h" = yes
14788then
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14792# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14794$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014795if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014797else
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14799"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
Martin v. Löwis11437992002-04-12 09:54:03 +000014801else
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 if test "$ac_cv_type_wchar_t" = yes; then
14803 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014805as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014806See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807 else
14808 ac_cv_sizeof_wchar_t=0
14809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14814$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815
14816
14817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014819#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014820_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014821
Michael W. Hudson54241132001-12-07 15:38:26 +000014822
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014823fi
14824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14826$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014827have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014829/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014830
14831#include <tcl.h>
14832#if TCL_UTF_MAX != 6
14833# error "NOT UCS4_TCL"
14834#endif
14835int
14836main ()
14837{
14838
14839 ;
14840 return 0;
14841}
14842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014844
14845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014847
14848 have_ucs4_tcl=yes
14849
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14853$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014854
Skip Montanaro6dead952003-09-25 14:50:04 +000014855# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014856if test "$wchar_h" = yes
14857then
14858 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14860$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014861 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014863else
14864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014866 ac_cv_wchar_t_signed=yes
14867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014869/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014870
14871 #include <wchar.h>
14872 int main()
14873 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014874 /* Success: exit code 0 */
14875 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014876 }
14877
14878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014879if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014880 ac_cv_wchar_t_signed=yes
14881else
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014886fi
14887
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014888fi
14889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14891$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892fi
14893
Michael Osipov3738fad2018-08-24 18:17:19 +020014894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14895$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014896# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014897if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014898 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014899then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
Michael Osipov3738fad2018-08-24 18:17:19 +020014903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14904$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014905else
Michael Osipov3738fad2018-08-24 18:17:19 +020014906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14907$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014908fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014909
14910# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14912$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014913if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014915else
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 ac_cv_c_bigendian=unknown
14917 # See if we're dealing with a universal compiler.
14918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14919/* end confdefs.h. */
14920#ifndef __APPLE_CC__
14921 not a universal capable compiler
14922 #endif
14923 typedef int dummy;
14924
Skip Montanaro6dead952003-09-25 14:50:04 +000014925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014926if ac_fn_c_try_compile "$LINENO"; then :
14927
14928 # Check for potential -arch flags. It is not universal unless
14929 # there are at least two -arch flags with different values.
14930 ac_arch=
14931 ac_prev=
14932 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14933 if test -n "$ac_prev"; then
14934 case $ac_word in
14935 i?86 | x86_64 | ppc | ppc64)
14936 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14937 ac_arch=$ac_word
14938 else
14939 ac_cv_c_bigendian=universal
14940 break
14941 fi
14942 ;;
14943 esac
14944 ac_prev=
14945 elif test "x$ac_word" = "x-arch"; then
14946 ac_prev=arch
14947 fi
14948 done
14949fi
14950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14951 if test $ac_cv_c_bigendian = unknown; then
14952 # See if sys/param.h defines the BYTE_ORDER macro.
14953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014954/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014955#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957
Martin v. Löwis11437992002-04-12 09:54:03 +000014958int
14959main ()
14960{
Matthias Kloseb9621712010-04-24 17:59:49 +000014961#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14962 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14963 && LITTLE_ENDIAN)
14964 bogus endian macros
14965 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014966
14967 ;
14968 return 0;
14969}
14970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014971if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014972 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014974/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014975#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014977
Martin v. Löwis11437992002-04-12 09:54:03 +000014978int
14979main ()
14980{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014981#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 not big endian
14983 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014984
14985 ;
14986 return 0;
14987}
14988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014989if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014990 ac_cv_c_bigendian=yes
14991else
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014995fi
14996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14997 fi
14998 if test $ac_cv_c_bigendian = unknown; then
14999 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015001/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015002#include <limits.h>
15003
Martin v. Löwis11437992002-04-12 09:54:03 +000015004int
15005main ()
15006{
Matthias Kloseb9621712010-04-24 17:59:49 +000015007#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15008 bogus endian macros
15009 #endif
15010
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ;
15012 return 0;
15013}
15014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015015if ac_fn_c_try_compile "$LINENO"; then :
15016 # It does; now see whether it defined to _BIG_ENDIAN or not.
15017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018/* end confdefs.h. */
15019#include <limits.h>
15020
15021int
15022main ()
15023{
15024#ifndef _BIG_ENDIAN
15025 not big endian
15026 #endif
15027
15028 ;
15029 return 0;
15030}
15031_ACEOF
15032if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015034else
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15038fi
15039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15040 fi
15041 if test $ac_cv_c_bigendian = unknown; then
15042 # Compile a test program.
15043 if test "$cross_compiling" = yes; then :
15044 # Try to guess by grepping values from an object file.
15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15046/* end confdefs.h. */
15047short int ascii_mm[] =
15048 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15049 short int ascii_ii[] =
15050 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15051 int use_ascii (int i) {
15052 return ascii_mm[i] + ascii_ii[i];
15053 }
15054 short int ebcdic_ii[] =
15055 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15056 short int ebcdic_mm[] =
15057 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15058 int use_ebcdic (int i) {
15059 return ebcdic_mm[i] + ebcdic_ii[i];
15060 }
15061 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063int
15064main ()
15065{
15066return use_ascii (foo) == use_ebcdic (foo);
15067 ;
15068 return 0;
15069}
15070_ACEOF
15071if ac_fn_c_try_compile "$LINENO"; then :
15072 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15073 ac_cv_c_bigendian=yes
15074 fi
15075 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15076 if test "$ac_cv_c_bigendian" = unknown; then
15077 ac_cv_c_bigendian=no
15078 else
15079 # finding both strings is unlikely to happen, but who knows?
15080 ac_cv_c_bigendian=unknown
15081 fi
15082 fi
15083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015089int
15090main ()
15091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 /* Are we little or big endian? From Harbison&Steele. */
15094 union
15095 {
15096 long int l;
15097 char c[sizeof (long int)];
15098 } u;
15099 u.l = 1;
15100 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101
15102 ;
15103 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015104}
Martin v. Löwis11437992002-04-12 09:54:03 +000015105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015106if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107 ac_cv_c_bigendian=no
15108else
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15112 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15118$as_echo "$ac_cv_c_bigendian" >&6; }
15119 case $ac_cv_c_bigendian in #(
15120 yes)
15121 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15122;; #(
15123 no)
15124 ;; #(
15125 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015128
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 ;; #(
15130 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015131 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015132 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015134
Michael W. Hudson54241132001-12-07 15:38:26 +000015135
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015136# ABI version string for Python extension modules. This appears between the
15137# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15138# from the following attributes which affect the ABI of this Python build (in
15139# this order):
15140#
15141# * The Python implementation (always 'cpython-' for us)
15142# * The major and minor version numbers
15143# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015144#
15145# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015146# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15147# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015148#
15149# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15150# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015151
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15153$as_echo_n "checking ABIFLAGS... " >&6; }
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15155$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15157$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015158SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15160$as_echo "$SOABI" >&6; }
15161
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015162# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15163if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015164 # Similar to SOABI but remove "d" flag from ABIFLAGS
15165
15166 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15167
15168cat >>confdefs.h <<_ACEOF
15169#define ALT_SOABI "${ALT_SOABI}"
15170_ACEOF
15171
15172fi
15173
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015174
15175case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015176 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015177 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15178 *)
15179 EXT_SUFFIX=${SHLIB_SUFFIX};;
15180esac
15181
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15183$as_echo_n "checking LDVERSION... " >&6; }
15184LDVERSION='$(VERSION)$(ABIFLAGS)'
15185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15186$as_echo "$LDVERSION" >&6; }
15187
E. M. Brayc994c8f2019-05-24 17:33:47 +020015188# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015189
E. M. Brayb1fc4172019-05-24 18:39:39 +020015190if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015191 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
E. M. Brayb1fc4172019-05-24 18:39:39 +020015192else
15193 LIBPYTHON=''
xdegaye254b3092019-04-29 09:27:40 +020015194fi
15195
doko@python.org87421192013-01-26 11:39:31 +010015196
doko@ubuntu.com55532312016-06-14 08:55:19 +020015197if test x$PLATFORM_TRIPLET = x; then
15198 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15199else
15200 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15201fi
doko@python.org87421192013-01-26 11:39:31 +010015202
15203
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015204# Check whether right shifting a negative integer extends the sign bit
15205# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15207$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015208if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015210else
Martin v. Löwis11437992002-04-12 09:54:03 +000015211
Matthias Kloseb9621712010-04-24 17:59:49 +000015212if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015213 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015214else
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015216/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015217
15218int main()
15219{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015220 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015221}
15222
Martin v. Löwis11437992002-04-12 09:54:03 +000015223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015224if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015225 ac_cv_rshift_extends_sign=yes
15226else
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15230 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015231fi
15232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233fi
15234
Matthias Kloseb9621712010-04-24 17:59:49 +000015235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15236$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015237if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015238then
Martin v. Löwis11437992002-04-12 09:54:03 +000015239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015241
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015242fi
15243
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015244# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15246$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015247if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015249else
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015252/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015253#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015254int
15255main ()
15256{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015257
15258 FILE *f = fopen("/dev/null", "r");
15259 flockfile(f);
15260 getc_unlocked(f);
15261 funlockfile(f);
15262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 ;
15264 return 0;
15265}
15266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015267if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015268 ac_cv_have_getc_unlocked=yes
15269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 ac_cv_have_getc_unlocked=no
15271fi
15272rm -f core conftest.err conftest.$ac_objext \
15273 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15277$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015278if test "$ac_cv_have_getc_unlocked" = yes
15279then
Martin v. Löwis11437992002-04-12 09:54:03 +000015280
Matthias Kloseb9621712010-04-24 17:59:49 +000015281$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015282
15283fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015284
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015285# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015286# save the value of LIBS so we don't actually link Python with readline
15287LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015288
Gregory P. Smith18820942008-09-07 06:24:49 +000015289# On some systems we need to link readline to a termcap compatible
15290# library. NOTE: Keep the precedence of listed libraries synchronised
15291# with setup.py.
15292py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15294$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015295for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015296 if test -z "$py_libtermcap"; then
15297 READLINE_LIBS="-lreadline"
15298 else
15299 READLINE_LIBS="-lreadline -l$py_libtermcap"
15300 fi
15301 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015303/* end confdefs.h. */
15304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015305/* Override any GCC internal prototype to avoid an error.
15306 Use char because int might match the return type of a GCC
15307 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015308#ifdef __cplusplus
15309extern "C"
15310#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015311char readline ();
15312int
15313main ()
15314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015316 ;
15317 return 0;
15318}
15319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015320if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015321 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015323rm -f core conftest.err conftest.$ac_objext \
15324 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015325 if test $py_cv_lib_readline = yes; then
15326 break
15327 fi
15328done
15329# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15330#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015331if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15333$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015334else
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15336$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015339
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015340fi
15341
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015342# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015344/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015345#include <readline/readline.h>
15346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015347if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015348 have_readline=yes
15349else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015350 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015351
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015352fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015353rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015354if test $have_readline = yes
15355then
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015357/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015358#include <readline/readline.h>
15359
15360_ACEOF
15361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015365
15366fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015367rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015368
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015370/* end confdefs.h. */
15371#include <readline/readline.h>
15372
15373_ACEOF
15374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015376
Matthias Kloseb9621712010-04-24 17:59:49 +000015377$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015378
15379fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015380rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015381
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015382fi
15383
Martin v. Löwis0daad592001-09-30 21:09:59 +000015384# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15386$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015387if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015389else
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 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
Skip Montanaro6dead952003-09-25 14:50:04 +000015393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395/* 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015398#ifdef __cplusplus
15399extern "C"
15400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015401char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015402int
15403main ()
15404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015405return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015406 ;
15407 return 0;
15408}
15409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015410if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015412else
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015415rm -f core conftest.err conftest.$ac_objext \
15416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +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_pre_input_hook" >&5
15420$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015421if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015422
Matthias Kloseb9621712010-04-24 17:59:49 +000015423$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015424
Martin v. Löwis0daad592001-09-30 21:09:59 +000015425fi
15426
Michael W. Hudson54241132001-12-07 15:38:26 +000015427
Thomas Wouters89d996e2007-09-08 17:39:28 +000015428# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15430$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015431if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015433else
15434 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015435LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015437/* 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_completion_display_matches_hook ();
15446int
15447main ()
15448{
15449return rl_completion_display_matches_hook ();
15450 ;
15451 return 0;
15452}
15453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015454if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015455 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15456else
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015459rm -f core conftest.err conftest.$ac_objext \
15460 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015461LIBS=$ac_check_lib_save_LIBS
15462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15464$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015465if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015468
15469fi
15470
15471
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015472# also in 4.0, but not in editline
15473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15474$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15475if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15476 $as_echo_n "(cached) " >&6
15477else
15478 ac_check_lib_save_LIBS=$LIBS
15479LIBS="-lreadline $READLINE_LIBS $LIBS"
15480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481/* end confdefs.h. */
15482
15483/* 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. */
15486#ifdef __cplusplus
15487extern "C"
15488#endif
15489char rl_resize_terminal ();
15490int
15491main ()
15492{
15493return rl_resize_terminal ();
15494 ;
15495 return 0;
15496}
15497_ACEOF
15498if ac_fn_c_try_link "$LINENO"; then :
15499 ac_cv_lib_readline_rl_resize_terminal=yes
15500else
15501 ac_cv_lib_readline_rl_resize_terminal=no
15502fi
15503rm -f core conftest.err conftest.$ac_objext \
15504 conftest$ac_exeext conftest.$ac_ext
15505LIBS=$ac_check_lib_save_LIBS
15506fi
15507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15508$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15509if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15510
15511$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15512
15513fi
15514
15515
Martin v. Löwis0daad592001-09-30 21:09:59 +000015516# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15518$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015519if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015521else
Martin v. Löwis11437992002-04-12 09:54:03 +000015522 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015523LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527/* Override any GCC internal prototype to avoid an error.
15528 Use char because int might match the return type of a GCC
15529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015530#ifdef __cplusplus
15531extern "C"
15532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015533char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015534int
15535main ()
15536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 ;
15539 return 0;
15540}
15541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015544else
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015547rm -f core conftest.err conftest.$ac_objext \
15548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015549LIBS=$ac_check_lib_save_LIBS
15550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15552$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015553if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015556
Guido van Rossum353ae582001-07-10 16:45:32 +000015557fi
15558
Jack Jansendd19cf82001-12-06 22:36:17 +000015559
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015560# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015562/* end confdefs.h. */
15563#include <readline/readline.h>
15564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015565if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015566 have_readline=yes
15567else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015568 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015569
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015570fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015571rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572if test $have_readline = yes
15573then
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015575/* end confdefs.h. */
15576#include <readline/readline.h>
15577
15578_ACEOF
15579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015581
Matthias Kloseb9621712010-04-24 17:59:49 +000015582$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015583
15584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015585rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015586
15587fi
15588
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15590$as_echo_n "checking for append_history in -lreadline... " >&6; }
15591if ${ac_cv_lib_readline_append_history+:} false; then :
15592 $as_echo_n "(cached) " >&6
15593else
15594 ac_check_lib_save_LIBS=$LIBS
15595LIBS="-lreadline $READLINE_LIBS $LIBS"
15596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15597/* end confdefs.h. */
15598
15599/* Override any GCC internal prototype to avoid an error.
15600 Use char because int might match the return type of a GCC
15601 builtin and then its argument prototype would still apply. */
15602#ifdef __cplusplus
15603extern "C"
15604#endif
15605char append_history ();
15606int
15607main ()
15608{
15609return append_history ();
15610 ;
15611 return 0;
15612}
15613_ACEOF
15614if ac_fn_c_try_link "$LINENO"; then :
15615 ac_cv_lib_readline_append_history=yes
15616else
15617 ac_cv_lib_readline_append_history=no
15618fi
15619rm -f core conftest.err conftest.$ac_objext \
15620 conftest$ac_exeext conftest.$ac_ext
15621LIBS=$ac_check_lib_save_LIBS
15622fi
15623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15624$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15625if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15626
15627$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15628
15629fi
15630
15631
Martin v. Löwis82bca632006-02-10 20:49:30 +000015632# End of readline checks: restore LIBS
15633LIBS=$LIBS_no_readline
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15636$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015637if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015639else
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015642 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015643else
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015645/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015646
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015647#include <stdlib.h>
15648#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015649int main()
15650{
15651 int val1 = nice(1);
15652 if (val1 != -1 && val1 == nice(2))
15653 exit(0);
15654 exit(1);
15655}
15656
Martin v. Löwis11437992002-04-12 09:54:03 +000015657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015658if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015659 ac_cv_broken_nice=yes
15660else
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015665fi
15666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667fi
15668
Matthias Kloseb9621712010-04-24 17:59:49 +000015669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15670$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015671if test "$ac_cv_broken_nice" = yes
15672then
Martin v. Löwis11437992002-04-12 09:54:03 +000015673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015675
15676fi
15677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15679$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015680if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015682else
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015684 ac_cv_broken_poll=no
15685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015687/* end confdefs.h. */
15688
15689#include <poll.h>
15690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015691int main()
15692{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015693 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015694 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015695
15696 close (42);
15697
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015698 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015699 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015700 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015701 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015702 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015703 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015704 return 1;
15705}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015706
15707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015708if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015709 ac_cv_broken_poll=yes
15710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015717fi
15718
Matthias Kloseb9621712010-04-24 17:59:49 +000015719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15720$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015721if test "$ac_cv_broken_poll" = yes
15722then
15723
Matthias Kloseb9621712010-04-24 17:59:49 +000015724$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015725
15726fi
15727
Martin v. Löwis1d459062005-03-14 21:23:33 +000015728# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15730$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015731if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733else
15734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015736 ac_cv_working_tzset=no
15737else
Matthias Kloseb9621712010-04-24 17:59:49 +000015738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015739/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015740
15741#include <stdlib.h>
15742#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015743#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015744
15745#if HAVE_TZNAME
15746extern char *tzname[];
15747#endif
15748
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015749int main()
15750{
Brett Cannon18367812003-09-19 00:59:16 +000015751 /* Note that we need to ensure that not only does tzset(3)
15752 do 'something' with localtime, but it works as documented
15753 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015754 This includes making sure that tzname is set properly if
15755 tm->tm_zone does not exist since it is the alternative way
15756 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015757
15758 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015759 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015760 */
15761
Martin v. Löwis1d459062005-03-14 21:23:33 +000015762 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015763 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15764
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015765 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015766 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015767 if (localtime(&groundhogday)->tm_hour != 0)
15768 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015769#if HAVE_TZNAME
15770 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15771 if (strcmp(tzname[0], "UTC") ||
15772 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15773 exit(1);
15774#endif
Brett Cannon18367812003-09-19 00:59:16 +000015775
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015776 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015777 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015778 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015779 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015780#if HAVE_TZNAME
15781 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15782 exit(1);
15783#endif
Brett Cannon18367812003-09-19 00:59:16 +000015784
15785 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15786 tzset();
15787 if (localtime(&groundhogday)->tm_hour != 11)
15788 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015789#if HAVE_TZNAME
15790 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15791 exit(1);
15792#endif
15793
15794#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015795 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15796 exit(1);
15797 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15798 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015799#endif
Brett Cannon18367812003-09-19 00:59:16 +000015800
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015801 exit(0);
15802}
15803
15804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015805if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015806 ac_cv_working_tzset=yes
15807else
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015812fi
15813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814fi
15815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15817$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015818if test "$ac_cv_working_tzset" = yes
15819then
15820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015822
15823fi
15824
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015825# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15827$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015828if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015829 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015830else
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015832/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015833#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015834int
15835main ()
15836{
15837
15838struct stat st;
15839st.st_mtim.tv_nsec = 1;
15840
15841 ;
15842 return 0;
15843}
15844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015845if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015846 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015847else
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15851fi
15852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15854$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015855if test "$ac_cv_stat_tv_nsec" = yes
15856then
15857
Matthias Kloseb9621712010-04-24 17:59:49 +000015858$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015859
15860fi
15861
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015862# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15864$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015865if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015866 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015867else
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015869/* end confdefs.h. */
15870#include <sys/stat.h>
15871int
15872main ()
15873{
15874
15875struct stat st;
15876st.st_mtimespec.tv_nsec = 1;
15877
15878 ;
15879 return 0;
15880}
15881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015882if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015883 ac_cv_stat_tv_nsec2=yes
15884else
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15888fi
15889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15891$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015892if test "$ac_cv_stat_tv_nsec2" = yes
15893then
15894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015896
15897fi
15898
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015899# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015900ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015901if test "$cross_compiling" = no; then
15902 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15903fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015904
15905for ac_header in curses.h ncurses.h
15906do :
15907 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15908ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15909if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15910 cat >>confdefs.h <<_ACEOF
15911#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15912_ACEOF
15913
15914fi
15915
15916done
15917
15918
15919# On Solaris, term.h requires curses.h
15920for ac_header in term.h
15921do :
15922 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15923#ifdef HAVE_CURSES_H
15924#include <curses.h>
15925#endif
15926
15927"
15928if test "x$ac_cv_header_term_h" = xyes; then :
15929 cat >>confdefs.h <<_ACEOF
15930#define HAVE_TERM_H 1
15931_ACEOF
15932
15933fi
15934
15935done
15936
15937
Jack Jansen666b1e72001-10-31 12:11:48 +000015938# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15940$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015941if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015942 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015943else
Matthias Kloseb9621712010-04-24 17:59:49 +000015944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015945/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015946#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015947int
15948main ()
15949{
Jack Jansen666b1e72001-10-31 12:11:48 +000015950
15951 int rtn;
15952 rtn = mvwdelch(0,0,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_mvwdelch_is_expression=yes
15960else
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 ac_cv_mvwdelch_is_expression=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_mvwdelch_is_expression" >&5
15967$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015968
15969if test "$ac_cv_mvwdelch_is_expression" = yes
15970then
Martin v. Löwis11437992002-04-12 09:54:03 +000015971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015973
15974fi
15975
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015976# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15977# structs since version 5.7. If the macro is defined as zero before including
15978# [n]curses.h, ncurses will expose fields of the structs regardless of the
15979# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15981$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015982if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015984else
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015986/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015987
15988 #define NCURSES_OPAQUE 0
15989 #include <curses.h>
15990
Martin v. Löwis11437992002-04-12 09:54:03 +000015991int
15992main ()
15993{
Jack Jansen666b1e72001-10-31 12:11:48 +000015994
15995 WINDOW *w;
15996 w->_flags = 0;
15997
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 ;
15999 return 0;
16000}
16001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016002if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016003 ac_cv_window_has_flags=yes
16004else
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16008fi
16009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16011$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016012
Jack Jansen666b1e72001-10-31 12:11:48 +000016013
16014if test "$ac_cv_window_has_flags" = yes
16015then
Martin v. Löwis11437992002-04-12 09:54:03 +000016016
Matthias Kloseb9621712010-04-24 17:59:49 +000016017$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016018
16019fi
16020
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16022$as_echo_n "checking for is_pad... " >&6; }
16023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16024/* end confdefs.h. */
16025#include <curses.h>
16026int
16027main ()
16028{
16029
16030#ifndef is_pad
16031void *x=is_pad
16032#endif
16033
16034 ;
16035 return 0;
16036}
16037_ACEOF
16038if ac_fn_c_try_compile "$LINENO"; then :
16039
16040$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16041
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16043$as_echo "yes" >&6; }
16044else
16045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16046$as_echo "no" >&6; }
16047
16048fi
16049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16052$as_echo_n "checking for is_term_resized... " >&6; }
16053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016054/* end confdefs.h. */
16055#include <curses.h>
16056int
16057main ()
16058{
16059void *x=is_term_resized
16060 ;
16061 return 0;
16062}
16063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016065
Matthias Kloseb9621712010-04-24 17:59:49 +000016066$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016067
Matthias Kloseb159a552010-04-25 21:00:44 +000016068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016069$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016070else
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16072$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016073
16074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16076
Matthias Kloseb9621712010-04-24 17:59:49 +000016077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16078$as_echo_n "checking for resize_term... " >&6; }
16079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016080/* end confdefs.h. */
16081#include <curses.h>
16082int
16083main ()
16084{
16085void *x=resize_term
16086 ;
16087 return 0;
16088}
16089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016090if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016091
Matthias Kloseb9621712010-04-24 17:59:49 +000016092$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016093
Matthias Kloseb159a552010-04-25 21:00:44 +000016094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016095$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016096else
Matthias Kloseb9621712010-04-24 17:59:49 +000016097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16098$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016099
16100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16102
Matthias Kloseb9621712010-04-24 17:59:49 +000016103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16104$as_echo_n "checking for resizeterm... " >&6; }
16105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016106/* end confdefs.h. */
16107#include <curses.h>
16108int
16109main ()
16110{
16111void *x=resizeterm
16112 ;
16113 return 0;
16114}
16115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016116if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016119
Matthias Kloseb159a552010-04-25 21:00:44 +000016120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016121$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016122else
Matthias Kloseb9621712010-04-24 17:59:49 +000016123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16124$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016125
16126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016128
16129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16130$as_echo_n "checking for immedok... " >&6; }
16131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16132/* end confdefs.h. */
16133#include <curses.h>
16134int
16135main ()
16136{
16137
16138#ifndef immedok
16139void *x=immedok
16140#endif
16141
16142 ;
16143 return 0;
16144}
16145_ACEOF
16146if ac_fn_c_try_compile "$LINENO"; then :
16147
16148$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16149
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16151$as_echo "yes" >&6; }
16152else
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16154$as_echo "no" >&6; }
16155
16156fi
16157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16158
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16160$as_echo_n "checking for syncok... " >&6; }
16161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162/* end confdefs.h. */
16163#include <curses.h>
16164int
16165main ()
16166{
16167
16168#ifndef syncok
16169void *x=syncok
16170#endif
16171
16172 ;
16173 return 0;
16174}
16175_ACEOF
16176if ac_fn_c_try_compile "$LINENO"; then :
16177
16178$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16179
16180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16181$as_echo "yes" >&6; }
16182else
16183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16184$as_echo "no" >&6; }
16185
16186fi
16187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16188
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16190$as_echo_n "checking for wchgat... " >&6; }
16191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192/* end confdefs.h. */
16193#include <curses.h>
16194int
16195main ()
16196{
16197
16198#ifndef wchgat
16199void *x=wchgat
16200#endif
16201
16202 ;
16203 return 0;
16204}
16205_ACEOF
16206if ac_fn_c_try_compile "$LINENO"; then :
16207
16208$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16209
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16211$as_echo "yes" >&6; }
16212else
16213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16214$as_echo "no" >&6; }
16215
16216fi
16217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16218
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16220$as_echo_n "checking for filter... " >&6; }
16221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16222/* end confdefs.h. */
16223#include <curses.h>
16224int
16225main ()
16226{
16227
16228#ifndef filter
16229void *x=filter
16230#endif
16231
16232 ;
16233 return 0;
16234}
16235_ACEOF
16236if ac_fn_c_try_compile "$LINENO"; then :
16237
16238$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16239
16240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16241$as_echo "yes" >&6; }
16242else
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16244$as_echo "no" >&6; }
16245
16246fi
16247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16248
16249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16250$as_echo_n "checking for has_key... " >&6; }
16251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16252/* end confdefs.h. */
16253#include <curses.h>
16254int
16255main ()
16256{
16257
16258#ifndef has_key
16259void *x=has_key
16260#endif
16261
16262 ;
16263 return 0;
16264}
16265_ACEOF
16266if ac_fn_c_try_compile "$LINENO"; then :
16267
16268$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16269
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16271$as_echo "yes" >&6; }
16272else
16273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16274$as_echo "no" >&6; }
16275
16276fi
16277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16278
16279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16280$as_echo_n "checking for typeahead... " >&6; }
16281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16282/* end confdefs.h. */
16283#include <curses.h>
16284int
16285main ()
16286{
16287
16288#ifndef typeahead
16289void *x=typeahead
16290#endif
16291
16292 ;
16293 return 0;
16294}
16295_ACEOF
16296if ac_fn_c_try_compile "$LINENO"; then :
16297
16298$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16299
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16301$as_echo "yes" >&6; }
16302else
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16304$as_echo "no" >&6; }
16305
16306fi
16307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16308
16309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16310$as_echo_n "checking for use_env... " >&6; }
16311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16312/* end confdefs.h. */
16313#include <curses.h>
16314int
16315main ()
16316{
16317
16318#ifndef use_env
16319void *x=use_env
16320#endif
16321
16322 ;
16323 return 0;
16324}
16325_ACEOF
16326if ac_fn_c_try_compile "$LINENO"; then :
16327
16328$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16329
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16331$as_echo "yes" >&6; }
16332else
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16334$as_echo "no" >&6; }
16335
16336fi
16337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016338# last curses configure check
16339CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16342$as_echo "$as_me: checking for device files" >&6;}
16343
16344if test "x$cross_compiling" = xyes; then
16345 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16347$as_echo_n "checking for /dev/ptmx... " >&6; }
16348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16349$as_echo "not set" >&6; }
16350 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16351 fi
16352 if test "${ac_cv_file__dev_ptc+set}" != set; then
16353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16354$as_echo_n "checking for /dev/ptc... " >&6; }
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16356$as_echo "not set" >&6; }
16357 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16358 fi
16359fi
16360
Matthias Kloseb9621712010-04-24 17:59:49 +000016361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16362$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016363if ${ac_cv_file__dev_ptmx+:} false; then :
16364 $as_echo_n "(cached) " >&6
16365else
16366 test "$cross_compiling" = yes &&
16367 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16368if test -r "/dev/ptmx"; then
16369 ac_cv_file__dev_ptmx=yes
16370else
16371 ac_cv_file__dev_ptmx=no
16372fi
16373fi
16374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16375$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16376if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016377
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016378fi
16379
16380if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016381
Matthias Kloseb9621712010-04-24 17:59:49 +000016382$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016383
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16386$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016387if ${ac_cv_file__dev_ptc+:} false; then :
16388 $as_echo_n "(cached) " >&6
16389else
16390 test "$cross_compiling" = yes &&
16391 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16392if test -r "/dev/ptc"; then
16393 ac_cv_file__dev_ptc=yes
16394else
16395 ac_cv_file__dev_ptc=no
16396fi
16397fi
16398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16399$as_echo "$ac_cv_file__dev_ptc" >&6; }
16400if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016401
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016402fi
16403
16404if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016407
Neal Norwitz865400f2003-03-21 01:42:58 +000016408fi
16409
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016410if test $ac_sys_system = Darwin
16411then
16412 LIBS="$LIBS -framework CoreFoundation"
16413fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016414
Matthias Kloseb9621712010-04-24 17:59:49 +000016415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16416$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016417if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016418 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016419else
Matthias Kloseb9621712010-04-24 17:59:49 +000016420 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016421 ac_cv_have_size_t_format="cross -- assuming yes"
16422
Thomas Wouters477c8d52006-05-27 19:21:47 +000016423else
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016425/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016426
Thomas Wouters477c8d52006-05-27 19:21:47 +000016427#include <stdio.h>
16428#include <stddef.h>
16429#include <string.h>
16430
Christian Heimes2c181612007-12-17 20:04:13 +000016431#ifdef HAVE_SYS_TYPES_H
16432#include <sys/types.h>
16433#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016434
16435#ifdef HAVE_SSIZE_T
16436typedef ssize_t Py_ssize_t;
16437#elif SIZEOF_VOID_P == SIZEOF_LONG
16438typedef long Py_ssize_t;
16439#else
16440typedef int Py_ssize_t;
16441#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016442
Christian Heimes2c181612007-12-17 20:04:13 +000016443int main()
16444{
16445 char buffer[256];
16446
Thomas Wouters477c8d52006-05-27 19:21:47 +000016447 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16448 return 1;
16449
Thomas Wouters89f507f2006-12-13 04:49:30 +000016450 if (strcmp(buffer, "123"))
16451 return 1;
16452
16453 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16454 return 1;
16455
16456 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016457 return 1;
16458
16459 return 0;
16460}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016461
Thomas Wouters477c8d52006-05-27 19:21:47 +000016462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016463if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016464 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016465else
Matthias Kloseb9621712010-04-24 17:59:49 +000016466 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016470fi
16471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16474$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016475if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016476
Matthias Kloseb9621712010-04-24 17:59:49 +000016477$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016478
16479fi
16480
Matthias Kloseb9621712010-04-24 17:59:49 +000016481ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016482#ifdef HAVE_SYS_TYPES_H
16483#include <sys/types.h>
16484#endif
16485#ifdef HAVE_SYS_SOCKET_H
16486#include <sys/socket.h>
16487#endif
16488
Matthias Kloseb9621712010-04-24 17:59:49 +000016489"
Victor Stinnere0be4232011-10-25 13:06:09 +020016490if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016491
Martin v. Löwis11437992002-04-12 09:54:03 +000016492else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016493
Matthias Kloseb9621712010-04-24 17:59:49 +000016494$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016495
16496fi
16497
Michael W. Hudson54241132001-12-07 15:38:26 +000016498
Matthias Kloseb9621712010-04-24 17:59:49 +000016499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16500$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016501if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016502 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016503else
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016505 ac_cv_broken_mbstowcs=no
16506else
Matthias Kloseb9621712010-04-24 17:59:49 +000016507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016508/* end confdefs.h. */
16509
Stefan Krah19c21392012-11-22 23:47:32 +010016510#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016511#include<stdlib.h>
16512int main() {
16513 size_t len = -1;
16514 const char *str = "text";
16515 len = mbstowcs(NULL, str, 0);
16516 return (len != 4);
16517}
16518
16519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016520if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016521 ac_cv_broken_mbstowcs=no
16522else
Matthias Kloseb9621712010-04-24 17:59:49 +000016523 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016527fi
16528
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016529fi
16530
Matthias Kloseb9621712010-04-24 17:59:49 +000016531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16532$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016533if test "$ac_cv_broken_mbstowcs" = yes
16534then
16535
Matthias Kloseb9621712010-04-24 17:59:49 +000016536$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016537
16538fi
16539
Antoine Pitroub52ec782009-01-25 16:34:23 +000016540# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16542$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016543
16544# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016545if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016546 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016547if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016548then
16549
Matthias Kloseb9621712010-04-24 17:59:49 +000016550$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016551
Matthias Kloseb9621712010-04-24 17:59:49 +000016552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16553$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016554fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016555if test "$withval" = no
16556then
16557
16558$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16559
Matthias Kloseb9621712010-04-24 17:59:49 +000016560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16561$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016562fi
16563
Antoine Pitrou042b1282010-08-13 21:15:58 +000016564else
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16566$as_echo "no value specified" >&6; }
16567fi
16568
Antoine Pitroub52ec782009-01-25 16:34:23 +000016569
Matthias Kloseb17289e2012-03-15 19:51:34 +010016570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16571$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16572if ${ac_cv_computed_gotos+:} false; then :
16573 $as_echo_n "(cached) " >&6
16574else
16575 if test "$cross_compiling" = yes; then :
16576 if test "${with_computed_gotos+set}" = set; then
16577 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16578 else
16579 ac_cv_computed_gotos=no
16580 fi
16581else
16582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h. */
16584
16585int main(int argc, char **argv)
16586{
16587 static void *targets[1] = { &&LABEL1 };
16588 goto LABEL2;
16589LABEL1:
16590 return 0;
16591LABEL2:
16592 goto *targets[0];
16593 return 1;
16594}
16595
16596_ACEOF
16597if ac_fn_c_try_run "$LINENO"; then :
16598 ac_cv_computed_gotos=yes
16599else
16600 ac_cv_computed_gotos=no
16601fi
16602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16603 conftest.$ac_objext conftest.beam conftest.$ac_ext
16604fi
16605
16606fi
16607
16608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16609$as_echo "$ac_cv_computed_gotos" >&6; }
16610case "$ac_cv_computed_gotos" in yes*)
16611
16612$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16613
16614esac
16615
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016616case $ac_sys_system in
16617AIX*)
16618
16619$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16620 ;;
16621esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016622
Michael W. Hudson54241132001-12-07 15:38:26 +000016623
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016624
16625
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016626for h in `(cd $srcdir;echo Python/thread_*.h)`
16627do
16628 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16629done
16630
Michael W. Hudson54241132001-12-07 15:38:26 +000016631
Victor Stinner21a74a92019-04-11 22:28:12 +020016632SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16634$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016635for dir in $SRCDIRS; do
16636 if test ! -d $dir; then
16637 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016638 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016639done
Matthias Kloseb9621712010-04-24 17:59:49 +000016640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16641$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016642
Stefan Krah1919b7e2012-03-21 18:25:23 +010016643# Availability of -O2:
16644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16645$as_echo_n "checking for -O2... " >&6; }
16646saved_cflags="$CFLAGS"
16647CFLAGS="-O2"
16648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16649/* end confdefs.h. */
16650
16651int
16652main ()
16653{
16654
16655
16656 ;
16657 return 0;
16658}
16659_ACEOF
16660if ac_fn_c_try_compile "$LINENO"; then :
16661 have_O2=yes
16662else
16663 have_O2=no
16664fi
16665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16667$as_echo "$have_O2" >&6; }
16668CFLAGS="$saved_cflags"
16669
16670# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16671# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16673$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16674saved_cflags="$CFLAGS"
16675CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16676if test "$have_O2" = no; then
16677 CFLAGS=""
16678fi
16679if test "$cross_compiling" = yes; then :
16680 have_glibc_memmove_bug=undefined
16681else
16682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16683/* end confdefs.h. */
16684
16685#include <stdio.h>
16686#include <stdlib.h>
16687#include <string.h>
16688void foo(void *p, void *q) { memmove(p, q, 19); }
16689int main() {
16690 char a[32] = "123456789000000000";
16691 foo(&a[9], a);
16692 if (strcmp(a, "123456789123456789000000000") != 0)
16693 return 1;
16694 foo(a, &a[9]);
16695 if (strcmp(a, "123456789000000000") != 0)
16696 return 1;
16697 return 0;
16698}
16699
16700_ACEOF
16701if ac_fn_c_try_run "$LINENO"; then :
16702 have_glibc_memmove_bug=no
16703else
16704 have_glibc_memmove_bug=yes
16705fi
16706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16707 conftest.$ac_objext conftest.beam conftest.$ac_ext
16708fi
16709
16710CFLAGS="$saved_cflags"
16711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16712$as_echo "$have_glibc_memmove_bug" >&6; }
16713if test "$have_glibc_memmove_bug" = yes; then
16714
16715$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16716
16717fi
16718
16719if test "$have_gcc_asm_for_x87" = yes; then
16720 # Some versions of gcc miscompile inline asm:
16721 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16722 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16723 case $CC in
16724 *gcc*)
16725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16726$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16727 saved_cflags="$CFLAGS"
16728 CFLAGS="-O2"
16729 if test "$cross_compiling" = yes; then :
16730 have_ipa_pure_const_bug=undefined
16731else
16732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16733/* end confdefs.h. */
16734
16735 __attribute__((noinline)) int
16736 foo(int *p) {
16737 int r;
16738 asm ( "movl \$6, (%1)\n\t"
16739 "xorl %0, %0\n\t"
16740 : "=r" (r) : "r" (p) : "memory"
16741 );
16742 return r;
16743 }
16744 int main() {
16745 int p = 8;
16746 if ((foo(&p) ? : p) != 6)
16747 return 1;
16748 return 0;
16749 }
16750
16751_ACEOF
16752if ac_fn_c_try_run "$LINENO"; then :
16753 have_ipa_pure_const_bug=no
16754else
16755 have_ipa_pure_const_bug=yes
16756fi
16757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16758 conftest.$ac_objext conftest.beam conftest.$ac_ext
16759fi
16760
16761 CFLAGS="$saved_cflags"
16762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16763$as_echo "$have_ipa_pure_const_bug" >&6; }
16764 if test "$have_ipa_pure_const_bug" = yes; then
16765
16766$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16767
16768 fi
16769 ;;
16770 esac
16771fi
16772
Victor Stinner4f5366e2015-01-09 02:13:19 +010016773# Check for stdatomic.h
16774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16775$as_echo_n "checking for stdatomic.h... " >&6; }
16776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16777/* end confdefs.h. */
16778
16779
16780 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016781 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016782 int main() {
16783 int loaded_value = atomic_load(&value);
16784 return 0;
16785 }
16786
16787
16788_ACEOF
16789if ac_fn_c_try_link "$LINENO"; then :
16790 have_stdatomic_h=yes
16791else
16792 have_stdatomic_h=no
16793fi
16794rm -f core conftest.err conftest.$ac_objext \
16795 conftest$ac_exeext conftest.$ac_ext
16796
16797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16798$as_echo "$have_stdatomic_h" >&6; }
16799
16800if test "$have_stdatomic_h" = yes; then
16801
16802$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16803
16804fi
16805
16806# Check for GCC >= 4.7 __atomic builtins
16807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16808$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16810/* end confdefs.h. */
16811
16812
16813 volatile int val = 1;
16814 int main() {
16815 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16816 return 0;
16817 }
16818
16819
16820_ACEOF
16821if ac_fn_c_try_link "$LINENO"; then :
16822 have_builtin_atomic=yes
16823else
16824 have_builtin_atomic=no
16825fi
16826rm -f core conftest.err conftest.$ac_objext \
16827 conftest$ac_exeext conftest.$ac_ext
16828
16829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16830$as_echo "$have_builtin_atomic" >&6; }
16831
16832if test "$have_builtin_atomic" = yes; then
16833
16834$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16835
16836fi
16837
Ned Deily322f5ba2013-11-21 23:01:59 -080016838# ensurepip option
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16840$as_echo_n "checking for ensurepip... " >&6; }
16841
16842# Check whether --with-ensurepip was given.
16843if test "${with_ensurepip+set}" = set; then :
16844 withval=$with_ensurepip;
16845else
16846 with_ensurepip=upgrade
16847fi
16848
16849case $with_ensurepip in #(
16850 yes|upgrade) :
16851 ENSUREPIP=upgrade ;; #(
16852 install) :
16853 ENSUREPIP=install ;; #(
16854 no) :
16855 ENSUREPIP=no ;; #(
16856 *) :
16857 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16858esac
16859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16860$as_echo "$ENSUREPIP" >&6; }
16861
16862
Victor Stinner35a97c02015-03-08 02:59:09 +010016863# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16865$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16867/* end confdefs.h. */
16868
16869
16870 #include <dirent.h>
16871
16872 int main() {
16873 struct dirent entry;
16874 return entry.d_type == DT_UNKNOWN;
16875 }
16876
16877
16878_ACEOF
16879if ac_fn_c_try_link "$LINENO"; then :
16880 have_dirent_d_type=yes
16881else
16882 have_dirent_d_type=no
16883fi
16884rm -f core conftest.err conftest.$ac_objext \
16885 conftest$ac_exeext conftest.$ac_ext
16886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16887$as_echo "$have_dirent_d_type" >&6; }
16888
16889if test "$have_dirent_d_type" = yes; then
16890
16891$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16892
16893fi
16894
Victor Stinner9eb57c52015-03-19 22:21:49 +010016895# check if the Linux getrandom() syscall is available
16896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16897$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16899/* end confdefs.h. */
16900
16901
Victor Stinner1b80b242016-04-12 22:34:58 +020016902 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016903 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016904 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016905
16906 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016907 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016908 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016909 const int flags = GRND_NONBLOCK;
16910 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016911 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016912 return 0;
16913 }
16914
16915
16916_ACEOF
16917if ac_fn_c_try_link "$LINENO"; then :
16918 have_getrandom_syscall=yes
16919else
16920 have_getrandom_syscall=no
16921fi
16922rm -f core conftest.err conftest.$ac_objext \
16923 conftest$ac_exeext conftest.$ac_ext
16924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16925$as_echo "$have_getrandom_syscall" >&6; }
16926
16927if test "$have_getrandom_syscall" = yes; then
16928
16929$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16930
16931fi
16932
Victor Stinner3abf44e2015-09-18 15:38:37 +020016933# check if the getrandom() function is available
16934# the test was written for the Solaris function of <sys/random.h>
16935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16936$as_echo_n "checking for the getrandom() function... " >&6; }
16937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16938/* end confdefs.h. */
16939
16940
16941 #include <sys/random.h>
16942
16943 int main() {
16944 char buffer[1];
16945 const size_t buflen = sizeof(buffer);
16946 const int flags = 0;
16947 /* ignore the result, Python checks for ENOSYS at runtime */
16948 (void)getrandom(buffer, buflen, flags);
16949 return 0;
16950 }
16951
16952
16953_ACEOF
16954if ac_fn_c_try_link "$LINENO"; then :
16955 have_getrandom=yes
16956else
16957 have_getrandom=no
16958fi
16959rm -f core conftest.err conftest.$ac_objext \
16960 conftest$ac_exeext conftest.$ac_ext
16961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16962$as_echo "$have_getrandom" >&6; }
16963
16964if test "$have_getrandom" = yes; then
16965
16966$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16967
16968fi
16969
Neil Schemenauer5741c452019-02-08 10:48:46 -080016970# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16971# shm_* may only be available if linking against librt
16972save_LIBS="$LIBS"
16973save_includes_default="$ac_includes_default"
16974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16975$as_echo_n "checking for library containing shm_open... " >&6; }
16976if ${ac_cv_search_shm_open+:} false; then :
16977 $as_echo_n "(cached) " >&6
16978else
16979 ac_func_search_save_LIBS=$LIBS
16980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16981/* end confdefs.h. */
16982
16983/* Override any GCC internal prototype to avoid an error.
16984 Use char because int might match the return type of a GCC
16985 builtin and then its argument prototype would still apply. */
16986#ifdef __cplusplus
16987extern "C"
16988#endif
16989char shm_open ();
16990int
16991main ()
16992{
16993return shm_open ();
16994 ;
16995 return 0;
16996}
16997_ACEOF
16998for ac_lib in '' rt; do
16999 if test -z "$ac_lib"; then
17000 ac_res="none required"
17001 else
17002 ac_res=-l$ac_lib
17003 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17004 fi
17005 if ac_fn_c_try_link "$LINENO"; then :
17006 ac_cv_search_shm_open=$ac_res
17007fi
17008rm -f core conftest.err conftest.$ac_objext \
17009 conftest$ac_exeext
17010 if ${ac_cv_search_shm_open+:} false; then :
17011 break
17012fi
17013done
17014if ${ac_cv_search_shm_open+:} false; then :
17015
17016else
17017 ac_cv_search_shm_open=no
17018fi
17019rm conftest.$ac_ext
17020LIBS=$ac_func_search_save_LIBS
17021fi
17022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
17023$as_echo "$ac_cv_search_shm_open" >&6; }
17024ac_res=$ac_cv_search_shm_open
17025if test "$ac_res" != no; then :
17026 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17027
17028fi
17029
17030if test "$ac_cv_search_shm_open" = "-lrt"; then
17031
17032$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17033
17034fi
17035for ac_header in sys/mman.h
17036do :
17037 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17038if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17039 cat >>confdefs.h <<_ACEOF
17040#define HAVE_SYS_MMAN_H 1
17041_ACEOF
17042
17043fi
17044
17045done
17046
17047# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17048ac_includes_default="\
17049${ac_includes_default}
17050#ifndef __cplusplus
17051# ifdef HAVE_SYS_MMAN_H
17052# include <sys/mman.h>
17053# endif
17054#endif
17055"
17056for ac_func in shm_open shm_unlink
17057do :
17058 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17059ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17060if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17061 cat >>confdefs.h <<_ACEOF
17062#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17063_ACEOF
17064
17065fi
17066done
17067
17068# we don't want to link with librt always, restore LIBS
17069LIBS="$save_LIBS"
17070ac_includes_default="$save_includes_default"
17071
Christian Heimesff5be6e2018-01-20 13:19:21 +010017072# Check for usable OpenSSL
17073
17074 found=false
17075
17076# Check whether --with-openssl was given.
17077if test "${with_openssl+set}" = set; then :
17078 withval=$with_openssl;
17079 case "$withval" in
17080 "" | y | ye | yes | n | no)
17081 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17082 ;;
17083 *) ssldirs="$withval"
17084 ;;
17085 esac
17086
17087else
17088
17089 # if pkg-config is installed and openssl has installed a .pc file,
17090 # then use that information and don't search ssldirs
17091 if test -n "$ac_tool_prefix"; then
17092 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17093set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17095$as_echo_n "checking for $ac_word... " >&6; }
17096if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17097 $as_echo_n "(cached) " >&6
17098else
17099 if test -n "$PKG_CONFIG"; then
17100 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17101else
17102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17103for as_dir in $PATH
17104do
17105 IFS=$as_save_IFS
17106 test -z "$as_dir" && as_dir=.
17107 for ac_exec_ext in '' $ac_executable_extensions; do
17108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17109 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17111 break 2
17112 fi
17113done
17114 done
17115IFS=$as_save_IFS
17116
17117fi
17118fi
17119PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17120if test -n "$PKG_CONFIG"; then
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17122$as_echo "$PKG_CONFIG" >&6; }
17123else
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17125$as_echo "no" >&6; }
17126fi
17127
17128
17129fi
17130if test -z "$ac_cv_prog_PKG_CONFIG"; then
17131 ac_ct_PKG_CONFIG=$PKG_CONFIG
17132 # Extract the first word of "pkg-config", so it can be a program name with args.
17133set dummy pkg-config; ac_word=$2
17134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17135$as_echo_n "checking for $ac_word... " >&6; }
17136if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17137 $as_echo_n "(cached) " >&6
17138else
17139 if test -n "$ac_ct_PKG_CONFIG"; then
17140 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17141else
17142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17143for as_dir in $PATH
17144do
17145 IFS=$as_save_IFS
17146 test -z "$as_dir" && as_dir=.
17147 for ac_exec_ext in '' $ac_executable_extensions; do
17148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17149 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17151 break 2
17152 fi
17153done
17154 done
17155IFS=$as_save_IFS
17156
17157fi
17158fi
17159ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17160if test -n "$ac_ct_PKG_CONFIG"; then
17161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17162$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17163else
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17165$as_echo "no" >&6; }
17166fi
17167
17168 if test "x$ac_ct_PKG_CONFIG" = x; then
17169 PKG_CONFIG=""
17170 else
17171 case $cross_compiling:$ac_tool_warned in
17172yes:)
17173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17175ac_tool_warned=yes ;;
17176esac
17177 PKG_CONFIG=$ac_ct_PKG_CONFIG
17178 fi
17179else
17180 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17181fi
17182
17183 if test x"$PKG_CONFIG" != x""; then
17184 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17185 if test $? = 0; then
17186 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17187 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17188 found=true
17189 fi
17190 fi
17191
17192 # no such luck; use some default ssldirs
17193 if ! $found; then
17194 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17195 fi
17196
17197
17198fi
17199
17200
17201
17202 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17203 # an 'openssl' subdirectory
17204
17205 if ! $found; then
17206 OPENSSL_INCLUDES=
17207 for ssldir in $ssldirs; do
17208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17209$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17210 if test -f "$ssldir/include/openssl/ssl.h"; then
17211 OPENSSL_INCLUDES="-I$ssldir/include"
17212 OPENSSL_LDFLAGS="-L$ssldir/lib"
17213 OPENSSL_LIBS="-lssl -lcrypto"
17214 found=true
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17216$as_echo "yes" >&6; }
17217 break
17218 else
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17220$as_echo "no" >&6; }
17221 fi
17222 done
17223
17224 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17225 # it will just work!
17226 fi
17227
17228 # try the preprocessor and linker with our new flags,
17229 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17230
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17232$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17233 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17234 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17235
17236 save_LIBS="$LIBS"
17237 save_LDFLAGS="$LDFLAGS"
17238 save_CPPFLAGS="$CPPFLAGS"
17239 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17240 LIBS="$OPENSSL_LIBS $LIBS"
17241 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17243/* end confdefs.h. */
17244#include <openssl/ssl.h>
17245int
17246main ()
17247{
17248SSL_new(NULL)
17249 ;
17250 return 0;
17251}
17252_ACEOF
17253if ac_fn_c_try_link "$LINENO"; then :
17254
17255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17256$as_echo "yes" >&6; }
17257 have_openssl=yes
17258
17259else
17260
17261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17262$as_echo "no" >&6; }
17263 have_openssl=no
17264
17265fi
17266rm -f core conftest.err conftest.$ac_objext \
17267 conftest$ac_exeext conftest.$ac_ext
17268 CPPFLAGS="$save_CPPFLAGS"
17269 LDFLAGS="$save_LDFLAGS"
17270 LIBS="$save_LIBS"
17271
17272
17273
17274
17275
17276
17277if test "$have_openssl" = yes; then
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17279$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17280
17281 save_LIBS="$LIBS"
17282 save_LDFLAGS="$LDFLAGS"
17283 save_CPPFLAGS="$CPPFLAGS"
17284 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17285 LIBS="$OPENSSL_LIBS $LIBS"
17286 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17287
17288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17289/* end confdefs.h. */
17290
17291 #include <openssl/x509_vfy.h>
17292
17293int
17294main ()
17295{
17296
17297 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17298 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17299 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17300 X509_VERIFY_PARAM_set_hostflags(p, 0);
17301
17302 ;
17303 return 0;
17304}
17305
17306_ACEOF
17307if ac_fn_c_try_link "$LINENO"; then :
17308
17309 ac_cv_has_x509_verify_param_set1_host=yes
17310
17311else
17312
17313 ac_cv_has_x509_verify_param_set1_host=no
17314
17315fi
17316rm -f core conftest.err conftest.$ac_objext \
17317 conftest$ac_exeext conftest.$ac_ext
17318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17319$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17320 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17321
17322$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17323
17324 fi
17325
17326 CPPFLAGS="$save_CPPFLAGS"
17327 LDFLAGS="$save_LDFLAGS"
17328 LIBS="$save_LIBS"
17329fi
17330
Christian Heimes892d66e2018-01-29 14:10:18 +010017331# ssl module default cipher suite string
17332
17333
17334
17335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17336$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17337
17338# Check whether --with-ssl-default-suites was given.
17339if test "${with_ssl_default_suites+set}" = set; then :
17340 withval=$with_ssl_default_suites;
17341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17342$as_echo "$withval" >&6; }
17343case "$withval" in
17344 python)
17345 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17346
17347 ;;
17348 openssl)
17349 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17350
17351 ;;
17352 *)
17353 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17354
17355 cat >>confdefs.h <<_ACEOF
17356#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17357_ACEOF
17358
17359 ;;
17360esac
17361
17362else
17363
17364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17365$as_echo "python" >&6; }
17366$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17367
17368
17369fi
17370
17371
17372
Guido van Rossum627b2d71993-12-24 10:39:16 +000017373# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017374ac_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 +000017375
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017376ac_config_files="$ac_config_files Modules/ld_so_aix"
17377
Martin v. Löwis11437992002-04-12 09:54:03 +000017378cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017379# This file is a shell script that caches the results of configure
17380# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017381# scripts and configure runs, see configure's option --config-cache.
17382# It is not useful on other systems. If it contains results you don't
17383# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017384#
Martin v. Löwis11437992002-04-12 09:54:03 +000017385# config.status only pays attention to the cache file if you give it
17386# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017387#
Skip Montanaro6dead952003-09-25 14:50:04 +000017388# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017389# loading this file, other *unset* `ac_cv_foo' will be assigned the
17390# following values.
17391
17392_ACEOF
17393
Guido van Rossumf78abae1997-01-21 22:02:36 +000017394# The following way of writing the cache mishandles newlines in values,
17395# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017397# Ultrix sh set writes to stderr and can't be redirected directly,
17398# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399(
17400 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17401 eval ac_val=\$$ac_var
17402 case $ac_val in #(
17403 *${as_nl}*)
17404 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017405 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17406$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 esac
17408 case $ac_var in #(
17409 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17411 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412 esac ;;
17413 esac
17414 done
17415
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17418 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017419 # `set' does not quote correctly, so add quotes: double-quote
17420 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017422 "s/'/'\\\\''/g;
17423 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 *)
17426 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 esac |
17430 sort
17431) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017432 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017434 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17437 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17439 :end' >>confcache
17440if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17441 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017442 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17444$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017445 if test ! -f "$cache_file" || test -h "$cache_file"; then
17446 cat confcache >"$cache_file"
17447 else
17448 case $cache_file in #(
17449 */* | ?:*)
17450 mv -f confcache "$cache_file"$$ &&
17451 mv -f "$cache_file"$$ "$cache_file" ;; #(
17452 *)
17453 mv -f confcache "$cache_file" ;;
17454 esac
17455 fi
17456 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017457 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17459$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017460 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017461fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017462rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017463
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017464test "x$prefix" = xNONE && prefix=$ac_default_prefix
17465# Let make expand exec_prefix.
17466test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017468DEFS=-DHAVE_CONFIG_H
17469
Skip Montanaro6dead952003-09-25 14:50:04 +000017470ac_libobjs=
17471ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017472U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017473for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17474 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17478 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017479 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17480 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017481done
17482LIBOBJS=$ac_libobjs
17483
17484LTLIBOBJS=$ac_ltlibobjs
17485
17486
Martin v. Löwis11437992002-04-12 09:54:03 +000017487
Matthias Kloseb9621712010-04-24 17:59:49 +000017488
Victor Stinnere0be4232011-10-25 13:06:09 +020017489: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017490ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017491ac_clean_files_save=$ac_clean_files
17492ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017493{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17494$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17495as_write_fail=0
17496cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017497#! $SHELL
17498# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017499# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017500# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017501# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017504ac_cs_recheck=false
17505ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017506
Matthias Kloseb9621712010-04-24 17:59:49 +000017507SHELL=\${CONFIG_SHELL-$SHELL}
17508export SHELL
17509_ASEOF
17510cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17511## -------------------- ##
17512## M4sh Initialization. ##
17513## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515# Be more Bourne compatible
17516DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017517if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 emulate sh
17519 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017520 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017521 # is contrary to our usage. Disable this feature.
17522 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017524else
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 case `(set -o) 2>/dev/null` in #(
17526 *posix*) :
17527 set -o posix ;; #(
17528 *) :
17529 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017531fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017532
17533
Matthias Kloseb9621712010-04-24 17:59:49 +000017534as_nl='
17535'
17536export as_nl
17537# Printing a long string crashes Solaris 7 /usr/bin/printf.
17538as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17539as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17540as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17541# Prefer a ksh shell builtin over an external printf program on Solaris,
17542# but without wasting forks for bash or zsh.
17543if test -z "$BASH_VERSION$ZSH_VERSION" \
17544 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17545 as_echo='print -r --'
17546 as_echo_n='print -rn --'
17547elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17548 as_echo='printf %s\n'
17549 as_echo_n='printf %s'
17550else
17551 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17552 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17553 as_echo_n='/usr/ucb/echo -n'
17554 else
17555 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17556 as_echo_n_body='eval
17557 arg=$1;
17558 case $arg in #(
17559 *"$as_nl"*)
17560 expr "X$arg" : "X\\(.*\\)$as_nl";
17561 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17562 esac;
17563 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17564 '
17565 export as_echo_n_body
17566 as_echo_n='sh -c $as_echo_n_body as_echo'
17567 fi
17568 export as_echo_body
17569 as_echo='sh -c $as_echo_body as_echo'
17570fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017571
17572# The user is always right.
17573if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017574 PATH_SEPARATOR=:
17575 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17576 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17577 PATH_SEPARATOR=';'
17578 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581
17582# IFS
17583# We need space, tab and new line, in precisely that order. Quoting is
17584# there to prevent editors from complaining about space-tab.
17585# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17586# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587IFS=" "" $as_nl"
17588
17589# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017590as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017591case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592 *[\\/]* ) as_myself=$0 ;;
17593 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017594for as_dir in $PATH
17595do
17596 IFS=$as_save_IFS
17597 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017598 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17599 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017600IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 ;;
17603esac
17604# We did not find ourselves, most probably we were run as `sh COMMAND'
17605# in which case we are not to be found in the path.
17606if test "x$as_myself" = x; then
17607 as_myself=$0
17608fi
17609if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017610 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17611 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612fi
17613
Matthias Kloseb9621712010-04-24 17:59:49 +000017614# Unset variables that we do not need and which cause bugs (e.g. in
17615# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17616# suppresses any "Segmentation fault" message there. '((' could
17617# trigger a bug in pdksh 5.2.14.
17618for as_var in BASH_ENV ENV MAIL MAILPATH
17619do eval test x\${$as_var+set} = xset \
17620 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621done
17622PS1='$ '
17623PS2='> '
17624PS4='+ '
17625
17626# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017627LC_ALL=C
17628export LC_ALL
17629LANGUAGE=C
17630export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631
Matthias Kloseb9621712010-04-24 17:59:49 +000017632# CDPATH.
17633(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17634
17635
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017636# as_fn_error STATUS ERROR [LINENO LOG_FD]
17637# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017638# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17639# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017640# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017641as_fn_error ()
17642{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017643 as_status=$1; test $as_status -eq 0 && as_status=1
17644 if test "$4"; then
17645 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17646 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017647 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017648 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017649 as_fn_exit $as_status
17650} # as_fn_error
17651
17652
17653# as_fn_set_status STATUS
17654# -----------------------
17655# Set $? to STATUS, without forking.
17656as_fn_set_status ()
17657{
17658 return $1
17659} # as_fn_set_status
17660
17661# as_fn_exit STATUS
17662# -----------------
17663# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17664as_fn_exit ()
17665{
17666 set +e
17667 as_fn_set_status $1
17668 exit $1
17669} # as_fn_exit
17670
17671# as_fn_unset VAR
17672# ---------------
17673# Portably unset VAR.
17674as_fn_unset ()
17675{
17676 { eval $1=; unset $1;}
17677}
17678as_unset=as_fn_unset
17679# as_fn_append VAR VALUE
17680# ----------------------
17681# Append the text in VALUE to the end of the definition contained in VAR. Take
17682# advantage of any shell optimizations that allow amortized linear growth over
17683# repeated appends, instead of the typical quadratic growth present in naive
17684# implementations.
17685if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17686 eval 'as_fn_append ()
17687 {
17688 eval $1+=\$2
17689 }'
17690else
17691 as_fn_append ()
17692 {
17693 eval $1=\$$1\$2
17694 }
17695fi # as_fn_append
17696
17697# as_fn_arith ARG...
17698# ------------------
17699# Perform arithmetic evaluation on the ARGs, and store the result in the
17700# global $as_val. Take advantage of shells that can avoid forks. The arguments
17701# must be portable across $(()) and expr.
17702if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17703 eval 'as_fn_arith ()
17704 {
17705 as_val=$(( $* ))
17706 }'
17707else
17708 as_fn_arith ()
17709 {
17710 as_val=`expr "$@" || test $? -eq 1`
17711 }
17712fi # as_fn_arith
17713
17714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715if expr a : '\(a\)' >/dev/null 2>&1 &&
17716 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17717 as_expr=expr
17718else
17719 as_expr=false
17720fi
17721
17722if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17723 as_basename=basename
17724else
17725 as_basename=false
17726fi
17727
Matthias Kloseb9621712010-04-24 17:59:49 +000017728if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17729 as_dirname=dirname
17730else
17731 as_dirname=false
17732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734as_me=`$as_basename -- "$0" ||
17735$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17736 X"$0" : 'X\(//\)$' \| \
17737 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017738$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739 sed '/^.*\/\([^/][^/]*\)\/*$/{
17740 s//\1/
17741 q
17742 }
17743 /^X\/\(\/\/\)$/{
17744 s//\1/
17745 q
17746 }
17747 /^X\/\(\/\).*/{
17748 s//\1/
17749 q
17750 }
17751 s/.*/./; q'`
17752
Matthias Kloseb9621712010-04-24 17:59:49 +000017753# Avoid depending upon Character Ranges.
17754as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17755as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17756as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17757as_cr_digits='0123456789'
17758as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759
17760ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017761case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017765 xy) ECHO_C='\c';;
17766 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17767 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 esac;;
17769*)
17770 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017772
Martin v. Löwis11437992002-04-12 09:54:03 +000017773rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774if test -d conf$$.dir; then
17775 rm -f conf$$.dir/conf$$.file
17776else
17777 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017780if (echo >conf$$.file) 2>/dev/null; then
17781 if ln -s conf$$.file conf$$ 2>/dev/null; then
17782 as_ln_s='ln -s'
17783 # ... but there are two gotchas:
17784 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17785 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017786 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017787 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017788 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017789 elif ln conf$$.file conf$$ 2>/dev/null; then
17790 as_ln_s=ln
17791 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017792 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017794else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017795 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17798rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017799
Matthias Kloseb9621712010-04-24 17:59:49 +000017800
17801# as_fn_mkdir_p
17802# -------------
17803# Create "$as_dir" as a directory, including parents if necessary.
17804as_fn_mkdir_p ()
17805{
17806
17807 case $as_dir in #(
17808 -*) as_dir=./$as_dir;;
17809 esac
17810 test -d "$as_dir" || eval $as_mkdir_p || {
17811 as_dirs=
17812 while :; do
17813 case $as_dir in #(
17814 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17815 *) as_qdir=$as_dir;;
17816 esac
17817 as_dirs="'$as_qdir' $as_dirs"
17818 as_dir=`$as_dirname -- "$as_dir" ||
17819$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17820 X"$as_dir" : 'X\(//\)[^/]' \| \
17821 X"$as_dir" : 'X\(//\)$' \| \
17822 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17823$as_echo X"$as_dir" |
17824 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17825 s//\1/
17826 q
17827 }
17828 /^X\(\/\/\)[^/].*/{
17829 s//\1/
17830 q
17831 }
17832 /^X\(\/\/\)$/{
17833 s//\1/
17834 q
17835 }
17836 /^X\(\/\).*/{
17837 s//\1/
17838 q
17839 }
17840 s/.*/./; q'`
17841 test -d "$as_dir" && break
17842 done
17843 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017844 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017845
17846
17847} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017848if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017849 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017850else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017851 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017852 as_mkdir_p=false
17853fi
17854
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017855
17856# as_fn_executable_p FILE
17857# -----------------------
17858# Test if FILE is an executable regular file.
17859as_fn_executable_p ()
17860{
17861 test -f "$1" && test -x "$1"
17862} # as_fn_executable_p
17863as_test_x='test -x'
17864as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
17866# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017867as_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 +000017868
17869# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017870as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017871
17872
Martin v. Löwis11437992002-04-12 09:54:03 +000017873exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017874## ----------------------------------- ##
17875## Main body of $CONFIG_STATUS script. ##
17876## ----------------------------------- ##
17877_ASEOF
17878test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017879
Matthias Kloseb9621712010-04-24 17:59:49 +000017880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17881# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017882# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017883# values after options handling.
17884ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017885This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017886generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017887
17888 CONFIG_FILES = $CONFIG_FILES
17889 CONFIG_HEADERS = $CONFIG_HEADERS
17890 CONFIG_LINKS = $CONFIG_LINKS
17891 CONFIG_COMMANDS = $CONFIG_COMMANDS
17892 $ $0 $@
17893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894on `(hostname || uname -n) 2>/dev/null | sed 1q`
17895"
17896
Martin v. Löwis11437992002-04-12 09:54:03 +000017897_ACEOF
17898
Matthias Kloseb9621712010-04-24 17:59:49 +000017899case $ac_config_files in *"
17900"*) set x $ac_config_files; shift; ac_config_files=$*;;
17901esac
17902
17903case $ac_config_headers in *"
17904"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17905esac
17906
17907
17908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017909# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017910config_files="$ac_config_files"
17911config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017916ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017917\`$as_me' instantiates files and other configuration actions
17918from templates according to the current configuration. Unless the files
17919and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017920
Matthias Kloseb9621712010-04-24 17:59:49 +000017921Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
17923 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017925 --config print configuration, then exit
17926 -q, --quiet, --silent
17927 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 -d, --debug don't remove temporary files
17929 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017930 --file=FILE[:TEMPLATE]
17931 instantiate the configuration file FILE
17932 --header=FILE[:TEMPLATE]
17933 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017934
17935Configuration files:
17936$config_files
17937
17938Configuration headers:
17939$config_headers
17940
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017941Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017944cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17945ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017946ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017947python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017948configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017949 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017950
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017951Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017952This config.status script is free software; the Free Software Foundation
17953gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954
17955ac_pwd='$ac_pwd'
17956srcdir='$srcdir'
17957INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017958MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017959test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017960_ACEOF
17961
Matthias Kloseb9621712010-04-24 17:59:49 +000017962cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17963# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017964ac_need_defaults=:
17965while test $# != 0
17966do
17967 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017968 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17970 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017971 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017973 --*=)
17974 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17975 ac_optarg=
17976 ac_shift=:
17977 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017979 ac_option=$1
17980 ac_optarg=$2
17981 ac_shift=shift
17982 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 esac
17984
Skip Montanaro6dead952003-09-25 14:50:04 +000017985 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017986 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017987 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17988 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017990 $as_echo "$ac_cs_version"; exit ;;
17991 --config | --confi | --conf | --con | --co | --c )
17992 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017993 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 debug=: ;;
17995 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017996 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017997 case $ac_optarg in
17998 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017999 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000018000 esac
18001 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 ac_need_defaults=false;;
18003 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018004 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000018005 case $ac_optarg in
18006 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18007 esac
18008 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018009 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010 --he | --h)
18011 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018012 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018013Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018015 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18017 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18018 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018019
18020 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018021 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018022Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018023
Matthias Kloseb9621712010-04-24 17:59:49 +000018024 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018026
18027 esac
18028 shift
18029done
18030
Skip Montanaro6dead952003-09-25 14:50:04 +000018031ac_configure_extra_args=
18032
18033if $ac_cs_silent; then
18034 exec 6>/dev/null
18035 ac_configure_extra_args="$ac_configure_extra_args --silent"
18036fi
18037
18038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018040if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018041 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018042 shift
18043 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18044 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018046 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018047fi
18048
Martin v. Löwis11437992002-04-12 09:54:03 +000018049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051exec 5>>config.log
18052{
18053 echo
18054 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18055## Running $as_me. ##
18056_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018057 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018063
Matthias Kloseb9621712010-04-24 17:59:49 +000018064cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065
18066# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018067for ac_config_target in $ac_config_targets
18068do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 case $ac_config_target in
18070 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18071 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18072 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018073 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18074 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018076 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018077 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018078 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018079 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080
Victor Stinnere0be4232011-10-25 13:06:09 +020018081 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 esac
18083done
18084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018085
Martin v. Löwis11437992002-04-12 09:54:03 +000018086# If the user did not use the arguments to specify the items to instantiate,
18087# then the envvar interface is used. Set only those that are not.
18088# We use the long form for the default assignment because of an extremely
18089# bizarre bug on SunOS 4.1.3.
18090if $ac_need_defaults; then
18091 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18092 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18093fi
18094
Skip Montanaro6dead952003-09-25 14:50:04 +000018095# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018097# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098# Hook for its removal unless debugging.
18099# Note that there is a small window in which the directory will not be cleaned:
18100# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018101$debug ||
18102{
Victor Stinnere0be4232011-10-25 13:06:09 +020018103 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018105 : "${ac_tmp:=$tmp}"
18106 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018109}
Martin v. Löwis11437992002-04-12 09:54:03 +000018110# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018111
Martin v. Löwis11437992002-04-12 09:54:03 +000018112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018114 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018115} ||
18116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117 tmp=./conf$$-$RANDOM
18118 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018119} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018120ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018121
Matthias Kloseb9621712010-04-24 17:59:49 +000018122# Set up the scripts for CONFIG_FILES section.
18123# No need to generate them if there are no CONFIG_FILES.
18124# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018126
Matthias Kloseb9621712010-04-24 17:59:49 +000018127
18128ac_cr=`echo X | tr X '\015'`
18129# On cygwin, bash can eat \r inside `` if the user requested igncr.
18130# But we know of no other shell where ac_cr would be empty at this
18131# point, so we can use a bashism as a fallback.
18132if test "x$ac_cr" = x; then
18133 eval ac_cr=\$\'\\r\'
18134fi
18135ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18136if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018137 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018138else
18139 ac_cs_awk_cr=$ac_cr
18140fi
18141
Victor Stinnere0be4232011-10-25 13:06:09 +020018142echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018143_ACEOF
18144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018145
Matthias Kloseb9621712010-04-24 17:59:49 +000018146{
18147 echo "cat >conf$$subs.awk <<_ACEOF" &&
18148 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18149 echo "_ACEOF"
18150} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018151 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18152ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153ac_delim='%!_!# '
18154for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018155 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018156 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157
Matthias Kloseb9621712010-04-24 17:59:49 +000018158 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18159 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160 break
18161 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018162 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163 else
18164 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018165 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018166done
Matthias Kloseb9621712010-04-24 17:59:49 +000018167rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168
Matthias Kloseb9621712010-04-24 17:59:49 +000018169cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018170cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018172sed -n '
18173h
18174s/^/S["/; s/!.*/"]=/
18175p
18176g
18177s/^[^!]*!//
18178:repl
18179t repl
18180s/'"$ac_delim"'$//
18181t delim
18182:nl
18183h
18184s/\(.\{148\}\)..*/\1/
18185t more1
18186s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18187p
18188n
18189b repl
18190:more1
18191s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18192p
18193g
18194s/.\{148\}//
18195t nl
18196:delim
18197h
18198s/\(.\{148\}\)..*/\1/
18199t more2
18200s/["\\]/\\&/g; s/^/"/; s/$/"/
18201p
18202b
18203:more2
18204s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18205p
18206g
18207s/.\{148\}//
18208t delim
18209' <conf$$subs.awk | sed '
18210/^[^""]/{
18211 N
18212 s/\n//
18213}
18214' >>$CONFIG_STATUS || ac_write_fail=1
18215rm -f conf$$subs.awk
18216cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18217_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018218cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018219 for (key in S) S_is_set[key] = 1
18220 FS = ""
18221
18222}
18223{
18224 line = $ 0
18225 nfields = split(line, field, "@")
18226 substed = 0
18227 len = length(field[1])
18228 for (i = 2; i < nfields; i++) {
18229 key = field[i]
18230 keylen = length(key)
18231 if (S_is_set[key]) {
18232 value = S[key]
18233 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18234 len += length(value) + length(field[++i])
18235 substed = 1
18236 } else
18237 len += 1 + keylen
18238 }
18239
18240 print line
18241}
18242
18243_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18246if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18247 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18248else
18249 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018250fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018251 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252_ACEOF
18253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018254# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18255# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256# trailing colons and then remove the whole line if VPATH becomes empty
18257# (actually we leave an empty line to preserve line numbers).
18258if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018259 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18260h
18261s///
18262s/^/:/
18263s/[ ]*$/:/
18264s/:\$(srcdir):/:/g
18265s/:\${srcdir}:/:/g
18266s/:@srcdir@:/:/g
18267s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018268s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018269x
18270s/\(=[ ]*\).*/\1/
18271G
18272s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273s/^[^=]*=[ ]*$//
18274}'
18275fi
18276
Matthias Kloseb9621712010-04-24 17:59:49 +000018277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018278fi # test -n "$CONFIG_FILES"
18279
Matthias Kloseb9621712010-04-24 17:59:49 +000018280# Set up the scripts for CONFIG_HEADERS section.
18281# No need to generate them if there are no CONFIG_HEADERS.
18282# This happens for instance with `./config.status Makefile'.
18283if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018284cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018285BEGIN {
18286_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287
Matthias Kloseb9621712010-04-24 17:59:49 +000018288# Transform confdefs.h into an awk script `defines.awk', embedded as
18289# here-document in config.status, that substitutes the proper values into
18290# config.h.in to produce config.h.
18291
18292# Create a delimiter string that does not exist in confdefs.h, to ease
18293# handling of long lines.
18294ac_delim='%!_!# '
18295for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018296 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18297 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018298 break
18299 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018300 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018301 else
18302 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18303 fi
18304done
18305
18306# For the awk script, D is an array of macro values keyed by name,
18307# likewise P contains macro parameters if any. Preserve backslash
18308# newline sequences.
18309
18310ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18311sed -n '
18312s/.\{148\}/&'"$ac_delim"'/g
18313t rset
18314:rset
18315s/^[ ]*#[ ]*define[ ][ ]*/ /
18316t def
18317d
18318:def
18319s/\\$//
18320t bsnl
18321s/["\\]/\\&/g
18322s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18323D["\1"]=" \3"/p
18324s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18325d
18326:bsnl
18327s/["\\]/\\&/g
18328s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18329D["\1"]=" \3\\\\\\n"\\/p
18330t cont
18331s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18332t cont
18333d
18334:cont
18335n
18336s/.\{148\}/&'"$ac_delim"'/g
18337t clear
18338:clear
18339s/\\$//
18340t bsnlc
18341s/["\\]/\\&/g; s/^/"/; s/$/"/p
18342d
18343:bsnlc
18344s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18345b cont
18346' <confdefs.h | sed '
18347s/'"$ac_delim"'/"\\\
18348"/g' >>$CONFIG_STATUS || ac_write_fail=1
18349
18350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18351 for (key in D) D_is_set[key] = 1
18352 FS = ""
18353}
18354/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18355 line = \$ 0
18356 split(line, arg, " ")
18357 if (arg[1] == "#") {
18358 defundef = arg[2]
18359 mac1 = arg[3]
18360 } else {
18361 defundef = substr(arg[1], 2)
18362 mac1 = arg[2]
18363 }
18364 split(mac1, mac2, "(") #)
18365 macro = mac2[1]
18366 prefix = substr(line, 1, index(line, defundef) - 1)
18367 if (D_is_set[macro]) {
18368 # Preserve the white space surrounding the "#".
18369 print prefix "define", macro P[macro] D[macro]
18370 next
18371 } else {
18372 # Replace #undef with comments. This is necessary, for example,
18373 # in the case of _POSIX_SOURCE, which is predefined and required
18374 # on some systems where configure will not decide to define it.
18375 if (defundef == "undef") {
18376 print "/*", prefix defundef, macro, "*/"
18377 next
18378 }
18379 }
18380}
18381{ print }
18382_ACAWK
18383_ACEOF
18384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018385 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018386fi # test -n "$CONFIG_HEADERS"
18387
18388
18389eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18390shift
18391for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392do
18393 case $ac_tag in
18394 :[FHLC]) ac_mode=$ac_tag; continue;;
18395 esac
18396 case $ac_mode$ac_tag in
18397 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018398 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399 :[FH]-) ac_tag=-:-;;
18400 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18401 esac
18402 ac_save_IFS=$IFS
18403 IFS=:
18404 set x $ac_tag
18405 IFS=$ac_save_IFS
18406 shift
18407 ac_file=$1
18408 shift
18409
18410 case $ac_mode in
18411 :L) ac_source=$1;;
18412 :[FH])
18413 ac_file_inputs=
18414 for ac_f
18415 do
18416 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018417 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018418 *) # Look for the file first in the build tree, then in the source tree
18419 # (if the path is not absolute). The absolute path cannot be DOS-style,
18420 # because $ac_f cannot contain `:'.
18421 test -f "$ac_f" ||
18422 case $ac_f in
18423 [\\/$]*) false;;
18424 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18425 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018426 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018428 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18429 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018430 done
18431
18432 # Let's still pretend it is `configure' which instantiates (i.e., don't
18433 # use $as_me), people would be surprised to read:
18434 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018435 configure_input='Generated from '`
18436 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18437 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438 if test x"$ac_file" != x-; then
18439 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018440 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18441$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018443 # Neutralize special characters interpreted by sed in replacement strings.
18444 case $configure_input in #(
18445 *\&* | *\|* | *\\* )
18446 ac_sed_conf_input=`$as_echo "$configure_input" |
18447 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18448 *) ac_sed_conf_input=$configure_input;;
18449 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450
18451 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018452 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18453 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 esac
18455 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 esac
18457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018459$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018460 X"$ac_file" : 'X\(//\)[^/]' \| \
18461 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018463$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18465 s//\1/
18466 q
18467 }
18468 /^X\(\/\/\)[^/].*/{
18469 s//\1/
18470 q
18471 }
18472 /^X\(\/\/\)$/{
18473 s//\1/
18474 q
18475 }
18476 /^X\(\/\).*/{
18477 s//\1/
18478 q
18479 }
18480 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018481 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 ac_builddir=.
18483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484case "$ac_dir" in
18485.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18486*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018487 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018489 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490 case $ac_top_builddir_sub in
18491 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18492 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18493 esac ;;
18494esac
18495ac_abs_top_builddir=$ac_pwd
18496ac_abs_builddir=$ac_pwd$ac_dir_suffix
18497# for backward compatibility:
18498ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018499
18500case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018502 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 ac_top_srcdir=$ac_top_builddir_sub
18504 ac_abs_top_srcdir=$ac_pwd ;;
18505 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507 ac_top_srcdir=$srcdir
18508 ac_abs_top_srcdir=$srcdir ;;
18509 *) # Relative name.
18510 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18511 ac_top_srcdir=$ac_top_build_prefix$srcdir
18512 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018513esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018515
Martin v. Löwis11437992002-04-12 09:54:03 +000018516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517 case $ac_mode in
18518 :F)
18519 #
18520 # CONFIG_FILE
18521 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018522
18523 case $INSTALL in
18524 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018527 ac_MKDIR_P=$MKDIR_P
18528 case $MKDIR_P in
18529 [\\/$]* | ?:[\\/]* ) ;;
18530 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18531 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018532_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533
Matthias Kloseb9621712010-04-24 17:59:49 +000018534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535# If the template does not know about datarootdir, expand it.
18536# FIXME: This hack should be removed a few years after 2.60.
18537ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018538ac_sed_dataroot='
18539/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540 p
18541 q
18542}
18543/@datadir@/p
18544/@docdir@/p
18545/@infodir@/p
18546/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018547/@mandir@/p'
18548case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549*datarootdir*) ac_datarootdir_seen=yes;;
18550*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18552$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555 ac_datarootdir_hack='
18556 s&@datadir@&$datadir&g
18557 s&@docdir@&$docdir&g
18558 s&@infodir@&$infodir&g
18559 s&@localedir@&$localedir&g
18560 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018561 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562esac
18563_ACEOF
18564
18565# Neutralize VPATH when `$srcdir' = `.'.
18566# Shell code in configure.ac might set extrasub.
18567# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18569ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018570$extrasub
18571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018573:t
18574/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018575s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018577s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578s&@srcdir@&$ac_srcdir&;t t
18579s&@abs_srcdir@&$ac_abs_srcdir&;t t
18580s&@top_srcdir@&$ac_top_srcdir&;t t
18581s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18582s&@builddir@&$ac_builddir&;t t
18583s&@abs_builddir@&$ac_abs_builddir&;t t
18584s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18585s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018586s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018587$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018588"
Victor Stinnere0be4232011-10-25 13:06:09 +020018589eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18590 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018593 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18594 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18595 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018597which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018598$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018599which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018600
Victor Stinnere0be4232011-10-25 13:06:09 +020018601 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018602 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018603 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18604 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018605 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018606 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018607 ;;
18608 :H)
18609 #
18610 # CONFIG_HEADER
18611 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018613 {
18614 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018615 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18616 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018617 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018618 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018619 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18620$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018621 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018622 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018623 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018624 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 fi
18626 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018627 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018628 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018629 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633
18634 esac
18635
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018636
18637 case $ac_file$ac_mode in
18638 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18639
18640 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641done # for ac_tag
18642
Guido van Rossum627b2d71993-12-24 10:39:16 +000018643
Matthias Kloseb9621712010-04-24 17:59:49 +000018644as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018645_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018646ac_clean_files=$ac_clean_files_save
18647
Matthias Kloseb9621712010-04-24 17:59:49 +000018648test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018649 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018650
Martin v. Löwis11437992002-04-12 09:54:03 +000018651
18652# configure is writing to config.log, and then calls config.status.
18653# config.status does its own redirection, appending to config.log.
18654# Unfortunately, on DOS this fails, as config.log is still kept open
18655# by configure, so config.status won't be able to write to it; its
18656# output is simply discarded. So we exec the FD to /dev/null,
18657# effectively closing config.log, so it can be properly (re)opened and
18658# appended to by config.status. When coming back to configure, we
18659# need to make the FD available again.
18660if test "$no_create" != yes; then
18661 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018662 ac_config_status_args=
18663 test "$silent" = yes &&
18664 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018665 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018666 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018667 exec 5>>config.log
18668 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18669 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018670 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018671fi
18672if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18674$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018675fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018676
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018677
Christian Heimes75ed8902013-11-20 01:11:18 +010018678echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018679if test ! -f Modules/Setup.local
18680then
18681 echo "# Edit this file for local setup changes" >Modules/Setup.local
18682fi
18683
Christian Heimes75ed8902013-11-20 01:11:18 +010018684echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018685$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018686 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018687 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018688mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018689
18690if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18691 echo "" >&6
18692 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018693 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 +000018694 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018695 echo "" >&6
18696 echo "" >&6
18697fi
18698