blob: 8d9c73d1c386bdd98236a39e211bceb160bb2aaa [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
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
703LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000704LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000705RUNSHARED
706INSTSONAME
707LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000708PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BLDLIBRARY
710DLLLIBRARY
711LDLIBRARY
712LIBRARY
713BUILDEXEEXT
714EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200715NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200716MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717PLATFORM_TRIPLET
718MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200719ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720MAINCC
721CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700722SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723GREP
724CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732EXPORT_MACOSX_DEPLOYMENT_TARGET
733CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000735MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000736FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800738FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKALTINSTALLLAST
740FRAMEWORKALTINSTALLFIRST
741FRAMEWORKINSTALLLAST
742FRAMEWORKINSTALLFIRST
743PYTHONFRAMEWORKINSTALLDIR
744PYTHONFRAMEWORKPREFIX
745PYTHONFRAMEWORKDIR
746PYTHONFRAMEWORKIDENTIFIER
747PYTHONFRAMEWORK
748LIPO_32BIT_FLAGS
749ARCH_RUN_32BIT
750UNIVERSALSDK
751CONFIG_ARGS
752SOVERSION
753VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200755PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500764HAS_GIT
765GITBRANCH
766GITTAG
767GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200819with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800825with_memory_sanitizer
826with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_libs
828with_system_expat
829with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100830with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000831enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700832with_tcltk_includes
833with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000838with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858CPP
859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153 ac_prev=sbindir ;;
1154 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
1158 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160 | --sharedst | --shareds | --shared | --share | --shar \
1161 | --sha | --sh)
1162 ac_prev=sharedstatedir ;;
1163 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 -site | --site | --sit)
1170 ac_prev=site ;;
1171 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175 ac_prev=srcdir ;;
1176 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180 | --syscon | --sysco | --sysc | --sys | --sy)
1181 ac_prev=sysconfdir ;;
1182 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192 verbose=yes ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 -version | --version | --versio | --versi | --vers | -V)
1195 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 --x)
1230 # Obsolete; use --with-x.
1231 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1234 | --x-incl | --x-inc | --x-in | --x-i)
1235 ac_prev=x_includes ;;
1236 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1237 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1241 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1242 ac_prev=x_libraries ;;
1243 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1244 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1248Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ;;
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 *=*)
1252 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_envvar in #(
1255 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 export $ac_envvar ;;
1260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001266 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
1269 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270done
1271
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275fi
1276
Matthias Kloseb9621712010-04-24 17:59:49 +00001277if test -n "$ac_unrecognized_opts"; then
1278 case $enable_option_checking in
1279 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282 esac
1283fi
1284
1285# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287 datadir sysconfdir sharedstatedir localstatedir includedir \
1288 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001289 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 # Remove trailing slashes.
1293 case $ac_val in
1294 */ )
1295 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296 eval $ac_var=\$ac_val;;
1297 esac
1298 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 [\\/$]* | ?:[\\/]* ) continue;;
1301 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# There might be people who depend on the old broken behavior: `$host'
1307# used to hold the argument of --host etc.
1308# FIXME: To remove some day.
1309build=$build_alias
1310host=$host_alias
1311target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# FIXME: To remove some day.
1314if test "x$host_alias" != x; then
1315 if test "x$build_alias" = x; then
1316 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
1321
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365 srcdir=..
1366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367else
1368 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001402\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001416 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
Martin v. Löwis11437992002-04-12 09:54:03 +00001422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001462 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001468 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001477 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-framework[=INSTALLDIR]
1479 Build (MacOSX|Darwin) framework
1480 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001481 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001482 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1483 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001484 --enable-loadable-sqlite-extensions
1485 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-ipv6 Enable ipv6 (with ipv4) support
1487 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001488 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491Optional Packages:
1492 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1493 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001494 --with-universal-archs=ARCH
1495 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001496 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1497 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001498 --with-framework-name=FRAMEWORK
1499 specify an alternate name of the framework built
1500 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001506 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001507 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001508 --with-lto Enable Link Time Optimization in any build. Disabled
1509 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001510 --with-hash-algorithm=[fnv|siphash24]
1511 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001512 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001513 enable AddressSanitizer (asan)
1514 --with-memory-sanitizer enable MemorySanitizer (msan)
1515 --with-undefined-behavior-sanitizer
1516 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
1532 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001533 --with(out)-c-locale-coercion
1534 disable/enable C locale coercion to a UTF-8 based
1535 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001536 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001537 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-libm=STRING math library
1539 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001540 --with(out)-computed-gotos
1541 Use computed gotos in evaluation loop (enabled by
1542 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001543 --with(out)-ensurepip=[=upgrade]
1544 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001545 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001546 --with-ssl-default-suites=[python|openssl|STRING]
1547 Override default cipher suites string, python: use
1548 Python's preferred selection (default), openssl:
1549 leave OpenSSL's defaults untouched, STRING: use a
1550 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001634python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily5489bda2018-01-31 17:44:09 -05002343It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Christian Heimesff5be6e2018-01-20 13:19:21 +01002693
2694
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002695if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696 # If we're building out-of-tree, we need to make sure the following
2697 # resources get picked up before their $srcdir counterparts.
2698 # Objects/ -> typeslots.inc
2699 # Include/ -> Python-ast.h, graminit.h
2700 # Python/ -> importlib.h
2701 # (A side effect of this is that these resources will automatically be
2702 # regenerated when building out-of-tree, regardless of whether or not
2703 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2704 # off.)
2705 BASECPPFLAGS="-IObjects -IInclude -IPython"
2706else
2707 BASECPPFLAGS=""
2708fi
2709
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710
2711
2712
2713
Victor Stinner9ed34a82017-05-02 22:35:58 +02002714if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716# Extract the first word of "git", so it can be a program name with args.
2717set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 $as_echo_n "(cached) " >&6
2722else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 if test -n "$HAS_GIT"; then
2724 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725else
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737done
2738 done
2739IFS=$as_save_IFS
2740
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742fi
2743fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744HAS_GIT=$ac_cv_prog_HAS_GIT
2745if test -n "$HAS_GIT"; then
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2747$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2750$as_echo "no" >&6; }
2751fi
2752
2753
2754else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758then
Xiang Zhang4c855572018-08-20 22:36:19 +08002759 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2760 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2761 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763 GITVERSION=""
2764 GITTAG=""
2765 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766fi
2767
2768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif 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/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
doko@python.orga10e4a92013-01-25 18:45:12 +01002873
2874
Ned Deilyfcbc2462014-08-22 13:32:49 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878for ac_prog in python$PACKAGE_VERSION python3 python
2879do
2880 # Extract the first word of "$ac_prog", so it can be a program name with args.
2881set dummy $ac_prog; ac_word=$2
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885 $as_echo_n "(cached) " >&6
2886else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 if test -n "$PYTHON_FOR_REGEN"; then
2888 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889else
2890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891for as_dir in $PATH
2892do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899 break 2
2900 fi
2901done
2902 done
2903IFS=$as_save_IFS
2904
2905fi
2906fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2908if test -n "$PYTHON_FOR_REGEN"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2910$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911else
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913$as_echo "no" >&6; }
2914fi
2915
2916
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
2922
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923if test "$cross_compiling" = yes; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2925$as_echo_n "checking for python interpreter for cross build... " >&6; }
2926 if test -z "$PYTHON_FOR_BUILD"; then
2927 for interp in python$PACKAGE_VERSION python3 python; do
2928 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002929 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 +02002930 break
2931 fi
2932 interp=
2933 done
2934 if test x$interp = x; then
2935 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2936 fi
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2938$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002939 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 +02002940 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2945fi
2946
2947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
Benjamin Petersond23f8222009-04-05 19:13:16 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Ned Deily5489bda2018-01-31 17:44:09 -05002963VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002965# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002966
2967SOVERSION=1.0
2968
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969# The later defininition of _XOPEN_SOURCE disables certain features
2970# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973
2974
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980
2981
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987
2988
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002994
2995
2996
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002997define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002999# Arguments passed to configure.
3000
3001CONFIG_ARGS="$ac_configure_args"
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3004$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003006if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003008 case $enableval in
3009 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003010 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 # information
3012 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003013 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003014 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3016 if test ! -d "${enableval}"
3017 then
3018 enableval=/
3019 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 ;;
3022 esac
3023 case $enableval in
3024 no)
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027 ;;
3028 *)
3029 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 if test ! -d "${UNIVERSALSDK}"
3031 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003032 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038else
3039
3040 UNIVERSALSDK=
3041 enable_universalsdk=
3042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045if test -n "${UNIVERSALSDK}"
3046then
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3048$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049else
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deily87adb6e2013-10-18 21:09:56 -07003056ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058# For backward compatibility reasons we prefer to select '32-bit' if available,
3059# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061if test "`uname -s`" = "Darwin"
3062then
3063 if test -n "${UNIVERSALSDK}"
3064 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003065 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066 then
3067 UNIVERSAL_ARCHS="intel"
3068 fi
3069 fi
3070fi
3071
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003072
Matthias Kloseb9621712010-04-24 17:59:49 +00003073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3074$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075
3076# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 UNIVERSAL_ARCHS="$withval"
3080
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081fi
3082
Ned Deily87adb6e2013-10-18 21:09:56 -07003083if test -n "${UNIVERSALSDK}"
3084then
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3086$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3087else
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3089$as_echo "no" >&6; }
3090fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092
3093# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003094if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095 withval=$with_framework_name;
3096 PYTHONFRAMEWORK=${withval}
3097 PYTHONFRAMEWORKDIR=${withval}.framework
3098 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3099
3100else
3101
3102 PYTHONFRAMEWORK=Python
3103 PYTHONFRAMEWORKDIR=Python.framework
3104 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3105
3106fi
3107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003109if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003111 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003112 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003113 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 esac
3115 case $enableval in
3116 no)
3117 PYTHONFRAMEWORK=
3118 PYTHONFRAMEWORKDIR=no-framework
3119 PYTHONFRAMEWORKPREFIX=
3120 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121 FRAMEWORKINSTALLFIRST=
3122 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 FRAMEWORKALTINSTALLFIRST=
3124 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003125 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 if test "x${prefix}" = "xNONE"; then
3127 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3128 else
3129 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3130 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003132 ;;
3133 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003137 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003138 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3139 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003140 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 if test "x${prefix}" = "xNONE" ; then
3144 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 else
3147 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3148 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
3150 case "${enableval}" in
3151 /System*)
3152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3153 if test "${prefix}" = "NONE" ; then
3154 # See below
3155 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3156 fi
3157 ;;
3158
3159 /Library*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 ;;
3162
3163 */Library/Frameworks)
3164 MDIR="`dirname "${enableval}"`"
3165 MDIR="`dirname "${MDIR}"`"
3166 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3167
3168 if test "${prefix}" = "NONE"; then
3169 # User hasn't specified the
3170 # --prefix option, but wants to install
3171 # the framework in a non-default location,
3172 # ensure that the compatibility links get
3173 # installed relative to that prefix as well
3174 # instead of in /usr/local.
3175 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3176 fi
3177 ;;
3178
3179 *)
3180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3181 ;;
3182 esac
3183
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003186 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3193
3194 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3195
Jack Jansene578a632001-08-15 01:27:14 +00003196 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Guido van Rossum563e7081996-09-10 18:20:48 +00003198else
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003201 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORKPREFIX=
3203 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 FRAMEWORKINSTALLFIRST=
3205 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 FRAMEWORKALTINSTALLFIRST=
3207 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003208 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 if test "x${prefix}" = "xNONE" ; then
3210 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3211 else
3212 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3213 fi
Jack Jansene578a632001-08-15 01:27:14 +00003214 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217fi
3218
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219
3220
Michael W. Hudson54241132001-12-07 15:38:26 +00003221
3222
3223
3224
Jack Jansene578a632001-08-15 01:27:14 +00003225
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003226
3227
3228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003230
Ned Deilyb8f944f2013-11-21 22:42:25 -08003231
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232
3233cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003234#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003235_ACEOF
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003239## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003240## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003241##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242# Set name for machine-dependent library files
3243
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3245$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246if test -z "$MACHDEP"
3247then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 # avoid using uname for cross builds
3249 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003250 # ac_sys_system and ac_sys_release are used for setting
3251 # a lot of different things including 'define_xopen_source'
3252 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003254 *-*-linux-android*)
3255 ac_sys_system=Linux-android
3256 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 *-*-linux*)
3258 ac_sys_system=Linux
3259 ;;
3260 *-*-cygwin*)
3261 ac_sys_system=Cygwin
3262 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003263 *-*-vxworks*)
3264 ac_sys_system=VxWorks
3265 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 *)
3267 # for now, limit cross builds to known configurations
3268 MACHDEP="unknown"
3269 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3270 esac
3271 ac_sys_release=
3272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003274 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003275 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 fi
3281 ac_md_system=`echo $ac_sys_system |
3282 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3283 ac_md_release=`echo $ac_sys_release |
3284 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3285 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003286
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003288 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003289 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003290 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003291 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003292 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294fi
Guido van Rossum91922671997-10-09 20:24:13 +00003295
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003296
3297if test "$cross_compiling" = yes; then
3298 case "$host" in
3299 *-*-linux*)
3300 case "$host_cpu" in
3301 arm*)
3302 _host_cpu=arm
3303 ;;
3304 *)
3305 _host_cpu=$host_cpu
3306 esac
3307 ;;
3308 *-*-cygwin*)
3309 _host_cpu=
3310 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003311 *-*-vxworks*)
3312 _host_cpu=$host_cpu
3313 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3320fi
3321
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3323# disable features if it is defined, without any means to access these
3324# features as extensions. For these systems, we skip the definition of
3325# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3326# some feature, make sure there is no alternative way to access this
3327# feature. Also, when using wildcards, make sure you have verified the
3328# need for not defining _XOPEN_SOURCE on all systems matching the
3329# wildcard, and that the wildcard does not include future systems
3330# (which may remove their limitations).
3331case $ac_sys_system/$ac_sys_release in
3332 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3333 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003334 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003335 # In addition, Stefan Krah confirms that issue #1244610 exists through
3336 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338 define_xopen_source=no
3339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344
3345 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003346 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003352
3353 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003354 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3355 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3356 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003357 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 +00003358 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003359 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3360 # request to enable features supported by the standard as a request
3361 # to disable features not supported by the standard. The best way
3362 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3363 # entirely and define __EXTENSIONS__ instead.
3364 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003365 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3367 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003368 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003369 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 define_xopen_source=no;;
3371 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003375 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3376 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3377 # identifies itself as Darwin/7.*
3378 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # disables platform specific features beyond repair.
3380 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # has no effect, don't bother defining them
3382 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003383 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003384 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3387 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3388 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003389 AIX/4)
3390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 AIX/5)
3392 if test `uname -r` -eq 1; then
3393 define_xopen_source=no
3394 fi
3395 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003396 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3397 # defining NI_NUMERICHOST.
3398 QNX/6.3.2)
3399 define_xopen_source=no
3400 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003401 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3402 # in network headers still using system V types.
3403 VxWorks/*)
3404 define_xopen_source=no
3405 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407esac
3408
3409if test $define_xopen_source = yes
3410then
Victor Stinner14d098d2011-09-07 22:29:43 +02003411 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Victor Stinner14d098d2011-09-07 22:29:43 +02003413$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3417 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3418 # several APIs are not declared. Since this is also needed in some
3419 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Matthias Kloseb9621712010-04-24 17:59:49 +00003421$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003425$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427fi
3428
Christian Heimes647cd872013-12-07 23:39:33 +01003429# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3430case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431 hp*|HP*)
3432 define_stdc_a1=yes;;
3433 *)
3434 define_stdc_a1=no;;
3435esac
3436
3437if test $define_stdc_a1 = yes
3438then
Christian Heimes647cd872013-12-07 23:39:33 +01003439
3440$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3441
Christian Heimesb02bcae2013-12-08 15:21:08 +01003442fi
Christian Heimes647cd872013-12-07 23:39:33 +01003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3445# it may influence the way we can build extensions, so distutils
3446# needs to check it
3447
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453
3454# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3455# for debug/optimization stuff. BASECFLAGS is for flags that are required
3456# just to get things to compile and link. Users are free to override OPT
3457# when running configure or make. The build should not break if they do.
3458# BASECFLAGS should generally not be messed with, however.
3459
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460# If the user switches compilers, we can't believe the cache
3461if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3462then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003463 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003464(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003465fi
3466
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003467# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3468# when the compiler supports them, but we don't always want -O2, and
3469# we set -g later.
3470if test -z "$CFLAGS"; then
3471 CFLAGS=
3472fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003473
3474if test "$ac_sys_system" = "Darwin"
3475then
3476 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003477 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003478 # information
3479 if test -z "${CC}"
3480 then
3481 found_gcc=
3482 found_clang=
3483 as_save_IFS=$IFS; IFS=:
3484 for as_dir in $PATH
3485 do
3486 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003487 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003488 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003489 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003490 fi
3491 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003492 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003493 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003494 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003495 fi
3496 fi
3497 done
3498 IFS=$as_save_IFS
3499
3500 if test -n "$found_gcc" -a -n "$found_clang"
3501 then
3502 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3503 then
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3505$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3506 CC="$found_clang"
3507 CXX="$found_clang++"
3508 fi
3509
3510
3511 elif test -z "$found_gcc" -a -n "$found_clang"
3512 then
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3514$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3515 CC="$found_clang"
3516 CXX="$found_clang++"
3517
3518 elif test -z "$found_gcc" -a -z "$found_clang"
3519 then
3520 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3521 if test -n "${found_clang}"
3522 then
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3524$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3525 CC="${found_clang}"
3526 CXX="`/usr/bin/xcrun -find clang++`"
3527
3528 # else: use default behaviour
3529 fi
3530 fi
3531 fi
3532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003533ac_ext=c
3534ac_cpp='$CPP $CPPFLAGS'
3535ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3536ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3537ac_compiler_gnu=$ac_cv_c_compiler_gnu
3538if test -n "$ac_tool_prefix"; then
3539 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3540set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3542$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003543if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003545else
3546 if test -n "$CC"; then
3547 ac_cv_prog_CC="$CC" # Let the user override the test.
3548else
Martin v. Löwis11437992002-04-12 09:54:03 +00003549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3550for as_dir in $PATH
3551do
3552 IFS=$as_save_IFS
3553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $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 +00003558 break 2
3559 fi
3560done
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003563
Jack Jansendd19cf82001-12-06 22:36:17 +00003564fi
3565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003566CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003567if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3569$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003570else
Matthias Kloseb9621712010-04-24 17:59:49 +00003571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3572$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003573fi
3574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576fi
3577if test -z "$ac_cv_prog_CC"; then
3578 ac_ct_CC=$CC
3579 # Extract the first word of "gcc", so it can be a program name with args.
3580set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003583if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003585else
3586 if test -n "$ac_ct_CC"; then
3587 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3588else
3589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $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 +00003598 break 2
3599 fi
3600done
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
3604fi
3605fi
3606ac_ct_CC=$ac_cv_prog_ac_ct_CC
3607if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3609$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610else
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 if test "x$ac_ct_CC" = x; then
3616 CC=""
3617 else
3618 case $cross_compiling:$ac_tool_warned in
3619yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622ac_tool_warned=yes ;;
3623esac
3624 CC=$ac_ct_CC
3625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003628fi
3629
Jack Jansendd19cf82001-12-06 22:36:17 +00003630if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 if test -n "$ac_tool_prefix"; then
3632 # 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 +00003633set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3635$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003636if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003638else
3639 if test -n "$CC"; then
3640 ac_cv_prog_CC="$CC" # Let the user override the test.
3641else
Martin v. Löwis11437992002-04-12 09:54:03 +00003642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643for as_dir in $PATH
3644do
3645 IFS=$as_save_IFS
3646 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $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 +00003651 break 2
3652 fi
3653done
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003656
3657fi
3658fi
3659CC=$ac_cv_prog_CC
3660if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3662$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3665$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671if test -z "$CC"; then
3672 # Extract the first word of "cc", so it can be a program name with args.
3673set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003676if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003682 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3691 ac_prog_rejected=yes
3692 continue
3693 fi
3694 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $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 +00003696 break 2
3697 fi
3698done
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702if test $ac_prog_rejected = yes; then
3703 # We found a bogon in the path, so make sure we never use it.
3704 set dummy $ac_cv_prog_CC
3705 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 # We chose a different compiler from the bogus one.
3708 # However, it has the same basename, so the bogon will be chosen
3709 # first if we set CC to just the basename; use the full file name.
3710 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003711 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712 fi
3713fi
3714fi
3715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003716CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727if test -z "$CC"; then
3728 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 do
3731 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3732set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Martin v. Löwis11437992002-04-12 09:54:03 +00003741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3742for as_dir in $PATH
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $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 +00003750 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752done
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
3756fi
3757fi
3758CC=$ac_cv_prog_CC
3759if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3761$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 test -n "$CC" && break
3769 done
3770fi
3771if test -z "$CC"; then
3772 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003774do
3775 # Extract the first word of "$ac_prog", so it can be a program name with args.
3776set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003779if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
3782 if test -n "$ac_ct_CC"; then
3783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3784else
3785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3786for as_dir in $PATH
3787do
3788 IFS=$as_save_IFS
3789 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $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 +00003794 break 2
3795 fi
3796done
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801fi
3802ac_ct_CC=$ac_cv_prog_ac_ct_CC
3803if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3805$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 test -n "$ac_ct_CC" && break
3813done
Michael W. Hudson54241132001-12-07 15:38:26 +00003814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 if test "x$ac_ct_CC" = x; then
3816 CC=""
3817 else
3818 case $cross_compiling:$ac_tool_warned in
3819yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822ac_tool_warned=yes ;;
3823esac
3824 CC=$ac_ct_CC
3825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003826fi
3827
3828fi
3829
3830
Matthias Kloseb9621712010-04-24 17:59:49 +00003831test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003833as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003834See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003837$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3838set X $ac_compile
3839ac_compiler=$2
3840for ac_option in --version -v -V -qversion; do
3841 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842case "(($ac_try" in
3843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3844 *) ac_try_echo=$ac_try;;
3845esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3847$as_echo "$ac_try_echo"; } >&5
3848 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 if test -s conftest.err; then
3851 sed '10a\
3852... rest of stderr output deleted ...
3853 10q' conftest.err >conftest.er1
3854 cat conftest.er1 >&5
3855 fi
3856 rm -f conftest.er1 conftest.err
3857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3858 test $ac_status = 0; }
3859done
Martin v. Löwis11437992002-04-12 09:54:03 +00003860
Matthias Kloseb9621712010-04-24 17:59:49 +00003861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864int
3865main ()
3866{
3867
3868 ;
3869 return 0;
3870}
3871_ACEOF
3872ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003873ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003874# Try to create an executable without -o first, disregard a.out.
3875# It will help us diagnose broken compilers, and finding out an intuition
3876# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3878$as_echo_n "checking whether the C compiler works... " >&6; }
3879ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3880
3881# The possible output files:
3882ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_rmfiles=
3885for ac_file in $ac_files
3886do
3887 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3890 esac
3891done
3892rm -f $ac_rmfiles
3893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3900$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3904 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3906# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3907# in a Makefile. We should not override ac_cv_exeext if it was cached,
3908# so that the user can short-circuit this test for compilers unknown to
3909# Autoconf.
3910for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003911do
3912 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003914 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003915 ;;
3916 [ab].out )
3917 # We found the default executable, but exeext='' is most
3918 # certainly right.
3919 break;;
3920 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 then :; else
3923 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3924 fi
3925 # We set ac_cv_exeext here because the later test for it is not
3926 # safe: cross compilers may not add the suffix if given an `-o'
3927 # argument, so we may need to know it at that point already.
3928 # Even if this section looks crufty: it has the advantage of
3929 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003930 break;;
3931 * )
3932 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 esac
3934done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935test "$ac_cv_exeext" = no && ac_cv_exeext=
3936
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 ac_file=''
3939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if test -z "$ac_file"; then :
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942$as_echo "no" >&6; }
3943$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003944sed 's/^/| /' conftest.$ac_ext >&5
3945
Matthias Kloseb9621712010-04-24 17:59:49 +00003946{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003948as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003949See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003950else
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3952$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3955$as_echo_n "checking for C compiler default output file name... " >&6; }
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3957$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959
Matthias Kloseb9621712010-04-24 17:59:49 +00003960rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3963$as_echo_n "checking for suffix of executables... " >&6; }
3964if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3976# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3977# work properly (i.e., refer to `conftest.exe'), while it won't with
3978# `rm'.
3979for ac_file in conftest.exe conftest conftest.*; do
3980 test -f "$ac_file" || continue
3981 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3984 break;;
3985 * ) break;;
3986 esac
3987done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988else
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003991as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003992See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994rm -f conftest conftest$ac_cv_exeext
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3996$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997
3998rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003999EXEEXT=$ac_cv_exeext
4000ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h. */
4003#include <stdio.h>
4004int
4005main ()
4006{
4007FILE *f = fopen ("conftest.out", "w");
4008 return ferror (f) || fclose (f) != 0;
4009
4010 ;
4011 return 0;
4012}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004014ac_clean_files="$ac_clean_files conftest.out"
4015# Check that the compiler produces executables we can run. If not, either
4016# the compiler is broken, or we cross compile.
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4018$as_echo_n "checking whether we are cross compiling... " >&6; }
4019if test "$cross_compiling" != yes; then
4020 { { ac_try="$ac_link"
4021case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
4027 (eval "$ac_link") 2>&5
4028 ac_status=$?
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }
4031 if { ac_try='./conftest$ac_cv_exeext'
4032 { { case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
4036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
4038 (eval "$ac_try") 2>&5
4039 ac_status=$?
4040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; }; then
4042 cross_compiling=no
4043 else
4044 if test "$cross_compiling" = maybe; then
4045 cross_compiling=yes
4046 else
4047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004049as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004050If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 fi
4053 fi
4054fi
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4056$as_echo "$cross_compiling" >&6; }
4057
4058rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4059ac_clean_files=$ac_clean_files_save
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4061$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004062if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo_n "(cached) " >&6
4064else
4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066/* end confdefs.h. */
4067
4068int
4069main ()
4070{
4071
4072 ;
4073 return 0;
4074}
4075_ACEOF
4076rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004077if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 for ac_file in conftest.o conftest.obj conftest.*; do
4089 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004090 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4093 break;;
4094 esac
4095done
4096else
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004098sed 's/^/| /' conftest.$ac_ext >&5
4099
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004102as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004103See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4108$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004109OBJEXT=$ac_cv_objext
4110ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4112$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004113if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004115else
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004118
Martin v. Löwis11437992002-04-12 09:54:03 +00004119int
4120main ()
4121{
4122#ifndef __GNUC__
4123 choke me
4124#endif
4125
4126 ;
4127 return 0;
4128}
4129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 ac_compiler_gnu=yes
4132else
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004136ac_cv_c_compiler_gnu=$ac_compiler_gnu
4137
4138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4140$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4141if test $ac_compiler_gnu = yes; then
4142 GCC=yes
4143else
4144 GCC=
4145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004146ac_test_CFLAGS=${CFLAGS+set}
4147ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4149$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004153 ac_save_c_werror_flag=$ac_c_werror_flag
4154 ac_c_werror_flag=yes
4155 ac_cv_prog_cc_g=no
4156 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004169 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 CFLAGS=""
4172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173/* end confdefs.h. */
4174
4175int
4176main ()
4177{
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004183if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184
Matthias Kloseb9621712010-04-24 17:59:49 +00004185else
4186 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189/* end confdefs.h. */
4190
4191int
4192main ()
4193{
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207 ac_c_werror_flag=$ac_save_c_werror_flag
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4210$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004211if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213elif test $ac_cv_prog_cc_g = yes; then
4214 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004215 CFLAGS="-g -O2"
4216 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004217 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 fi
4219else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004220 if test "$GCC" = yes; then
4221 CFLAGS="-O2"
4222 else
4223 CFLAGS=
4224 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4227$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004228if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004230else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004232ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* end confdefs.h. */
4235#include <stdarg.h>
4236#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004237struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4239struct buf { int x; };
4240FILE * (*rcsopen) (struct buf *, struct stat *, int);
4241static char *e (p, i)
4242 char **p;
4243 int i;
4244{
4245 return p[i];
4246}
4247static char *f (char * (*g) (char **, int), char **p, ...)
4248{
4249 char *s;
4250 va_list v;
4251 va_start (v,p);
4252 s = g (p, va_arg (v,int));
4253 va_end (v);
4254 return s;
4255}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256
4257/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4258 function prototypes and stuff, but not '\xHH' hex character constants.
4259 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004261 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4262 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004264int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4267 inside strings and character constants. */
4268#define FOO(x) 'x'
4269int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4270
Skip Montanaro6dead952003-09-25 14:50:04 +00004271int test (int i, double x);
4272struct s1 {int (*f) (int a);};
4273struct s2 {int (*f) (double a);};
4274int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4275int argc;
4276char **argv;
4277int
4278main ()
4279{
4280return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4281 ;
4282 return 0;
4283}
4284_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4286 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004287do
4288 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext
4293 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296CC=$ac_save_CC
4297
4298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299# AC_CACHE_VAL
4300case "x$ac_cv_prog_cc_c89" in
4301 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4303$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4306$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4310$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004311esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004313
Matthias Kloseb9621712010-04-24 17:59:49 +00004314fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004315
Martin v. Löwis11437992002-04-12 09:54:03 +00004316ac_ext=c
4317ac_cpp='$CPP $CPPFLAGS'
4318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4320ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004322ac_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
4327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4328$as_echo_n "checking how to run the C preprocessor... " >&6; }
4329# On Suns, sometimes $CPP names a directory.
4330if test -n "$CPP" && test -d "$CPP"; then
4331 CPP=
4332fi
4333if test -z "$CPP"; then
4334 if ${ac_cv_prog_CPP+:} false; then :
4335 $as_echo_n "(cached) " >&6
4336else
4337 # Double quotes because CPP needs to be expanded
4338 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4339 do
4340 ac_preproc_ok=false
4341for ac_c_preproc_warn_flag in '' yes
4342do
4343 # Use a header file that comes with gcc, so configuring glibc
4344 # with a fresh cross-compiler works.
4345 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4346 # <limits.h> exists even on freestanding compilers.
4347 # On the NeXT, cc -E runs the code through the compiler's parser,
4348 # not just through cpp. "Syntax error" is here to catch this case.
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350/* end confdefs.h. */
4351#ifdef __STDC__
4352# include <limits.h>
4353#else
4354# include <assert.h>
4355#endif
4356 Syntax error
4357_ACEOF
4358if ac_fn_c_try_cpp "$LINENO"; then :
4359
4360else
4361 # Broken: fails on valid input.
4362continue
4363fi
4364rm -f conftest.err conftest.i conftest.$ac_ext
4365
4366 # OK, works on sane cases. Now check whether nonexistent headers
4367 # can be detected and how.
4368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4369/* end confdefs.h. */
4370#include <ac_nonexistent.h>
4371_ACEOF
4372if ac_fn_c_try_cpp "$LINENO"; then :
4373 # Broken: success on invalid input.
4374continue
4375else
4376 # Passes both tests.
4377ac_preproc_ok=:
4378break
4379fi
4380rm -f conftest.err conftest.i conftest.$ac_ext
4381
4382done
4383# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4384rm -f conftest.i conftest.err conftest.$ac_ext
4385if $ac_preproc_ok; then :
4386 break
4387fi
4388
4389 done
4390 ac_cv_prog_CPP=$CPP
4391
4392fi
4393 CPP=$ac_cv_prog_CPP
4394else
4395 ac_cv_prog_CPP=$CPP
4396fi
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4398$as_echo "$CPP" >&6; }
4399ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445
4446else
4447 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4449as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4450See \`config.log' for more details" "$LINENO" 5; }
4451fi
4452
4453ac_ext=c
4454ac_cpp='$CPP $CPPFLAGS'
4455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457ac_compiler_gnu=$ac_cv_c_compiler_gnu
4458
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4460$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4461if ${ac_cv_path_GREP+:} false; then :
4462 $as_echo_n "(cached) " >&6
4463else
4464 if test -z "$GREP"; then
4465 ac_path_GREP_found=false
4466 # Loop through the user's path and test for each of PROGNAME-LIST
4467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4469do
4470 IFS=$as_save_IFS
4471 test -z "$as_dir" && as_dir=.
4472 for ac_prog in grep ggrep; do
4473 for ac_exec_ext in '' $ac_executable_extensions; do
4474 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4475 as_fn_executable_p "$ac_path_GREP" || continue
4476# Check for GNU ac_path_GREP and select it if it is found.
4477 # Check for GNU $ac_path_GREP
4478case `"$ac_path_GREP" --version 2>&1` in
4479*GNU*)
4480 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4481*)
4482 ac_count=0
4483 $as_echo_n 0123456789 >"conftest.in"
4484 while :
4485 do
4486 cat "conftest.in" "conftest.in" >"conftest.tmp"
4487 mv "conftest.tmp" "conftest.in"
4488 cp "conftest.in" "conftest.nl"
4489 $as_echo 'GREP' >> "conftest.nl"
4490 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4491 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4492 as_fn_arith $ac_count + 1 && ac_count=$as_val
4493 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4494 # Best one so far, save it but keep looking for a better one
4495 ac_cv_path_GREP="$ac_path_GREP"
4496 ac_path_GREP_max=$ac_count
4497 fi
4498 # 10*(2^10) chars as input seems more than enough
4499 test $ac_count -gt 10 && break
4500 done
4501 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4502esac
4503
4504 $ac_path_GREP_found && break 3
4505 done
4506 done
4507 done
4508IFS=$as_save_IFS
4509 if test -z "$ac_cv_path_GREP"; then
4510 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4511 fi
4512else
4513 ac_cv_path_GREP=$GREP
4514fi
4515
4516fi
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4518$as_echo "$ac_cv_path_GREP" >&6; }
4519 GREP="$ac_cv_path_GREP"
4520
4521
Łukasz Langaa785c872016-09-09 17:37:37 -07004522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4523$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4524if ${ac_cv_path_SED+:} false; then :
4525 $as_echo_n "(cached) " >&6
4526else
4527 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4528 for ac_i in 1 2 3 4 5 6 7; do
4529 ac_script="$ac_script$as_nl$ac_script"
4530 done
4531 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4532 { ac_script=; unset ac_script;}
4533 if test -z "$SED"; then
4534 ac_path_SED_found=false
4535 # Loop through the user's path and test for each of PROGNAME-LIST
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in $PATH
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
4541 for ac_prog in sed gsed; do
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4544 as_fn_executable_p "$ac_path_SED" || continue
4545# Check for GNU ac_path_SED and select it if it is found.
4546 # Check for GNU $ac_path_SED
4547case `"$ac_path_SED" --version 2>&1` in
4548*GNU*)
4549 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4550*)
4551 ac_count=0
4552 $as_echo_n 0123456789 >"conftest.in"
4553 while :
4554 do
4555 cat "conftest.in" "conftest.in" >"conftest.tmp"
4556 mv "conftest.tmp" "conftest.in"
4557 cp "conftest.in" "conftest.nl"
4558 $as_echo '' >> "conftest.nl"
4559 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4560 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4561 as_fn_arith $ac_count + 1 && ac_count=$as_val
4562 if test $ac_count -gt ${ac_path_SED_max-0}; then
4563 # Best one so far, save it but keep looking for a better one
4564 ac_cv_path_SED="$ac_path_SED"
4565 ac_path_SED_max=$ac_count
4566 fi
4567 # 10*(2^10) chars as input seems more than enough
4568 test $ac_count -gt 10 && break
4569 done
4570 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4571esac
4572
4573 $ac_path_SED_found && break 3
4574 done
4575 done
4576 done
4577IFS=$as_save_IFS
4578 if test -z "$ac_cv_path_SED"; then
4579 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4580 fi
4581else
4582 ac_cv_path_SED=$SED
4583fi
4584
4585fi
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4587$as_echo "$ac_cv_path_SED" >&6; }
4588 SED="$ac_cv_path_SED"
4589 rm -f conftest.sed
4590
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004591
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
4593
Matthias Kloseb9621712010-04-24 17:59:49 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4595$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004597# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004598if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600
4601 case $withval in
4602 no) with_cxx_main=no
4603 MAINCC='$(CC)';;
4604 yes) with_cxx_main=yes
4605 MAINCC='$(CXX)';;
4606 *) with_cxx_main=yes
4607 MAINCC=$withval
4608 if test -z "$CXX"
4609 then
4610 CXX=$withval
4611 fi;;
4612 esac
4613else
4614
4615 with_cxx_main=no
4616 MAINCC='$(CC)'
4617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004618fi
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4621$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004622
4623preset_cxx="$CXX"
4624if test -z "$CXX"
4625then
4626 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004627 gcc) if test -n "$ac_tool_prefix"; then
4628 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4629set dummy ${ac_tool_prefix}g++; ac_word=$2
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4631$as_echo_n "checking for $ac_word... " >&6; }
4632if ${ac_cv_path_CXX+:} false; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 case $CXX in
4636 [\\/]* | ?:[\\/]*)
4637 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4638 ;;
4639 *)
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641for as_dir in notfound
4642do
4643 IFS=$as_save_IFS
4644 test -z "$as_dir" && as_dir=.
4645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004647 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4649 break 2
4650 fi
4651done
4652 done
4653IFS=$as_save_IFS
4654
4655 ;;
4656esac
4657fi
4658CXX=$ac_cv_path_CXX
4659if test -n "$CXX"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4661$as_echo "$CXX" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
4667
4668fi
4669if test -z "$ac_cv_path_CXX"; then
4670 ac_pt_CXX=$CXX
4671 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004672set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675if ${ac_cv_path_ac_pt_CXX+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677else
4678 case $ac_pt_CXX in
4679 [\\/]* | ?:[\\/]*)
4680 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4681 ;;
4682 *)
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in notfound
4685do
4686 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2
4693 fi
4694done
4695 done
4696IFS=$as_save_IFS
4697
4698 ;;
4699esac
4700fi
4701ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4702if test -n "$ac_pt_CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4704$as_echo "$ac_pt_CXX" >&6; }
4705else
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710 if test "x$ac_pt_CXX" = x; then
4711 CXX="g++"
4712 else
4713 case $cross_compiling:$ac_tool_warned in
4714yes:)
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4717ac_tool_warned=yes ;;
4718esac
4719 CXX=$ac_pt_CXX
4720 fi
4721else
4722 CXX="$ac_cv_path_CXX"
4723fi
4724 ;;
4725 cc) if test -n "$ac_tool_prefix"; then
4726 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4727set dummy ${ac_tool_prefix}c++; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004730if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732else
4733 case $CXX in
4734 [\\/]* | ?:[\\/]*)
4735 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4736 ;;
4737 *)
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in notfound
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747 break 2
4748 fi
4749done
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004751IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753 ;;
4754esac
4755fi
4756CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004757if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4759$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765
4766fi
4767if test -z "$ac_cv_path_CXX"; then
4768 ac_pt_CXX=$CXX
4769 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004773if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778 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 +00004779 ;;
4780 *)
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782for as_dir in notfound
4783do
4784 IFS=$as_save_IFS
4785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 break 2
4791 fi
4792done
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004794IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ;;
4797esac
4798fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4800if test -n "$ac_pt_CXX"; then
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4802$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803else
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 if test "x$ac_pt_CXX" = x; then
4809 CXX="c++"
4810 else
4811 case $cross_compiling:$ac_tool_warned in
4812yes:)
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4815ac_tool_warned=yes ;;
4816esac
4817 CXX=$ac_pt_CXX
4818 fi
4819else
4820 CXX="$ac_cv_path_CXX"
4821fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 clang|*/clang) if test -n "$ac_tool_prefix"; then
4824 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4825set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if ${ac_cv_path_CXX+:} false; then :
4829 $as_echo_n "(cached) " >&6
4830else
4831 case $CXX in
4832 [\\/]* | ?:[\\/]*)
4833 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4834 ;;
4835 *)
4836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837for as_dir in notfound
4838do
4839 IFS=$as_save_IFS
4840 test -z "$as_dir" && as_dir=.
4841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845 break 2
4846 fi
4847done
4848 done
4849IFS=$as_save_IFS
4850
Ned Deilycbfb9a52012-06-23 16:02:19 -07004851 ;;
4852esac
4853fi
4854CXX=$ac_cv_path_CXX
4855if test -n "$CXX"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4857$as_echo "$CXX" >&6; }
4858else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863
4864fi
4865if test -z "$ac_cv_path_CXX"; then
4866 ac_pt_CXX=$CXX
4867 # Extract the first word of "clang++", so it can be a program name with args.
4868set dummy clang++; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if ${ac_cv_path_ac_pt_CXX+:} false; then :
4872 $as_echo_n "(cached) " >&6
4873else
4874 case $ac_pt_CXX in
4875 [\\/]* | ?:[\\/]*)
4876 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4877 ;;
4878 *)
4879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in notfound
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890done
4891 done
4892IFS=$as_save_IFS
4893
4894 ;;
4895esac
4896fi
4897ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4898if test -n "$ac_pt_CXX"; then
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4900$as_echo "$ac_pt_CXX" >&6; }
4901else
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
4906 if test "x$ac_pt_CXX" = x; then
4907 CXX="clang++"
4908 else
4909 case $cross_compiling:$ac_tool_warned in
4910yes:)
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4913ac_tool_warned=yes ;;
4914esac
4915 CXX=$ac_pt_CXX
4916 fi
4917else
4918 CXX="$ac_cv_path_CXX"
4919fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004920 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004921 icc|*/icc) if test -n "$ac_tool_prefix"; then
4922 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4923set dummy ${ac_tool_prefix}icpc; ac_word=$2
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4925$as_echo_n "checking for $ac_word... " >&6; }
4926if ${ac_cv_path_CXX+:} false; then :
4927 $as_echo_n "(cached) " >&6
4928else
4929 case $CXX in
4930 [\\/]* | ?:[\\/]*)
4931 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4932 ;;
4933 *)
4934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935for as_dir in notfound
4936do
4937 IFS=$as_save_IFS
4938 test -z "$as_dir" && as_dir=.
4939 for ac_exec_ext in '' $ac_executable_extensions; do
4940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4941 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4943 break 2
4944 fi
4945done
4946 done
4947IFS=$as_save_IFS
4948
4949 ;;
4950esac
4951fi
4952CXX=$ac_cv_path_CXX
4953if test -n "$CXX"; then
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4955$as_echo "$CXX" >&6; }
4956else
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958$as_echo "no" >&6; }
4959fi
4960
4961
4962fi
4963if test -z "$ac_cv_path_CXX"; then
4964 ac_pt_CXX=$CXX
4965 # Extract the first word of "icpc", so it can be a program name with args.
4966set dummy icpc; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
4969if ${ac_cv_path_ac_pt_CXX+:} false; then :
4970 $as_echo_n "(cached) " >&6
4971else
4972 case $ac_pt_CXX in
4973 [\\/]* | ?:[\\/]*)
4974 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4975 ;;
4976 *)
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978for as_dir in notfound
4979do
4980 IFS=$as_save_IFS
4981 test -z "$as_dir" && as_dir=.
4982 for ac_exec_ext in '' $ac_executable_extensions; do
4983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986 break 2
4987 fi
4988done
4989 done
4990IFS=$as_save_IFS
4991
4992 ;;
4993esac
4994fi
4995ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4996if test -n "$ac_pt_CXX"; then
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4998$as_echo "$ac_pt_CXX" >&6; }
4999else
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5001$as_echo "no" >&6; }
5002fi
5003
5004 if test "x$ac_pt_CXX" = x; then
5005 CXX="icpc"
5006 else
5007 case $cross_compiling:$ac_tool_warned in
5008yes:)
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5011ac_tool_warned=yes ;;
5012esac
5013 CXX=$ac_pt_CXX
5014 fi
5015else
5016 CXX="$ac_cv_path_CXX"
5017fi
5018 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005019 esac
5020 if test "$CXX" = "notfound"
5021 then
5022 CXX=""
5023 fi
5024fi
5025if test -z "$CXX"
5026then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005027 if test -n "$ac_tool_prefix"; then
5028 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5029 do
5030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005034if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005036else
5037 if test -n "$CXX"; then
5038 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5039else
5040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in $PATH
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005047 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049 break 2
5050 fi
5051done
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005053IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055fi
5056fi
5057CXX=$ac_cv_prog_CXX
5058if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5060$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005061else
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005064fi
5065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 test -n "$CXX" && break
5068 done
5069fi
5070if test -z "$CXX"; then
5071 ac_ct_CXX=$CXX
5072 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
5078if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5079 $as_echo_n "(cached) " >&6
5080else
5081 if test -n "$ac_ct_CXX"; then
5082 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005091 ac_cv_prog_ac_ct_CXX="$ac_prog"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093 break 2
5094 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005096 done
5097IFS=$as_save_IFS
5098
5099fi
5100fi
5101ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5102if test -n "$ac_ct_CXX"; then
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5104$as_echo "$ac_ct_CXX" >&6; }
5105else
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108fi
5109
5110
5111 test -n "$ac_ct_CXX" && break
5112done
5113
5114 if test "x$ac_ct_CXX" = x; then
5115 CXX="notfound"
5116 else
5117 case $cross_compiling:$ac_tool_warned in
5118yes:)
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5121ac_tool_warned=yes ;;
5122esac
5123 CXX=$ac_ct_CXX
5124 fi
5125fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126
5127 if test "$CXX" = "notfound"
5128 then
5129 CXX=""
5130 fi
5131fi
5132if test "$preset_cxx" != "$CXX"
5133then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005134 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135
5136 By default, distutils will build C++ extension modules with \"$CXX\".
5137 If this is not intended, then set CXX on the configure command line.
5138 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005139$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140
5141 By default, distutils will build C++ extension modules with \"$CXX\".
5142 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005143 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005144fi
5145
5146
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5148
5149
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5151$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5152cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef bfin
5154#undef cris
5155#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005157#undef hppa
5158#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005159#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005160#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005161#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005162#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005164#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005165 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005166#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005167# if defined(__x86_64__) && defined(__LP64__)
5168 x86_64-linux-gnu
5169# elif defined(__x86_64__) && defined(__ILP32__)
5170 x86_64-linux-gnux32
5171# elif defined(__i386__)
5172 i386-linux-gnu
5173# elif defined(__aarch64__) && defined(__AARCH64EL__)
5174# if defined(__ILP32__)
5175 aarch64_ilp32-linux-gnu
5176# else
5177 aarch64-linux-gnu
5178# endif
5179# elif defined(__aarch64__) && defined(__AARCH64EB__)
5180# if defined(__ILP32__)
5181 aarch64_be_ilp32-linux-gnu
5182# else
5183 aarch64_be-linux-gnu
5184# endif
5185# elif defined(__alpha__)
5186 alpha-linux-gnu
5187# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5188# if defined(__ARMEL__)
5189 arm-linux-gnueabihf
5190# else
5191 armeb-linux-gnueabihf
5192# endif
5193# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5194# if defined(__ARMEL__)
5195 arm-linux-gnueabi
5196# else
5197 armeb-linux-gnueabi
5198# endif
5199# elif defined(__hppa__)
5200 hppa-linux-gnu
5201# elif defined(__ia64__)
5202 ia64-linux-gnu
5203# elif defined(__m68k__) && !defined(__mcoldfire__)
5204 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005205# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5206# if _MIPS_SIM == _ABIO32
5207 mipsisa32r6el-linux-gnu
5208# elif _MIPS_SIM == _ABIN32
5209 mipsisa64r6el-linux-gnuabin32
5210# elif _MIPS_SIM == _ABI64
5211 mipsisa64r6el-linux-gnuabi64
5212# else
5213# error unknown platform triplet
5214# endif
5215# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5216# if _MIPS_SIM == _ABIO32
5217 mipsisa32r6-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mipsisa64r6-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mipsisa64r6-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005225# elif defined(__mips_hard_float) && defined(_MIPSEL)
5226# if _MIPS_SIM == _ABIO32
5227 mipsel-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64el-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64el-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__mips_hard_float)
5236# if _MIPS_SIM == _ABIO32
5237 mips-linux-gnu
5238# elif _MIPS_SIM == _ABIN32
5239 mips64-linux-gnuabin32
5240# elif _MIPS_SIM == _ABI64
5241 mips64-linux-gnuabi64
5242# else
5243# error unknown platform triplet
5244# endif
5245# elif defined(__or1k__)
5246 or1k-linux-gnu
5247# elif defined(__powerpc__) && defined(__SPE__)
5248 powerpc-linux-gnuspe
5249# elif defined(__powerpc64__)
5250# if defined(__LITTLE_ENDIAN__)
5251 powerpc64le-linux-gnu
5252# else
5253 powerpc64-linux-gnu
5254# endif
5255# elif defined(__powerpc__)
5256 powerpc-linux-gnu
5257# elif defined(__s390x__)
5258 s390x-linux-gnu
5259# elif defined(__s390__)
5260 s390-linux-gnu
5261# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5262 sh4-linux-gnu
5263# elif defined(__sparc__) && defined(__arch64__)
5264 sparc64-linux-gnu
5265# elif defined(__sparc__)
5266 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005267# elif defined(__riscv)
5268# if __riscv_xlen == 32
5269 riscv32-linux-gnu
5270# elif __riscv_xlen == 64
5271 riscv64-linux-gnu
5272# else
5273# error unknown platform triplet
5274# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005275# else
5276# error unknown platform triplet
5277# endif
5278#elif defined(__FreeBSD_kernel__)
5279# if defined(__LP64__)
5280 x86_64-kfreebsd-gnu
5281# elif defined(__i386__)
5282 i386-kfreebsd-gnu
5283# else
5284# error unknown platform triplet
5285# endif
5286#elif defined(__gnu_hurd__)
5287 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005288#elif defined(__APPLE__)
5289 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005290#elif defined(__VXWORKS__)
5291 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005292#else
5293# error unknown platform triplet
5294#endif
5295
5296EOF
5297
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005298if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5301$as_echo "$PLATFORM_TRIPLET" >&6; }
5302else
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5304$as_echo "none" >&6; }
5305fi
5306rm -f conftest.c conftest.out
5307
5308if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5309 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5310 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5311 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005312elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5313 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315
doko@ubuntu.com55532312016-06-14 08:55:19 +02005316if test x$MULTIARCH != x; then
5317 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5318fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319
5320
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5322$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5323save_LDFLAGS="$LDFLAGS"
5324LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005325
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327/* end confdefs.h. */
5328
5329int
5330main ()
5331{
5332
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337if ac_fn_c_try_link "$LINENO"; then :
5338 NO_AS_NEEDED="-Wl,--no-as-needed"
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5340$as_echo "yes" >&6; }
5341else
5342 NO_AS_NEEDED=""
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345fi
5346rm -f core conftest.err conftest.$ac_objext \
5347 conftest$ac_exeext conftest.$ac_ext
5348LDFLAGS="$save_LDFLAGS"
5349
5350
5351
5352# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5355$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005356if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005358else
5359 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5360 then ac_cv_path_EGREP="$GREP -E"
5361 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 # Loop through the user's path and test for each of PROGNAME-LIST
5365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5367do
5368 IFS=$as_save_IFS
5369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 for ac_prog in egrep; do
5371 for ac_exec_ext in '' $ac_executable_extensions; do
5372 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005373 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005374# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 # Check for GNU $ac_path_EGREP
5376case `"$ac_path_EGREP" --version 2>&1` in
5377*GNU*)
5378 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5379*)
5380 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 while :
5383 do
5384 cat "conftest.in" "conftest.in" >"conftest.tmp"
5385 mv "conftest.tmp" "conftest.in"
5386 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5392 # Best one so far, save it but keep looking for a better one
5393 ac_cv_path_EGREP="$ac_path_EGREP"
5394 ac_path_EGREP_max=$ac_count
5395 fi
5396 # 10*(2^10) chars as input seems more than enough
5397 test $ac_count -gt 10 && break
5398 done
5399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5400esac
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 $ac_path_EGREP_found && break 3
5403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005408 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 +00005409 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410else
5411 ac_cv_path_EGREP=$EGREP
5412fi
5413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 fi
5415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5417$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005419
5420
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5422$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005423if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo_n "(cached) " >&6
5425else
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005427/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005428#include <stdlib.h>
5429#include <stdarg.h>
5430#include <string.h>
5431#include <float.h>
5432
5433int
5434main ()
5435{
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441if ac_fn_c_try_compile "$LINENO"; then :
5442 ac_cv_header_stdc=yes
5443else
5444 ac_cv_header_stdc=no
5445fi
5446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5447
5448if test $ac_cv_header_stdc = yes; then
5449 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5451/* end confdefs.h. */
5452#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005453
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005454_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005458else
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005461rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462
Matthias Kloseb9621712010-04-24 17:59:49 +00005463fi
5464
5465if test $ac_cv_header_stdc = yes; then
5466 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
5469#include <stdlib.h>
5470
5471_ACEOF
5472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5473 $EGREP "free" >/dev/null 2>&1; then :
5474
5475else
5476 ac_cv_header_stdc=no
5477fi
5478rm -f conftest*
5479
5480fi
5481
5482if test $ac_cv_header_stdc = yes; then
5483 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5484 if test "$cross_compiling" = yes; then :
5485 :
5486else
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <ctype.h>
5490#include <stdlib.h>
5491#if ((' ' & 0x0FF) == 0x020)
5492# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5493# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5494#else
5495# define ISLOWER(c) \
5496 (('a' <= (c) && (c) <= 'i') \
5497 || ('j' <= (c) && (c) <= 'r') \
5498 || ('s' <= (c) && (c) <= 'z'))
5499# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5500#endif
5501
5502#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5503int
5504main ()
5505{
5506 int i;
5507 for (i = 0; i < 256; i++)
5508 if (XOR (islower (i), ISLOWER (i))
5509 || toupper (i) != TOUPPER (i))
5510 return 2;
5511 return 0;
5512}
5513_ACEOF
5514if ac_fn_c_try_run "$LINENO"; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5520 conftest.$ac_objext conftest.beam conftest.$ac_ext
5521fi
5522
5523fi
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5526$as_echo "$ac_cv_header_stdc" >&6; }
5527if test $ac_cv_header_stdc = yes; then
5528
5529$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5530
5531fi
5532
5533# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5535 inttypes.h stdint.h unistd.h
5536do :
5537 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5538ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5539"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005540if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005541 cat >>confdefs.h <<_ACEOF
5542#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5543_ACEOF
5544
5545fi
5546
5547done
5548
5549
5550
5551 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 +02005552if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 MINIX=yes
5554else
5555 MINIX=
5556fi
5557
5558
5559 if test "$MINIX" = yes; then
5560
5561$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5562
5563
5564$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5565
5566
5567$as_echo "#define _MINIX 1" >>confdefs.h
5568
5569 fi
5570
5571
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5573$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005574if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005575 $as_echo_n "(cached) " >&6
5576else
5577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5578/* end confdefs.h. */
5579
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005580# define __EXTENSIONS__ 1
5581 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005582int
5583main ()
5584{
5585
5586 ;
5587 return 0;
5588}
5589_ACEOF
5590if ac_fn_c_try_compile "$LINENO"; then :
5591 ac_cv_safe_to_define___extensions__=yes
5592else
5593 ac_cv_safe_to_define___extensions__=no
5594fi
5595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5596fi
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5598$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5599 test $ac_cv_safe_to_define___extensions__ = yes &&
5600 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5601
5602 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5603
5604 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5605
5606 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5607
5608 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5609
5610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611
Xavier de Gaye95750b12016-07-09 11:05:42 +02005612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5613$as_echo_n "checking for the Android API level... " >&6; }
5614cat >> conftest.c <<EOF
5615#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005616android_api = __ANDROID_API__
5617arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618#else
5619#error not Android
5620#endif
5621EOF
5622
5623if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5625 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5627$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005628 if test -z "$ANDROID_API_LEVEL"; then
5629 echo 'Fatal: you must define __ANDROID_API__'
5630 exit 1
5631 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632
5633cat >>confdefs.h <<_ACEOF
5634#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5635_ACEOF
5636
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5639$as_echo_n "checking for the Android arm ABI... " >&6; }
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5641$as_echo "$_arm_arch" >&6; }
5642 if test "$_arm_arch" = 7; then
5643 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5644 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5645 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005646else
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5648$as_echo "not Android" >&6; }
5649fi
5650rm -f conftest.c conftest.out
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652# Check for unsupported systems
5653case $ac_sys_system/$ac_sys_release in
5654atheos*|Linux*/1*)
5655 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5656 echo See README for details.
5657 exit 1;;
5658esac
5659
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5662$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005665if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 withval=$with_suffix;
5667 case $withval in
5668 no) EXEEXT=;;
5669 yes) EXEEXT=.exe;;
5670 *) EXEEXT=$withval;;
5671 esac
5672fi
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5675$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Test whether we're running on a non-case-sensitive system, in which
5678# case we give a warning if no ext is given
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5681$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682if test ! -d CaseSensitiveTestDir; then
5683mkdir CaseSensitiveTestDir
5684fi
5685
5686if test -d casesensitivetestdir
5687then
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5689$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 BUILDEXEEXT=.exe
5691else
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 BUILDEXEEXT=$EXEEXT
5695fi
5696rmdir CaseSensitiveTestDir
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698case $ac_sys_system in
5699hp*|HP*)
5700 case $CC in
5701 cc|*/cc) CC="$CC -Ae";;
5702 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703esac
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5707$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test -z "$LIBRARY"
5709then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005710 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5713$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# LDLIBRARY is the name of the library to link against (as opposed to the
5716# name of the library into which to insert object files). BLDLIBRARY is also
5717# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5718# is blank as the main program is not linked directly against LDLIBRARY.
5719# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5720# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5721# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5722# DLLLIBRARY is the shared (i.e., DLL) library.
5723#
5724# RUNSHARED is used to run shared python without installed libraries
5725#
5726# INSTSONAME is the name of the shared library that will be use to install
5727# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005728#
5729# LDVERSION is the shared library version number, normally the Python version
5730# with the ABI build flags appended.
5731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733
5734
5735
5736
5737
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739LDLIBRARY="$LIBRARY"
5740BLDLIBRARY='$(LDLIBRARY)'
5741INSTSONAME='$(LDLIBRARY)'
5742DLLLIBRARY=''
5743LDLIBRARYDIR=''
5744RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005745LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# LINKCC is the command that links the python executable -- default is $(CC).
5748# If CXX is set, and if it is needed to link a main function that was
5749# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5750# python might then depend on the C++ runtime
5751# This is altered for AIX in order to build the export list before
5752# linking.
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5755$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756if test -z "$LINKCC"
5757then
5758 LINKCC='$(PURIFY) $(MAINCC)'
5759 case $ac_sys_system in
5760 AIX*)
5761 exp_extra="\"\""
5762 if test $ac_sys_release -ge 5 -o \
5763 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5764 exp_extra="."
5765 fi
5766 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 QNX*)
5768 # qcc must be used because the other compilers do not
5769 # support -N.
5770 LINKCC=qcc;;
5771 esac
5772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5774$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
5776# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5777# make sure we default having it set to "no": this is used by
5778# distutils.unixccompiler to know if it should add --enable-new-dtags
5779# to linker command lines, and failing to detect GNU ld simply results
5780# in the same bahaviour as before.
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5783$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784ac_prog=ld
5785if test "$GCC" = yes; then
5786 ac_prog=`$CC -print-prog-name=ld`
5787fi
5788case `"$ac_prog" -V 2>&1 < /dev/null` in
5789 *GNU*)
5790 GNULD=yes;;
5791 *)
5792 GNULD=no;;
5793esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5795$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5798$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 enableval=$enable_shared;
5802fi
5803
5804
5805if test -z "$enable_shared"
5806then
5807 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005808 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 enable_shared="yes";;
5810 *)
5811 enable_shared="no";;
5812 esac
5813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5815$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5818$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005820if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821 enableval=$enable_profiling;
5822fi
5823
5824if test "x$enable_profiling" = xyes; then
5825 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005826 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828/* end confdefs.h. */
5829int main() { return 0; }
5830_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831if ac_fn_c_try_link "$LINENO"; then :
5832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836rm -f core conftest.err conftest.$ac_objext \
5837 conftest$ac_exeext conftest.$ac_ext
5838 CC="$ac_save_cc"
5839else
5840 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5843$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844
doko@ubuntu.comba015832012-06-30 16:52:05 +02005845if test "x$enable_profiling" = xyes; then
5846 BASECFLAGS="-pg $BASECFLAGS"
5847 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
5849
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5851$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
5853# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5854# library that we build, but we do not want to link against it (we
5855# will find it with a -framework option). For this reason there is an
5856# extra variable BLDLIBRARY against which Python and the extension
5857# modules are linked, BLDLIBRARY. This is normally the same as
5858# LDLIBRARY, but empty for MacOSX framework builds.
5859if test "$enable_framework"
5860then
5861 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005862 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 BLDLIBRARY=''
5864else
5865 BLDLIBRARY='$(LDLIBRARY)'
5866fi
5867
5868# Other platforms follow
5869if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005870 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
Matthias Kloseb9621712010-04-24 17:59:49 +00005872$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
5874 case $ac_sys_system in
5875 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005876 LDLIBRARY='libpython$(LDVERSION).dll.a'
5877 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ;;
5879 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005880 LDLIBRARY='libpython$(LDVERSION).so'
5881 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005882 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005884 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005885 then
5886 PY3LIBRARY=libpython3.so
5887 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005889 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005890 LDLIBRARY='libpython$(LDVERSION).so'
5891 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005892 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005894 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005895 then
5896 PY3LIBRARY=libpython3.so
5897 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
5899 hp*|HP*)
5900 case `uname -m` in
5901 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
5904 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
5907 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).dylib'
5913 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005916 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005918 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005919 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920
5921 esac
5922else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005923 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 case $ac_sys_system in
5925 CYGWIN*)
5926 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 esac
5930fi
5931
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005932if test "$cross_compiling" = yes; then
5933 RUNSHARED=
5934fi
5935
Matthias Kloseb9621712010-04-24 17:59:49 +00005936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5937$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005940if test -n "$ac_tool_prefix"; then
5941 for ac_prog in ar aal
5942 do
5943 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005947if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949else
5950 if test -n "$AR"; then
5951 ac_cv_prog_AR="$AR" # Let the user override the test.
5952else
5953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956 IFS=$as_save_IFS
5957 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005960 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 break 2
5963 fi
5964done
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966IFS=$as_save_IFS
5967
5968fi
5969fi
5970AR=$ac_cv_prog_AR
5971if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5973$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974else
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
5978
5979
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005980 test -n "$AR" && break
5981 done
5982fi
5983if test -z "$AR"; then
5984 ac_ct_AR=$AR
5985 for ac_prog in ar aal
5986do
5987 # Extract the first word of "$ac_prog", so it can be a program name with args.
5988set dummy $ac_prog; ac_word=$2
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990$as_echo_n "checking for $ac_word... " >&6; }
5991if ${ac_cv_prog_ac_ct_AR+:} false; then :
5992 $as_echo_n "(cached) " >&6
5993else
5994 if test -n "$ac_ct_AR"; then
5995 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5996else
5997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998for as_dir in $PATH
5999do
6000 IFS=$as_save_IFS
6001 test -z "$as_dir" && as_dir=.
6002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004 ac_cv_prog_ac_ct_AR="$ac_prog"
6005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006 break 2
6007 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006009 done
6010IFS=$as_save_IFS
6011
6012fi
6013fi
6014ac_ct_AR=$ac_cv_prog_ac_ct_AR
6015if test -n "$ac_ct_AR"; then
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6017$as_echo "$ac_ct_AR" >&6; }
6018else
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024 test -n "$ac_ct_AR" && break
6025done
6026
6027 if test "x$ac_ct_AR" = x; then
6028 AR="ar"
6029 else
6030 case $cross_compiling:$ac_tool_warned in
6031yes:)
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6034ac_tool_warned=yes ;;
6035esac
6036 AR=$ac_ct_AR
6037 fi
6038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039
6040
6041# tweak ARFLAGS only if the user didn't set it on the command line
6042
6043if test -z "$ARFLAGS"
6044then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006045 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047
doko@ubuntu.com58844492012-06-30 18:25:32 +02006048if test -n "$ac_tool_prefix"; then
6049 for ac_prog in readelf
6050 do
6051 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_prog_READELF+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057else
6058 if test -n "$READELF"; then
6059 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6060else
6061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006068 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
6072done
6073 done
6074IFS=$as_save_IFS
6075
6076fi
6077fi
6078READELF=$ac_cv_prog_READELF
6079if test -n "$READELF"; then
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6081$as_echo "$READELF" >&6; }
6082else
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088 test -n "$READELF" && break
6089 done
6090fi
6091if test -z "$READELF"; then
6092 ac_ct_READELF=$READELF
6093 for ac_prog in readelf
6094do
6095 # Extract the first word of "$ac_prog", so it can be a program name with args.
6096set dummy $ac_prog; ac_word=$2
6097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6098$as_echo_n "checking for $ac_word... " >&6; }
6099if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6100 $as_echo_n "(cached) " >&6
6101else
6102 if test -n "$ac_ct_READELF"; then
6103 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6104else
6105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108 IFS=$as_save_IFS
6109 test -z "$as_dir" && as_dir=.
6110 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006112 ac_cv_prog_ac_ct_READELF="$ac_prog"
6113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114 break 2
6115 fi
6116done
6117 done
6118IFS=$as_save_IFS
6119
6120fi
6121fi
6122ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6123if test -n "$ac_ct_READELF"; then
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6125$as_echo "$ac_ct_READELF" >&6; }
6126else
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128$as_echo "no" >&6; }
6129fi
6130
6131
6132 test -n "$ac_ct_READELF" && break
6133done
6134
6135 if test "x$ac_ct_READELF" = x; then
6136 READELF=":"
6137 else
6138 case $cross_compiling:$ac_tool_warned in
6139yes:)
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6142ac_tool_warned=yes ;;
6143esac
6144 READELF=$ac_ct_READELF
6145 fi
6146fi
6147
6148if test "$cross_compiling" = yes; then
6149 case "$READELF" in
6150 readelf|:)
6151 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6152 ;;
6153 esac
6154fi
6155
6156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006159hp*|HP*)
6160 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161 if test -z "$INSTALL"
6162 then
6163 INSTALL="${srcdir}/install-sh -c"
6164 fi
6165esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166# Find a good install program. We prefer a C program (faster),
6167# so one script is as good as another. But avoid the broken or
6168# incompatible versions:
6169# SysV /etc/install, /usr/sbin/install
6170# SunOS /usr/etc/install
6171# IRIX /sbin/install
6172# AIX /bin/install
6173# AmigaOS /C/install, which installs bootblocks on floppy discs
6174# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6175# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6176# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6177# OS/2's system install, which has a completely different semantic
6178# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006179# Reject install programs that cannot install multiple files.
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6181$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006183if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185else
6186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6187for as_dir in $PATH
6188do
6189 IFS=$as_save_IFS
6190 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 # Account for people who put trailing slashes in PATH elements.
6192case $as_dir/ in #((
6193 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006195 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 /usr/ucb/* ) ;;
6197 *)
6198 # OSF1 and SCO ODT 3.0 have their own names for install.
6199 # Don't use installbsd from OSF since it installs stuff as root
6200 # by default.
6201 for ac_prog in ginstall scoinst install; do
6202 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006203 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 if test $ac_prog = install &&
6205 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6206 # AIX install. It has an incompatible calling convention.
6207 :
6208 elif test $ac_prog = install &&
6209 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6210 # program-specific install script used by HP pwplus--don't use.
6211 :
6212 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 rm -rf conftest.one conftest.two conftest.dir
6214 echo one > conftest.one
6215 echo two > conftest.two
6216 mkdir conftest.dir
6217 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6218 test -s conftest.one && test -s conftest.two &&
6219 test -s conftest.dir/conftest.one &&
6220 test -s conftest.dir/conftest.two
6221 then
6222 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6223 break 3
6224 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 fi
6226 fi
6227 done
6228 done
6229 ;;
6230esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006231
6232 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233IFS=$as_save_IFS
6234
Matthias Kloseb9621712010-04-24 17:59:49 +00006235rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236
6237fi
6238 if test "${ac_cv_path_install+set}" = set; then
6239 INSTALL=$ac_cv_path_install
6240 else
6241 # As a last resort, use the slow shell script. Don't cache a
6242 # value for INSTALL within a source directory, because that will
6243 # break other packages using the cache if that directory is
6244 # removed, or if the value is a relative name.
6245 INSTALL=$ac_install_sh
6246 fi
6247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6249$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250
6251# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6252# It thinks the first close brace ends the variable substitution.
6253test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6254
6255test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6256
6257test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6258
Matthias Klose93a0ef12012-03-15 18:08:34 +01006259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6260$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6261if test -z "$MKDIR_P"; then
6262 if ${ac_cv_path_mkdir+:} false; then :
6263 $as_echo_n "(cached) " >&6
6264else
6265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6267do
6268 IFS=$as_save_IFS
6269 test -z "$as_dir" && as_dir=.
6270 for ac_prog in mkdir gmkdir; do
6271 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006272 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006273 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6274 'mkdir (GNU coreutils) '* | \
6275 'mkdir (coreutils) '* | \
6276 'mkdir (fileutils) '4.1*)
6277 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6278 break 3;;
6279 esac
6280 done
6281 done
6282 done
6283IFS=$as_save_IFS
6284
6285fi
6286
6287 test -d ./--version && rmdir ./--version
6288 if test "${ac_cv_path_mkdir+set}" = set; then
6289 MKDIR_P="$ac_cv_path_mkdir -p"
6290 else
6291 # As a last resort, use the slow shell script. Don't cache a
6292 # value for MKDIR_P within a source directory, because that will
6293 # break other packages using the cache if that directory is
6294 # removed, or if the value is a relative name.
6295 MKDIR_P="$ac_install_sh -d"
6296 fi
6297fi
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6299$as_echo "$MKDIR_P" >&6; }
6300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301
6302# Not every filesystem supports hard links
6303
6304if test -z "$LN" ; then
6305 case $ac_sys_system in
6306 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307 *) LN=ln;;
6308 esac
6309fi
6310
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006311# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006312
6313ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006314
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6317$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318
6319# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006320if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 withval=$with_pydebug;
6322if test "$withval" != no
6323then
6324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6328$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006330 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006331else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333fi
6334else
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337fi
6338
6339
Victor Stinnerf4e47032019-04-25 00:56:28 +02006340# Check for --with-trace-refs
6341# --with-trace-refs
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6343$as_echo_n "checking for --with-trace-refs... " >&6; }
6344
6345# Check whether --with-trace-refs was given.
6346if test "${with_trace_refs+set}" = set; then :
6347 withval=$with_trace_refs;
6348else
6349 with_trace_refs=no
6350fi
6351
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6353$as_echo "$with_trace_refs" >&6; }
6354
6355if test "$with_trace_refs" = "yes"
6356then
6357
6358$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6359
6360fi
6361
6362# Check for --with-assertions.
6363# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006364assertions='false'
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6366$as_echo_n "checking for --with-assertions... " >&6; }
6367
6368# Check whether --with-assertions was given.
6369if test "${with_assertions+set}" = set; then :
6370 withval=$with_assertions;
6371if test "$withval" != no
6372then
6373 assertions='true'
6374fi
6375fi
6376
6377if test "$assertions" = 'true'; then
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379$as_echo "yes" >&6; }
6380elif test "$Py_DEBUG" = 'true'; then
6381 assertions='true'
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6383$as_echo "implied by --with-pydebug" >&6; }
6384else
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389# Enable optimization flags
6390
6391
6392Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6394$as_echo_n "checking for --enable-optimizations... " >&6; }
6395# Check whether --enable-optimizations was given.
6396if test "${enable_optimizations+set}" = set; then :
6397 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006398if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006399then
6400 Py_OPT='true'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; };
6403else
6404 Py_OPT='false'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; };
6407fi
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006414 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6415 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006416 # 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 +00006417 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006418 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006419 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006420 DEF_MAKE_RULE="build_all"
6421else
6422 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006423 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006424 DEF_MAKE_RULE="all"
6425fi
6426
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006427# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6428# normal names in the default $PATH (ie: Ubuntu). They exist under the
6429# non-suffixed name in their versioned llvm directory.
6430
6431llvm_bin_dir=''
6432llvm_path="${PATH}"
6433if test "${CC}" = "clang"
6434then
6435 clang_bin=`which clang`
6436 # Some systems install clang elsewhere as a symlink to the real path
6437 # which is where the related llvm tools are located.
6438 if test -L "${clang_bin}"
6439 then
6440 clang_dir=`dirname "${clang_bin}"`
6441 clang_bin=`readlink "${clang_bin}"`
6442 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6443 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6444 fi
6445fi
6446
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6449$as_echo_n "checking for --with-lto... " >&6; }
6450
6451# Check whether --with-lto was given.
6452if test "${with_lto+set}" = set; then :
6453 withval=$with_lto;
6454if test "$withval" != no
6455then
6456 Py_LTO='true'
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6458$as_echo "yes" >&6; };
6459else
6460 Py_LTO='false'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; };
6463fi
6464else
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469if test "$Py_LTO" = 'true' ; then
6470 case $CC in
6471 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006472
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006474$as_echo_n "checking target system type... " >&6; }
6475if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006476 $as_echo_n "(cached) " >&6
6477else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006478 if test "x$target_alias" = x; then
6479 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006480else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006481 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6482 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6483fi
6484
6485fi
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6487$as_echo "$ac_cv_target" >&6; }
6488case $ac_cv_target in
6489*-*-*) ;;
6490*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6491esac
6492target=$ac_cv_target
6493ac_save_IFS=$IFS; IFS='-'
6494set x $ac_cv_target
6495shift
6496target_cpu=$1
6497target_vendor=$2
6498shift; shift
6499# Remember, the first character of IFS is used to create $*,
6500# except with old shells:
6501target_os=$*
6502IFS=$ac_save_IFS
6503case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6504
6505
6506# The aliases save the names the user supplied, while $host etc.
6507# will get canonicalized.
6508test -n "$target_alias" &&
6509 test "$program_prefix$program_suffix$program_transform_name" = \
6510 NONENONEs,x,x, &&
6511 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006512# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6513set dummy $target_alias-llvm-ar; ac_word=$2
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515$as_echo_n "checking for $ac_word... " >&6; }
6516if ${ac_cv_path_LLVM_AR+:} false; then :
6517 $as_echo_n "(cached) " >&6
6518else
6519 case $LLVM_AR in
6520 [\\/]* | ?:[\\/]*)
6521 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6522 ;;
6523 *)
6524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525for as_dir in ${llvm_path}
6526do
6527 IFS=$as_save_IFS
6528 test -z "$as_dir" && as_dir=.
6529 for ac_exec_ext in '' $ac_executable_extensions; do
6530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533 break 2
6534 fi
6535done
6536 done
6537IFS=$as_save_IFS
6538
6539 ;;
6540esac
6541fi
6542LLVM_AR=$ac_cv_path_LLVM_AR
6543if test -n "$LLVM_AR"; then
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6545$as_echo "$LLVM_AR" >&6; }
6546else
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551
6552if test -z "$ac_cv_path_LLVM_AR"; then
6553 if test "$build" = "$target"; then
6554 ac_pt_LLVM_AR=$LLVM_AR
6555 # Extract the first word of "llvm-ar", so it can be a program name with args.
6556set dummy llvm-ar; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6560 $as_echo_n "(cached) " >&6
6561else
6562 case $ac_pt_LLVM_AR in
6563 [\\/]* | ?:[\\/]*)
6564 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6565 ;;
6566 *)
6567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in ${llvm_path}
6569do
6570 IFS=$as_save_IFS
6571 test -z "$as_dir" && as_dir=.
6572 for ac_exec_ext in '' $ac_executable_extensions; do
6573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576 break 2
6577 fi
6578done
6579 done
6580IFS=$as_save_IFS
6581
6582 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6583 ;;
6584esac
6585fi
6586ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6587if test -n "$ac_pt_LLVM_AR"; then
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6589$as_echo "$ac_pt_LLVM_AR" >&6; }
6590else
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595 LLVM_AR=$ac_pt_LLVM_AR
6596 else
6597 LLVM_AR="''"
6598 fi
6599else
6600 LLVM_AR="$ac_cv_path_LLVM_AR"
6601fi
6602
6603
6604 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6605 then
6606 LLVM_AR_FOUND="found"
6607 else
6608 LLVM_AR_FOUND="not-found"
6609 fi
6610 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6611 then
6612 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6613 if test -n "${found_llvm_ar}"
6614 then
6615 LLVM_AR='/usr/bin/xcrun llvm-ar'
6616 LLVM_AR_FOUND=found
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6618$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6619 fi
6620 fi
6621 if test $LLVM_AR_FOUND = not-found
6622 then
6623 LLVM_PROFR_ERR=yes
6624 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6625 else
6626 LLVM_AR_ERR=no
6627 fi
6628 AR="${LLVM_AR}"
6629 case $ac_sys_system in
6630 Darwin*)
6631 # Any changes made here should be reflected in the GCC+Darwin case below
6632 LTOFLAGS="-flto -Wl,-export_dynamic"
6633 ;;
6634 *)
6635 LTOFLAGS="-flto"
6636 ;;
6637 esac
6638 ;;
6639 *gcc*)
6640 case $ac_sys_system in
6641 Darwin*)
6642 LTOFLAGS="-flto -Wl,-export_dynamic"
6643 ;;
6644 *)
6645 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6646 ;;
6647 esac
6648 ;;
6649 esac
6650
6651 if test "$ac_cv_prog_cc_g" = "yes"
6652 then
6653 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6654 # to get debug symbols.
6655 LTOFLAGS="$LTOFLAGS -g"
6656 fi
6657
stratakisf92c7aa2018-12-04 15:54:01 +01006658 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006659 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006660fi
6661
6662# Enable PGO flags.
6663
6664
6665
6666
6667
6668
Gregory P. Smith799520c2016-09-07 16:10:00 -07006669# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6670set dummy $target_alias-llvm-profdata; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6674 $as_echo_n "(cached) " >&6
6675else
6676 case $LLVM_PROFDATA in
6677 [\\/]* | ?:[\\/]*)
6678 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6679 ;;
6680 *)
6681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683do
6684 IFS=$as_save_IFS
6685 test -z "$as_dir" && as_dir=.
6686 for ac_exec_ext in '' $ac_executable_extensions; do
6687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690 break 2
6691 fi
6692done
6693 done
6694IFS=$as_save_IFS
6695
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696 ;;
6697esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006698fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006699LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6700if test -n "$LLVM_PROFDATA"; then
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6702$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703else
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
Gregory P. Smith799520c2016-09-07 16:10:00 -07006709if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6710 if test "$build" = "$target"; then
6711 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6712 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6713set dummy llvm-profdata; ac_word=$2
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6717 $as_echo_n "(cached) " >&6
6718else
6719 case $ac_pt_LLVM_PROFDATA in
6720 [\\/]* | ?:[\\/]*)
6721 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6722 ;;
6723 *)
6724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in ${llvm_path}
6726do
6727 IFS=$as_save_IFS
6728 test -z "$as_dir" && as_dir=.
6729 for ac_exec_ext in '' $ac_executable_extensions; do
6730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733 break 2
6734 fi
6735done
6736 done
6737IFS=$as_save_IFS
6738
6739 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6740 ;;
6741esac
6742fi
6743ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6744if test -n "$ac_pt_LLVM_PROFDATA"; then
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6746$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6747else
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749$as_echo "no" >&6; }
6750fi
6751
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6753 else
6754 LLVM_PROFDATA="''"
6755 fi
6756else
6757 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6758fi
6759
6760
6761if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6762then
6763 LLVM_PROF_FOUND="found"
6764else
6765 LLVM_PROF_FOUND="not-found"
6766fi
6767if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6768then
6769 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6770 if test -n "${found_llvm_profdata}"
6771 then
6772 # llvm-profdata isn't directly in $PATH in some cases.
6773 # https://apple.stackexchange.com/questions/197053/
6774 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6775 LLVM_PROF_FOUND=found
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6777$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6778 fi
6779fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780LLVM_PROF_ERR=no
6781case $CC in
6782 *clang*)
6783 # Any changes made here should be reflected in the GCC+Darwin case below
6784 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6785 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006786 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6788 if test $LLVM_PROF_FOUND = not-found
6789 then
6790 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 if test "${REQUIRE_PGO}" = "yes"
6792 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006793 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 -07006794 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 fi
6796 ;;
6797 *gcc*)
6798 case $ac_sys_system in
6799 Darwin*)
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\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 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 *)
6814 PGO_PROF_GEN_FLAG="-fprofile-generate"
6815 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6816 LLVM_PROF_MERGER="true"
6817 LLVM_PROF_FILE=""
6818 ;;
6819 esac
6820 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006821 *icc*)
6822 PGO_PROF_GEN_FLAG="-prof-gen"
6823 PGO_PROF_USE_FLAG="-prof-use"
6824 LLVM_PROF_MERGER="true"
6825 LLVM_PROF_FILE=""
6826 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827esac
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6830# merged with this chunk of code?
6831
6832# Optimizer/debugger flags
6833# ------------------------
6834# (The following bit of code is complicated enough - please keep things
6835# indented properly. Just pretend you're editing Python code. ;-)
6836
6837# There are two parallel sets of case statements below, one that checks to
6838# see if OPT was set and one that does BASECFLAGS setting based upon
6839# compiler and platform. BASECFLAGS tweaks need to be made even if the
6840# user set OPT.
6841
Victor Stinner23a683a2019-04-12 21:27:37 +02006842case $CC in
6843 *clang*)
6844 cc_is_clang=1
6845 ;;
6846 *)
6847 if $CC --version 2>&1 | grep -q clang
6848 then
6849 cc_is_clang=1
6850 else
6851 cc_is_clang=
6852 fi
6853esac
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855# tweak OPT based on compiler and platform, only if the user didn't set
6856# it on the command line
6857
Victor Stinner9ed34a82017-05-02 22:35:58 +02006858
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006859if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860then
6861 case $GCC in
6862 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6864 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6865 WRAP="-fwrapv"
6866 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006867
Victor Stinner35f3d242017-04-21 12:35:24 +02006868 if test -n "${cc_is_clang}"
6869 then
6870 # Clang also needs -fwrapv
6871 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006872 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6873 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006874 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006875 fi
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 case $ac_cv_prog_cc_g in
6878 yes)
6879 if test "$Py_DEBUG" = 'true' ; then
6880 # Optimization messes up debuggers, so turn it off for
6881 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 else
Victor Stinner28205b22017-04-21 11:24:34 +02006885 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006886 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 else
Victor Stinner28205b22017-04-21 11:24:34 +02006888 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 fi
6890 ;;
6891 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006892 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 ;;
6894 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896 case $ac_sys_system in
6897 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6898 ;;
6899 esac
6900 ;;
6901
6902 *)
6903 OPT="-O"
6904 ;;
6905 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
6907
Victor Stinner23a683a2019-04-12 21:27:37 +02006908if test -n "${cc_is_clang}"
6909then
6910 # bpo-36618: Add -fmax-type-align=8 to CFLAGS when clang compiler is
6911 # detected. The pymalloc memory allocator aligns memory on 8 bytes. On
6912 # x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
6913 # instruction which can lead to segmentation fault. Instruct clang that
6914 # Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
6915 # instead: slower but don't trigger a SIGSEGV if the memory is not aligned
6916 # on 16 bytes.
6917 #
Victor Stinnera304b132019-04-13 00:51:07 +02006918 # Sadly, the flag must be added to CFLAGS and not just CFLAGS_NODIST,
Victor Stinner23a683a2019-04-12 21:27:37 +02006919 # since third party C extensions can have the same issue.
Victor Stinnera304b132019-04-13 00:51:07 +02006920 #
6921 # Check if -fmax-type-align flag is supported (it's not supported by old
6922 # clang versions):
6923 if "$CC" -v --help 2>/dev/null |grep -- -fmax-type-align > /dev/null; then
6924 CFLAGS="$CFLAGS -fmax-type-align=8"
6925 fi
Victor Stinner23a683a2019-04-12 21:27:37 +02006926fi
6927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928
6929
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006930
stratakiscf10a752018-12-19 18:19:01 +01006931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932# The -arch flags for universal builds on OSX
6933UNIVERSAL_ARCH_FLAGS=
6934
6935
6936# tweak BASECFLAGS based on compiler and platform
6937case $GCC in
6938yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006939 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006940
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6942$as_echo_n "checking for -Wextra... " >&6; }
6943 ac_save_cc="$CC"
6944 CC="$CC -Wextra -Werror"
6945 if ${ac_cv_extra_warnings+:} false; then :
6946 $as_echo_n "(cached) " >&6
6947else
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949/* end confdefs.h. */
6950
6951
6952int
6953main ()
6954{
6955
6956 ;
6957 return 0;
6958}
6959
6960_ACEOF
6961if ac_fn_c_try_compile "$LINENO"; then :
6962
6963 ac_cv_extra_warnings=yes
6964
6965else
6966
6967 ac_cv_extra_warnings=no
6968
6969fi
6970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6971fi
6972
6973 CC="$ac_save_cc"
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6975$as_echo "$ac_cv_extra_warnings" >&6; }
6976
6977 if test $ac_cv_extra_warnings = yes
6978 then
6979 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6980 fi
6981
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006982 # Python doesn't violate C99 aliasing rules, but older versions of
6983 # GCC produce warnings for legal Python code. Enable
6984 # -fno-strict-aliasing on versions of GCC that support but produce
6985 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6987$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988 ac_save_cc="$CC"
6989 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006990 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006991 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006993else
Matthias Kloseb9621712010-04-24 17:59:49 +00006994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006996
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998int
6999main ()
7000{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007001
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007002 ;
7003 return 0;
7004}
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007008
7009 CC="$ac_save_cc -fstrict-aliasing"
7010 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012/* end confdefs.h. */
7013
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007014 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015int
7016main ()
7017{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007018double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019 ;
7020 return 0;
7021}
Matthias Kloseb159a552010-04-25 21:00:44 +00007022
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=no
7027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028else
Matthias Kloseb159a552010-04-25 21:00:44 +00007029
7030 ac_cv_no_strict_aliasing=yes
7031
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007032fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007035else
Matthias Kloseb159a552010-04-25 21:00:44 +00007036
7037 ac_cv_no_strict_aliasing=no
7038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007039fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007041fi
7042
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7046$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007047 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048 then
7049 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7050 fi
7051
Zachary Ware5af85642015-12-21 12:09:17 -06007052 # ICC doesn't recognize the option, but only emits a warning
7053 ## XXX does it emit an unused result warning and can it be disabled?
7054 case "$CC" in
7055 *icc*)
7056 ac_cv_disable_unused_result_warning=no
7057 ;;
7058 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7060$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7061 ac_save_cc="$CC"
7062 CC="$CC -Wunused-result -Werror"
7063 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007064 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007065 $as_echo_n "(cached) " >&6
7066else
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h. */
7069
7070
7071int
7072main ()
7073{
7074
7075 ;
7076 return 0;
7077}
7078
7079_ACEOF
7080if ac_fn_c_try_compile "$LINENO"; then :
7081
7082 ac_cv_disable_unused_result_warning=yes
7083
7084else
7085
7086 ac_cv_disable_unused_result_warning=no
7087
7088fi
7089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7090fi
7091
7092 CFLAGS="$save_CFLAGS"
7093 CC="$ac_save_cc"
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7095$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007096 ;;
7097 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007098
7099 if test $ac_cv_disable_unused_result_warning = yes
7100 then
7101 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007102 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7103 fi
7104
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7106$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7107 ac_save_cc="$CC"
7108 CC="$CC -Wunused-parameter -Werror"
7109 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7110 $as_echo_n "(cached) " >&6
7111else
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113/* end confdefs.h. */
7114
7115
7116int
7117main ()
7118{
7119
7120 ;
7121 return 0;
7122}
7123
7124_ACEOF
7125if ac_fn_c_try_compile "$LINENO"; then :
7126
7127 ac_cv_disable_unused_parameter_warning=yes
7128
7129else
7130
7131 ac_cv_disable_unused_parameter_warning=no
7132
7133fi
7134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7135fi
7136
7137 CC="$ac_save_cc"
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7139$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7140
7141 if test $ac_cv_disable_unused_parameter_warning = yes
7142 then
7143 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7144 fi
7145
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7147$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7148 ac_save_cc="$CC"
7149 CC="$CC -Wmissing-field-initializers -Werror"
7150 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7151 $as_echo_n "(cached) " >&6
7152else
7153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7154/* end confdefs.h. */
7155
7156
7157int
7158main ()
7159{
7160
7161 ;
7162 return 0;
7163}
7164
7165_ACEOF
7166if ac_fn_c_try_compile "$LINENO"; then :
7167
7168 ac_cv_disable_missing_field_initializers=yes
7169
7170else
7171
7172 ac_cv_disable_missing_field_initializers=no
7173
7174fi
7175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176fi
7177
7178 CC="$ac_save_cc"
7179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7180$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7181
7182 if test $ac_cv_disable_missing_field_initializers = yes
7183 then
7184 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007185 fi
7186
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7188$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7189 ac_save_cc="$CC"
7190 CC="$CC -Wsign-compare"
7191 save_CFLAGS="$CFLAGS"
7192 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7193 $as_echo_n "(cached) " >&6
7194else
7195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7196/* end confdefs.h. */
7197
7198
7199int
7200main ()
7201{
7202
7203 ;
7204 return 0;
7205}
7206
7207_ACEOF
7208if ac_fn_c_try_compile "$LINENO"; then :
7209
7210 ac_cv_enable_sign_compare_warning=yes
7211
7212else
7213
7214 ac_cv_enable_sign_compare_warning=no
7215
7216fi
7217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7218fi
7219
7220 CFLAGS="$save_CFLAGS"
7221 CC="$ac_save_cc"
7222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7223$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7224
7225 if test $ac_cv_enable_sign_compare_warning = yes
7226 then
7227 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7228 fi
7229
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7231$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7232 ac_save_cc="$CC"
7233 CC="$CC -Wunreachable-code"
7234 save_CFLAGS="$CFLAGS"
7235 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237else
7238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7239/* end confdefs.h. */
7240
7241
7242int
7243main ()
7244{
7245
7246 ;
7247 return 0;
7248}
7249
7250_ACEOF
7251if ac_fn_c_try_compile "$LINENO"; then :
7252
7253 ac_cv_enable_unreachable_code_warning=yes
7254
7255else
7256
7257 ac_cv_enable_unreachable_code_warning=no
7258
7259fi
7260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261fi
7262
7263 CFLAGS="$save_CFLAGS"
7264 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007265
7266 # Don't enable unreachable code warning in debug mode, since it usually
7267 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007268 # Issue #24324: Unfortunately, the unreachable code warning does not work
7269 # correctly on gcc and has been silently removed from the compiler.
7270 # It is supported on clang but on OS X systems gcc may be an alias
7271 # for clang. Try to determine if the compiler is not really gcc and,
7272 # if so, only then enable the warning.
7273 if test $ac_cv_enable_unreachable_code_warning = yes && \
7274 test "$Py_DEBUG" != "true" && \
7275 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007276 then
7277 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007278 else
7279 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007280 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7282$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007283
INADA Naokie3364842018-06-05 20:40:53 +09007284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7285$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7286 ac_save_cc="$CC"
7287 CC="$CC -Werror -Wstrict-prototypes"
7288 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7289 $as_echo_n "(cached) " >&6
7290else
7291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7292/* end confdefs.h. */
7293
7294
7295int
7296main ()
7297{
7298
7299 ;
7300 return 0;
7301}
7302
7303_ACEOF
7304if ac_fn_c_try_compile "$LINENO"; then :
7305
7306 ac_cv_enable_strict_prototypes_warning=yes
7307
7308else
7309
7310 ac_cv_enable_strict_prototypes_warning=no
7311
7312fi
7313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7314fi
7315
7316 CC="$ac_save_cc"
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7318$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7319
7320 if test $ac_cv_enable_strict_prototypes_warning = yes
7321 then
7322 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7323 fi
7324
Victor Stinner193ee0a2017-02-06 14:24:00 +01007325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7326$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7327 ac_save_cc="$CC"
7328 CC="$CC -Werror=implicit-function-declaration"
7329 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7330 $as_echo_n "(cached) " >&6
7331else
7332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7333/* end confdefs.h. */
7334
7335
7336int
7337main ()
7338{
7339
7340 ;
7341 return 0;
7342}
7343
7344_ACEOF
7345if ac_fn_c_try_compile "$LINENO"; then :
7346
7347 ac_cv_enable_implicit_function_declaration_error=yes
7348
7349else
7350
7351 ac_cv_enable_implicit_function_declaration_error=no
7352
7353fi
7354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7355fi
7356
7357 CC="$ac_save_cc"
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7359$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7360
7361 if test $ac_cv_enable_implicit_function_declaration_error = yes
7362 then
7363 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7364 fi
7365
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7367 # support. Without this, treatment of subnormals doesn't follow
7368 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007369 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370 alpha*)
7371 BASECFLAGS="$BASECFLAGS -mieee"
7372 ;;
7373 esac
7374
7375 case $ac_sys_system in
7376 SCO_SV*)
7377 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7378 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 Darwin*)
7381 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7382 # used to be here, but non-Apple gcc doesn't accept them.
7383 if test "${CC}" = gcc
7384 then
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007386$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 case "${UNIVERSALSDK}" in
7388 */MacOSX10.4u.sdk)
7389 # Build using 10.4 SDK, force usage of gcc when the
7390 # compiler is gcc, otherwise the user will get very
7391 # confusing error messages when building on OSX 10.6
7392 CC=gcc-4.0
7393 CPP=cpp-4.0
7394 ;;
7395 esac
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007397$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007398 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399
Ned Deily87adb6e2013-10-18 21:09:56 -07007400 if test "${enable_universalsdk}"
7401 then
7402 case "$UNIVERSAL_ARCHS" in
7403 32-bit)
7404 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7405 LIPO_32BIT_FLAGS=""
7406 ARCH_RUN_32BIT=""
7407 ;;
7408 64-bit)
7409 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7410 LIPO_32BIT_FLAGS=""
7411 ARCH_RUN_32BIT="true"
7412 ;;
7413 all)
7414 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7415 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7416 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7417 ;;
7418 intel)
7419 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7420 LIPO_32BIT_FLAGS="-extract i386"
7421 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7422 ;;
7423 intel-32)
7424 UNIVERSAL_ARCH_FLAGS="-arch i386"
7425 LIPO_32BIT_FLAGS=""
7426 ARCH_RUN_32BIT=""
7427 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007428 intel-64)
7429 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7430 LIPO_32BIT_FLAGS=""
7431 ARCH_RUN_32BIT="true"
7432 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007433 3-way)
7434 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7435 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7436 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7437 ;;
7438 *)
7439 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7440 ;;
7441 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 if test "${UNIVERSALSDK}" != "/"
7444 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007445 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7446 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007448 else
7449 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7450 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 fi
7452 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453
Ned Deily87adb6e2013-10-18 21:09:56 -07007454 # Calculate an appropriate deployment target for this build:
7455 # The deployment target value is used explicitly to enable certain
7456 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007457 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007458 # component of the string returned by distutils.get_platform().
7459 #
7460 # Use the value from:
7461 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7462 # 2. the operating system version of the build machine if >= 10.6
7463 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7464 # below to pick either 10.3, 10.4, or 10.5 as the target.
7465 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466
Ned Deily87adb6e2013-10-18 21:09:56 -07007467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7468$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007469 cur_target_major=`sw_vers -productVersion | \
7470 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7471 cur_target_minor=`sw_vers -productVersion | \
7472 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7473 cur_target="${cur_target_major}.${cur_target_minor}"
7474 if test ${cur_target_major} -eq 10 && \
7475 test ${cur_target_minor} -ge 3 && \
7476 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007477 then
Ned Deily36820b62014-06-25 13:44:22 -07007478 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007479 cur_target=10.3
7480 if test ${enable_universalsdk}
7481 then
7482 case "$UNIVERSAL_ARCHS" in
7483 all|3-way|intel|64-bit)
7484 # These configurations were first supported in 10.5
7485 cur_target='10.5'
7486 ;;
7487 esac
7488 else
7489 if test `/usr/bin/arch` = "i386"
7490 then
7491 # 10.4 was the first release to support Intel archs
7492 cur_target="10.4"
7493 fi
7494 fi
7495 fi
7496 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007497
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7499 # environment with a value that is the same as what we'll use
7500 # in the Makefile to ensure that we'll get the same compiler
7501 # environment during configure and build time.
7502 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7503 export MACOSX_DEPLOYMENT_TARGET
7504 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7506$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007507
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 # end of Darwin* tests
7509 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510 esac
7511 ;;
7512
7513*)
7514 case $ac_sys_system in
7515 OpenUNIX*|UnixWare*)
7516 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7517 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518 SCO_SV*)
7519 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7520 ;;
7521 esac
7522 ;;
7523esac
7524
Zachary Ware5af85642015-12-21 12:09:17 -06007525# ICC needs -fp-model strict or floats behave badly
7526case "$CC" in
7527*icc*)
7528 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7529 ;;
7530esac
7531
T. Woutersddbfa2c2017-05-23 01:30:49 +02007532if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533 :
7534else
7535 OPT="-DNDEBUG $OPT"
7536fi
7537
7538if test "$ac_arch_flags"
7539then
7540 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7541fi
7542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543# On some compilers, pthreads are available without further options
7544# (e.g. MacOS X). On some of these systems, the compiler will not
7545# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7546# So we have to see first whether pthreads are available without
7547# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7549$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007550if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552else
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554 ac_cv_pthread_is_default=no
7555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557/* end confdefs.h. */
7558
Stefan Krah7dba5942012-11-22 22:49:11 +01007559#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560#include <pthread.h>
7561
7562void* routine(void* p){return NULL;}
7563
7564int main(){
7565 pthread_t p;
7566 if(pthread_create(&p,NULL,routine,NULL)!=0)
7567 return 1;
7568 (void)pthread_detach(p);
7569 return 0;
7570}
7571
7572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007573if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574
7575 ac_cv_pthread_is_default=yes
7576 ac_cv_kthread=no
7577 ac_cv_pthread=no
7578
7579else
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007584fi
7585
7586
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587fi
7588
Matthias Kloseb9621712010-04-24 17:59:49 +00007589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7590$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591
7592
7593if test $ac_cv_pthread_is_default = yes
7594then
7595 ac_cv_kpthread=no
7596else
7597# -Kpthread, if available, provides the right #defines
7598# and linker options to make pthread_create available
7599# Some compilers won't report that they do not support -Kpthread,
7600# so we need to run a program to see whether it really made the
7601# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7603$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606else
7607 ac_save_cc="$CC"
7608CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007609if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610 ac_cv_kpthread=no
7611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613/* end confdefs.h. */
7614
Stefan Krah7dba5942012-11-22 22:49:11 +01007615#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616#include <pthread.h>
7617
7618void* routine(void* p){return NULL;}
7619
7620int main(){
7621 pthread_t p;
7622 if(pthread_create(&p,NULL,routine,NULL)!=0)
7623 return 1;
7624 (void)pthread_detach(p);
7625 return 0;
7626}
7627
7628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630 ac_cv_kpthread=yes
7631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638CC="$ac_save_cc"
7639fi
7640
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7642$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643fi
7644
7645if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7646then
7647# -Kthread, if available, provides the right #defines
7648# and linker options to make pthread_create available
7649# Some compilers won't report that they do not support -Kthread,
7650# so we need to run a program to see whether it really made the
7651# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7653$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656else
7657 ac_save_cc="$CC"
7658CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 ac_cv_kthread=no
7661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663/* end confdefs.h. */
7664
Stefan Krah7dba5942012-11-22 22:49:11 +01007665#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666#include <pthread.h>
7667
7668void* routine(void* p){return NULL;}
7669
7670int main(){
7671 pthread_t p;
7672 if(pthread_create(&p,NULL,routine,NULL)!=0)
7673 return 1;
7674 (void)pthread_detach(p);
7675 return 0;
7676}
7677
7678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007679if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007680 ac_cv_kthread=yes
7681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688CC="$ac_save_cc"
7689fi
7690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7692$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693fi
7694
7695if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7696then
7697# -pthread, if available, provides the right #defines
7698# and linker options to make pthread_create available
7699# Some compilers won't report that they do not support -pthread,
7700# so we need to run a program to see whether it really made the
7701# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7703$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007704if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706else
7707 ac_save_cc="$CC"
7708CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007709if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710 ac_cv_pthread=no
7711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713/* end confdefs.h. */
7714
Stefan Krah7dba5942012-11-22 22:49:11 +01007715#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716#include <pthread.h>
7717
7718void* routine(void* p){return NULL;}
7719
7720int main(){
7721 pthread_t p;
7722 if(pthread_create(&p,NULL,routine,NULL)!=0)
7723 return 1;
7724 (void)pthread_detach(p);
7725 return 0;
7726}
7727
7728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007729if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007730 ac_cv_pthread=yes
7731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
7737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738CC="$ac_save_cc"
7739fi
7740
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7742$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743fi
7744
7745# If we have set a CC compiler flag for thread support then
7746# check if it works for CXX, too.
7747ac_cv_cxx_thread=no
7748if test ! -z "$CXX"
7749then
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7751$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752ac_save_cxx="$CXX"
7753
7754if test "$ac_cv_kpthread" = "yes"
7755then
7756 CXX="$CXX -Kpthread"
7757 ac_cv_cxx_thread=yes
7758elif test "$ac_cv_kthread" = "yes"
7759then
7760 CXX="$CXX -Kthread"
7761 ac_cv_cxx_thread=yes
7762elif test "$ac_cv_pthread" = "yes"
7763then
7764 CXX="$CXX -pthread"
7765 ac_cv_cxx_thread=yes
7766fi
7767
7768if test $ac_cv_cxx_thread = yes
7769then
7770 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7771 $CXX -c conftest.$ac_ext 2>&5
7772 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7773 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7774 then
7775 ac_cv_cxx_thread=yes
7776 else
7777 ac_cv_cxx_thread=no
7778 fi
7779 rm -fr conftest*
7780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7782$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784CXX="$ac_save_cxx"
7785
7786
7787# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7789$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007790if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794/* end confdefs.h. */
7795#include <stdlib.h>
7796#include <stdarg.h>
7797#include <string.h>
7798#include <float.h>
7799
7800int
7801main ()
7802{
7803
7804 ;
7805 return 0;
7806}
7807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007808if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809 ac_cv_header_stdc=yes
7810else
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7814
7815if test $ac_cv_header_stdc = yes; then
7816 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007818/* end confdefs.h. */
7819#include <string.h>
7820
7821_ACEOF
7822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 $EGREP "memchr" >/dev/null 2>&1; then :
7824
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825else
7826 ac_cv_header_stdc=no
7827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007828rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007829
7830fi
7831
7832if test $ac_cv_header_stdc = yes; then
7833 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835/* end confdefs.h. */
7836#include <stdlib.h>
7837
7838_ACEOF
7839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 $EGREP "free" >/dev/null 2>&1; then :
7841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842else
7843 ac_cv_header_stdc=no
7844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007845rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846
7847fi
7848
7849if test $ac_cv_header_stdc = yes; then
7850 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852 :
7853else
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855/* end confdefs.h. */
7856#include <ctype.h>
7857#include <stdlib.h>
7858#if ((' ' & 0x0FF) == 0x020)
7859# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7860# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7861#else
7862# define ISLOWER(c) \
7863 (('a' <= (c) && (c) <= 'i') \
7864 || ('j' <= (c) && (c) <= 'r') \
7865 || ('s' <= (c) && (c) <= 'z'))
7866# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7867#endif
7868
7869#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7870int
7871main ()
7872{
7873 int i;
7874 for (i = 0; i < 256; i++)
7875 if (XOR (islower (i), ISLOWER (i))
7876 || toupper (i) != TOUPPER (i))
7877 return 2;
7878 return 0;
7879}
7880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if ac_fn_c_try_run "$LINENO"; then :
7882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888fi
7889
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890fi
7891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7893$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007894if test $ac_cv_header_stdc = yes; then
7895
Matthias Kloseb9621712010-04-24 17:59:49 +00007896$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007897
7898fi
7899
stratakise768c862018-01-23 16:11:24 +01007900for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007901fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007902ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007903sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007904utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007905poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007906sys/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 +01007907sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007908sys/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 +01007909sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007910sys/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 -07007911libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007912linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007913sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007914do :
7915 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7916ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007917if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007919#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
7921
7922fi
7923
Guido van Rossum627b2d71993-12-24 10:39:16 +00007924done
7925
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007927for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7930$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007931if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936#include <sys/types.h>
7937#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
7942if ((DIR *) 0)
7943return 0;
7944 ;
7945 return 0;
7946}
7947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955eval ac_res=\$$as_ac_Header
7956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7957$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007960#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007961_ACEOF
7962
7963ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007964fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966done
7967# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7968if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7970$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007971if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973else
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978/* Override any GCC internal prototype to avoid an error.
7979 Use char because int might match the return type of a GCC
7980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007981#ifdef __cplusplus
7982extern "C"
7983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007984char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007985int
7986main ()
7987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ;
7990 return 0;
7991}
7992_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993for ac_lib in '' dir; do
7994 if test -z "$ac_lib"; then
7995 ac_res="none required"
7996 else
7997 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007998 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008005 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008done
Victor Stinnere0be4232011-10-25 13:06:09 +02008009if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011else
8012 ac_cv_search_opendir=no
8013fi
8014rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008015LIBS=$ac_func_search_save_LIBS
8016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8018$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008020if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008022
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Michael W. Hudson54241132001-12-07 15:38:26 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8027$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008030else
8031 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035/* Override any GCC internal prototype to avoid an error.
8036 Use char because int might match the return type of a GCC
8037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008038#ifdef __cplusplus
8039extern "C"
8040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008041char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ;
8047 return 0;
8048}
8049_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050for ac_lib in '' x; do
8051 if test -z "$ac_lib"; then
8052 ac_res="none required"
8053 else
8054 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008055 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060rm -f core conftest.err conftest.$ac_objext \
8061 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008062 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065done
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068else
8069 ac_cv_search_opendir=no
8070fi
8071rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008072LIBS=$ac_func_search_save_LIBS
8073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8075$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008077if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080fi
8081
8082fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008083
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8085$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008086if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008091#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008092int
8093main ()
8094{
8095return makedev(0, 0);
8096 ;
8097 return 0;
8098}
8099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008100if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008101 ac_cv_header_sys_types_h_makedev=yes
8102else
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105rm -f core conftest.err conftest.$ac_objext \
8106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107
8108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8110$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008111
8112if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008113ac_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 +02008114if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008117
8118fi
8119
8120
8121
8122 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 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 +02008124if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008127
8128fi
8129
8130
8131 fi
8132fi
8133
Michael W. Hudson54241132001-12-07 15:38:26 +00008134
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008135# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8136# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8137SAVE_CFLAGS=$CFLAGS
8138CFLAGS="-std=c99 $CFLAGS"
8139for ac_header in bluetooth/bluetooth.h
8140do :
8141 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8142if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8143 cat >>confdefs.h <<_ACEOF
8144#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8145_ACEOF
8146
8147fi
8148
8149done
8150
8151CFLAGS=$SAVE_CFLAGS
8152
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008153# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8154for ac_header in net/if.h
8155do :
8156 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8157#ifdef STDC_HEADERS
8158# include <stdlib.h>
8159# include <stddef.h>
8160#else
8161# ifdef HAVE_STDLIB_H
8162# include <stdlib.h>
8163# endif
8164#endif
8165#ifdef HAVE_SYS_SOCKET_H
8166# include <sys/socket.h>
8167#endif
8168
8169"
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008171 cat >>confdefs.h <<_ACEOF
8172#define HAVE_NET_IF_H 1
8173_ACEOF
8174
8175fi
8176
8177done
8178
8179
Martin v. Löwis11017b12006-01-14 18:12:57 +00008180# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008181for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008182do :
8183 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 +00008184#ifdef HAVE_ASM_TYPES_H
8185#include <asm/types.h>
8186#endif
8187#ifdef HAVE_SYS_SOCKET_H
8188#include <sys/socket.h>
8189#endif
8190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191"
Victor Stinnere0be4232011-10-25 13:06:09 +02008192if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008194#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008195_ACEOF
8196
8197fi
8198
8199done
8200
8201
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008202# On Linux, qrtr.h requires asm/types.h
8203for ac_header in linux/qrtr.h
8204do :
8205 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8206#ifdef HAVE_ASM_TYPES_H
8207#include <asm/types.h>
8208#endif
8209#ifdef HAVE_SYS_SOCKET_H
8210#include <sys/socket.h>
8211#endif
8212
8213"
8214if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8215 cat >>confdefs.h <<_ACEOF
8216#define HAVE_LINUX_QRTR_H 1
8217_ACEOF
8218
8219fi
8220
8221done
8222
8223
caaveryeffc12f2017-09-06 18:18:10 -04008224for ac_header in linux/vm_sockets.h
8225do :
8226 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8227#ifdef HAVE_SYS_SOCKET_H
8228#include <sys/socket.h>
8229#endif
8230
8231"
8232if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8233 cat >>confdefs.h <<_ACEOF
8234#define HAVE_LINUX_VM_SOCKETS_H 1
8235_ACEOF
8236
8237fi
8238
8239done
8240
8241
Charles-François Natali47413c12011-10-06 19:47:44 +02008242# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008243for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008244do :
8245 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8246ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8247#ifdef HAVE_SYS_SOCKET_H
8248#include <sys/socket.h>
8249#endif
8250
8251"
8252if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8253 cat >>confdefs.h <<_ACEOF
8254#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8255_ACEOF
8256
8257fi
8258
8259done
8260
8261
Guido van Rossum627b2d71993-12-24 10:39:16 +00008262# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008263was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8265$as_echo_n "checking for clock_t in time.h... " >&6; }
8266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008268#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008269
8270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008272 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008273 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008274else
Martin v. Löwis11437992002-04-12 09:54:03 +00008275
8276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008278
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008279
Guido van Rossum627b2d71993-12-24 10:39:16 +00008280fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008281rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8284$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8287$as_echo_n "checking for makedev... " >&6; }
8288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008290
Jesus Cea740f53a2010-04-28 11:35:30 +00008291#if defined(MAJOR_IN_MKDEV)
8292#include <sys/mkdev.h>
8293#elif defined(MAJOR_IN_SYSMACROS)
8294#include <sys/sysmacros.h>
8295#else
8296#include <sys/types.h>
8297#endif
8298
Neal Norwitz11690112002-07-30 01:08:28 +00008299int
8300main ()
8301{
Jesus Cea740f53a2010-04-28 11:35:30 +00008302
8303 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008304 ;
8305 return 0;
8306}
Matthias Kloseb159a552010-04-25 21:00:44 +00008307
Neal Norwitz11690112002-07-30 01:08:28 +00008308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008309if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008310 ac_cv_has_makedev=yes
8311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314rm -f core conftest.err conftest.$ac_objext \
8315 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8317$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008318if test "$ac_cv_has_makedev" = "yes"; then
8319
Matthias Kloseb9621712010-04-24 17:59:49 +00008320$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008321
8322fi
8323
Christian Heimes985ecdc2013-11-20 11:46:18 +01008324# byte swapping
8325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8326$as_echo_n "checking for le64toh... " >&6; }
8327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8328/* end confdefs.h. */
8329
8330#ifdef HAVE_ENDIAN_H
8331#include <endian.h>
8332#elif defined(HAVE_SYS_ENDIAN_H)
8333#include <sys/endian.h>
8334#endif
8335
8336int
8337main ()
8338{
8339
8340 le64toh(1)
8341 ;
8342 return 0;
8343}
8344
8345_ACEOF
8346if ac_fn_c_try_link "$LINENO"; then :
8347 ac_cv_has_le64toh=yes
8348else
8349 ac_cv_has_le64toh=no
8350fi
8351rm -f core conftest.err conftest.$ac_objext \
8352 conftest$ac_exeext conftest.$ac_ext
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8354$as_echo "$ac_cv_has_le64toh" >&6; }
8355if test "$ac_cv_has_le64toh" = "yes"; then
8356
8357$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8358
8359fi
8360
Martin v. Löwis399a6892002-10-04 10:22:02 +00008361use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008362# Don't use largefile support for GNU/Hurd
8363case $ac_sys_system in GNU*)
8364 use_lfs=no
8365esac
8366
Martin v. Löwis399a6892002-10-04 10:22:02 +00008367if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008368# Two defines needed to enable largefile support on various platforms
8369# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008370case $ac_sys_system/$ac_sys_release in
8371AIX*)
8372
8373$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8374
8375 ;;
8376esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
8380
Matthias Kloseb9621712010-04-24 17:59:49 +00008381$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008382
Martin v. Löwis399a6892002-10-04 10:22:02 +00008383fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008384
Guido van Rossum84e7b241996-08-19 21:59:00 +00008385# Add some code to confdefs.h so that the test for off_t works on SCO
8386cat >> confdefs.h <<\EOF
8387#if defined(SCO_DS)
8388#undef _OFF_T
8389#endif
8390EOF
8391
Guido van Rossumef2255b2000-03-10 22:30:29 +00008392# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008393ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008394if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
8398cat >>confdefs.h <<_ACEOF
8399#define mode_t int
8400_ACEOF
8401
8402fi
8403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008405if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008406
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008407else
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
8409cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
8412
8413fi
8414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008418else
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
8420cat >>confdefs.h <<_ACEOF
8421#define pid_t int
8422_ACEOF
8423
8424fi
8425
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008428#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008429_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008430
Matthias Kloseb9621712010-04-24 17:59:49 +00008431ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008432if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434else
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
8436cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008438_ACEOF
8439
8440fi
8441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8443$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008449#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008450
8451_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454 ac_cv_type_uid_t=yes
8455else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008456 ac_cv_type_uid_t=no
8457fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008458rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8462$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008463if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467
Matthias Kloseb9621712010-04-24 17:59:49 +00008468$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469
8470fi
8471
Mark Dickinson983bc162012-12-02 12:11:38 +00008472
Matthias Kloseb9621712010-04-24 17:59:49 +00008473ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008477
8478fi
8479
Stefan Krah1919b7e2012-03-21 18:25:23 +01008480ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8481if test "x$ac_cv_type___uint128_t" = xyes; then :
8482
8483$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8484
8485fi
8486
Jack Jansendd19cf82001-12-06 22:36:17 +00008487
Michael W. Hudson54241132001-12-07 15:38:26 +00008488# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008489# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8495$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_int" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_int=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8514$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008519#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8528$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_long" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_long=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8547$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008552#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008554
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8561$as_echo_n "checking size of long long... " >&6; }
8562if ${ac_cv_sizeof_long_long+:} false; then :
8563 $as_echo_n "(cached) " >&6
8564else
8565 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8566
8567else
8568 if test "$ac_cv_type_long_long" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8571as_fn_error 77 "cannot compute sizeof (long long)
8572See \`config.log' for more details" "$LINENO" 5; }
8573 else
8574 ac_cv_sizeof_long_long=0
8575 fi
8576fi
8577
8578fi
8579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8580$as_echo "$ac_cv_sizeof_long_long" >&6; }
8581
8582
8583
8584cat >>confdefs.h <<_ACEOF
8585#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8586_ACEOF
8587
8588
8589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8594$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_void_p" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_void_p=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8613$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008618#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008620
8621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8627$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_short" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 else
8640 ac_cv_sizeof_short=0
8641 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8646$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647
8648
8649
Martin v. Löwis11437992002-04-12 09:54:03 +00008650cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008651#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008652_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008653
8654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8660$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 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 +00008665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if test "$ac_cv_type_float" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008670as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008671See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672 else
8673 ac_cv_sizeof_float=0
8674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8679$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680
8681
8682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008684#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008686
8687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8693$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008694if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008696else
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 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 +00008698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699else
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 if test "$ac_cv_type_double" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008703as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008704See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705 else
8706 ac_cv_sizeof_double=0
8707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8712$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713
8714
8715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008717#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008718_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008719
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8726$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 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 +00008731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 if test "$ac_cv_type_fpos_t" = yes; then
8734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008736as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738 else
8739 ac_cv_sizeof_fpos_t=0
8740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8745$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746
8747
8748
Martin v. Löwis11437992002-04-12 09:54:03 +00008749cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008750#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008751_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008752
Michael W. Hudson54241132001-12-07 15:38:26 +00008753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8759$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 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 +00008764
Martin v. Löwis18e16552006-02-15 17:27:45 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 if test "$ac_cv_type_size_t" = yes; then
8767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008769as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771 else
8772 ac_cv_sizeof_size_t=0
8773 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775
Martin v. Löwis18e16552006-02-15 17:27:45 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8778$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779
8780
8781
Martin v. Löwis18e16552006-02-15 17:27:45 +00008782cat >>confdefs.h <<_ACEOF
8783#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8784_ACEOF
8785
8786
Christian Heimes400adb02008-02-01 08:12:03 +00008787# The cast to long int works around a bug in the HP C Compiler
8788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8792$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 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 +00008797
Christian Heimes400adb02008-02-01 08:12:03 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 if test "$ac_cv_type_pid_t" = yes; then
8800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008802as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008803See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008804 else
8805 ac_cv_sizeof_pid_t=0
8806 fi
8807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808
Christian Heimes400adb02008-02-01 08:12:03 +00008809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8811$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008812
8813
8814
8815cat >>confdefs.h <<_ACEOF
8816#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8817_ACEOF
8818
8819
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008820# The cast to long int works around a bug in the HP C Compiler
8821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
8824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8825$as_echo_n "checking size of uintptr_t... " >&6; }
8826if ${ac_cv_sizeof_uintptr_t+:} false; then :
8827 $as_echo_n "(cached) " >&6
8828else
8829 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8830
8831else
8832 if test "$ac_cv_type_uintptr_t" = yes; then
8833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8834$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8835as_fn_error 77 "cannot compute sizeof (uintptr_t)
8836See \`config.log' for more details" "$LINENO" 5; }
8837 else
8838 ac_cv_sizeof_uintptr_t=0
8839 fi
8840fi
8841
8842fi
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8844$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8845
8846
8847
8848cat >>confdefs.h <<_ACEOF
8849#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8850_ACEOF
8851
8852
Michael W. Hudson54241132001-12-07 15:38:26 +00008853
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008854
Eitan Adler3055c942018-05-15 22:58:09 -07008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8856$as_echo_n "checking for long double... " >&6; }
8857if ${ac_cv_type_long_double+:} false; then :
8858 $as_echo_n "(cached) " >&6
8859else
8860 if test "$GCC" = yes; then
8861 ac_cv_type_long_double=yes
8862 else
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864/* end confdefs.h. */
8865/* The Stardent Vistra knows sizeof (long double), but does
8866 not support it. */
8867 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008868int
8869main ()
8870{
Eitan Adler3055c942018-05-15 22:58:09 -07008871static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8872 sizeof (double) <= sizeof (long double))];
8873test_array [0] = 0;
8874return test_array [0];
8875
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008876 ;
8877 return 0;
8878}
8879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008880if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008881 ac_cv_type_long_double=yes
8882else
8883 ac_cv_type_long_double=no
8884fi
8885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8886 fi
8887fi
8888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8889$as_echo "$ac_cv_type_long_double" >&6; }
8890 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008893
Eitan Adler3055c942018-05-15 22:58:09 -07008894 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008896# The cast to long int works around a bug in the HP C Compiler
8897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8901$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 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 +00008906
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907else
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 if test "$ac_cv_type_long_double" = yes; then
8909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008911as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008912See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008913 else
8914 ac_cv_sizeof_long_double=0
8915 fi
8916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8920$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008921
8922
8923
8924cat >>confdefs.h <<_ACEOF
8925#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8926_ACEOF
8927
8928
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930# The cast to long int works around a bug in the HP C Compiler
8931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8935$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008936if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 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 +00008940
Thomas Woutersb2137042007-02-01 18:02:27 +00008941else
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 if test "$ac_cv_type__Bool" = yes; then
8943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008945as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008946See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 else
8948 ac_cv_sizeof__Bool=0
8949 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951
Thomas Woutersb2137042007-02-01 18:02:27 +00008952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8954$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955
8956
8957
Thomas Woutersb2137042007-02-01 18:02:27 +00008958cat >>confdefs.h <<_ACEOF
8959#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8960_ACEOF
8961
8962
Thomas Woutersb2137042007-02-01 18:02:27 +00008963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964# The cast to long int works around a bug in the HP C Compiler
8965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8967# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8969$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008970if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972else
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974#ifdef HAVE_SYS_TYPES_H
8975#include <sys/types.h>
8976#endif
8977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980else
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 if test "$ac_cv_type_off_t" = yes; then
8982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008984as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008985See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986 else
8987 ac_cv_sizeof_off_t=0
8988 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8993$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995
8996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009000
Michael W. Hudson54241132001-12-07 15:38:26 +00009001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9004$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009005if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009006 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009007
Matthias Kloseb9621712010-04-24 17:59:49 +00009008$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009009
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9011$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009012else
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009015fi
9016
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009017# The cast to long int works around a bug in the HP C Compiler
9018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9020# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9022$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009023if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025else
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009027#ifdef HAVE_SYS_TYPES_H
9028#include <sys/types.h>
9029#endif
9030#ifdef HAVE_TIME_H
9031#include <time.h>
9032#endif
9033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036else
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 if test "$ac_cv_type_time_t" = yes; then
9038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009040as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009041See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009042 else
9043 ac_cv_sizeof_time_t=0
9044 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9049$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009051
9052
Martin v. Löwis11437992002-04-12 09:54:03 +00009053cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009054#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009055_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
9058
Trent Mick635f6fb2000-08-23 21:33:05 +00009059# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009060ac_save_cc="$CC"
9061if test "$ac_cv_kpthread" = "yes"
9062then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009063elif test "$ac_cv_kthread" = "yes"
9064then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009065elif test "$ac_cv_pthread" = "yes"
9066then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009067fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068
Matthias Kloseb9621712010-04-24 17:59:49 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9070$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009071have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009073/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009074
9075 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009076int
9077main ()
9078{
Guido van Rossum12580492000-09-24 16:47:19 +00009079pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 ;
9081 return 0;
9082}
Matthias Kloseb159a552010-04-25 21:00:44 +00009083
Martin v. Löwis11437992002-04-12 09:54:03 +00009084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009085if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009086 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9090$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009091if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009092 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9097$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009098if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009100else
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102#ifdef HAVE_PTHREAD_H
9103#include <pthread.h>
9104#endif
9105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108else
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 if test "$ac_cv_type_pthread_t" = yes; then
9110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009112as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009113See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009114 else
9115 ac_cv_sizeof_pthread_t=0
9116 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009118
Trent Mick635f6fb2000-08-23 21:33:05 +00009119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9121$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123
9124
Martin v. Löwis11437992002-04-12 09:54:03 +00009125cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009126#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009127_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009129
Trent Mick635f6fb2000-08-23 21:33:05 +00009130fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009131
9132# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9133# This checking will be unnecessary after removing deprecated TLS API.
9134# The cast to long int works around a bug in the HP C Compiler
9135# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9136# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9137# This bug is HP SR number 8606223364.
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9139$as_echo_n "checking size of pthread_key_t... " >&6; }
9140if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9141 $as_echo_n "(cached) " >&6
9142else
9143 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9144"; then :
9145
9146else
9147 if test "$ac_cv_type_pthread_key_t" = yes; then
9148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9150as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9151See \`config.log' for more details" "$LINENO" 5; }
9152 else
9153 ac_cv_sizeof_pthread_key_t=0
9154 fi
9155fi
9156
9157fi
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9159$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9160
9161
9162
9163cat >>confdefs.h <<_ACEOF
9164#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9165_ACEOF
9166
9167
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9169$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9170if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9172/* end confdefs.h. */
9173#include <pthread.h>
9174int
9175main ()
9176{
9177pthread_key_t k; k * 1;
9178 ;
9179 return 0;
9180}
9181_ACEOF
9182if ac_fn_c_try_compile "$LINENO"; then :
9183 ac_pthread_key_t_is_arithmetic_type=yes
9184else
9185 ac_pthread_key_t_is_arithmetic_type=no
9186
9187fi
9188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9190$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9191 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9192
9193$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9194
9195 fi
9196else
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198$as_echo "no" >&6; }
9199fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009200CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009201
Michael W. Hudson54241132001-12-07 15:38:26 +00009202
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009203case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009204 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009205 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9206 ;;
9207 Darwin/*)
9208 OTHER_LIBTOOL_OPT=""
9209 ;;
9210esac
9211
9212
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009213
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009214case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009215 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009216 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9217 if test "${enable_universalsdk}"; then
9218 :
9219 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009220 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009221 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009223 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009224 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009225 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009226 if test ${gcc_version} '<' 4.0
9227 then
9228 LIBTOOL_CRUFT="-lcc_dynamic"
9229 else
9230 LIBTOOL_CRUFT=""
9231 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009233 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234else
Matthias Kloseb9621712010-04-24 17:59:49 +00009235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009237
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009238 #include <unistd.h>
9239 int main(int argc, char*argv[])
9240 {
9241 if (sizeof(long) == 4) {
9242 return 0;
9243 } else {
9244 return 1;
9245 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009246 }
9247
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009249if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009250 ac_osx_32bit=yes
9251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009256fi
9257
9258
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009259 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009260 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009261 i386)
9262 MACOSX_DEFAULT_ARCH="i386"
9263 ;;
9264 ppc)
9265 MACOSX_DEFAULT_ARCH="ppc"
9266 ;;
9267 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009268 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009269 ;;
9270 esac
9271 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009272 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009273 i386)
9274 MACOSX_DEFAULT_ARCH="x86_64"
9275 ;;
9276 ppc)
9277 MACOSX_DEFAULT_ARCH="ppc64"
9278 ;;
9279 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009280 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009281 ;;
9282 esac
9283
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009284 fi
9285
9286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9291$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009292if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009294 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009296 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009299
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9301$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009302 if test $enable_shared = "yes"
9303 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009304 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 +00009305 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306else
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9308$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309fi
9310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9312$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009313case $ac_sys_system/$ac_sys_release in
9314 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009317
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9319$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009320 ;;
9321 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009324 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009325esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009326
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328
Michael W. Hudson54241132001-12-07 15:38:26 +00009329
9330
9331
9332
Benjamin Peterson99f03762010-04-11 22:15:28 +00009333
Thomas Wouters477c8d52006-05-27 19:21:47 +00009334
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009335# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9336# -- usually .so, .sl on HP-UX, .dll on Cygwin
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9338$as_echo_n "checking the extension of shared libraries... " >&6; }
9339if test -z "$SHLIB_SUFFIX"; then
9340 case $ac_sys_system in
9341 hp*|HP*)
9342 case `uname -m` in
9343 ia64) SHLIB_SUFFIX=.so;;
9344 *) SHLIB_SUFFIX=.sl;;
9345 esac
9346 ;;
9347 CYGWIN*) SHLIB_SUFFIX=.dll;;
9348 *) SHLIB_SUFFIX=.so;;
9349 esac
9350fi
9351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9352$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009353
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009355# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009356# (Shared libraries in this instance are shared modules to be loaded into
9357# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9359$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360if test -z "$LDSHARED"
9361then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009362 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009363 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009364 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009365 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009366 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009368 if test "$GCC" = "yes" ; then
9369 LDSHARED='$(CC) -shared'
9370 LDCXXSHARED='$(CXX) -shared'
9371 else
9372 LDSHARED='$(CC) -G'
9373 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009374 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009375 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009376 if test "$GCC" = "yes" ; then
9377 LDSHARED='$(CC) -shared'
9378 LDCXXSHARED='$(CXX) -shared'
9379 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009380 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009381 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009382 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009383 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009384 LDSHARED='$(CC) -bundle'
9385 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009386 if test "$enable_framework" ; then
9387 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009388 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9389 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009390 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009391 else
9392 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009393 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009394 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009395 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009396 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009397 LDSHARED='$(CC) -bundle'
9398 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009399 if test "$enable_framework" ; then
9400 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009401 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9402 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009403 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009404 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009405 # No framework, use the Python app as bundle-loader
9406 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009407 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009408 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009409 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009410 Darwin/*)
9411 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9412 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009413
Ned Deily36820b62014-06-25 13:44:22 -07009414 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9415 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9416 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9417 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9418 if test ${dep_target_major} -eq 10 && \
9419 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009420 then
Ned Deily36820b62014-06-25 13:44:22 -07009421 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009422 LDSHARED='$(CC) -bundle'
9423 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009424 if test "$enable_framework" ; then
9425 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009426 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9427 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009428 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009429 else
9430 # No framework, use the Python app as bundle-loader
9431 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9432 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009433 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009434 fi
Ned Deily36820b62014-06-25 13:44:22 -07009435 else
9436 # building for OS X 10.3 and later
9437 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9438 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9439 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009440 fi
9441 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009442 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443 LDSHARED='$(CC) -shared'
9444 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009445 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009446 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009447 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009448 LDSHARED='$(CC) -shared'
9449 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009450 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009451 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009452 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009453 OpenBSD*)
9454 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9455 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009456 LDSHARED='$(CC) -shared $(CCSHARED)'
9457 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009458 else
9459 case `uname -r` in
9460 [01].* | 2.[0-7] | 2.[0-7].*)
9461 LDSHARED="ld -Bshareable ${LDFLAGS}"
9462 ;;
9463 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009464 LDSHARED='$(CC) -shared $(CCSHARED)'
9465 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009466 ;;
9467 esac
9468 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009469 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009470 LDSHARED='$(CC) -shared'
9471 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009472 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009473 if test "$GCC" = "yes" ; then
9474 LDSHARED='$(CC) -shared'
9475 LDCXXSHARED='$(CXX) -shared'
9476 else
9477 LDSHARED='$(CC) -G'
9478 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009479 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009480 SCO_SV*)
9481 LDSHARED='$(CC) -Wl,-G,-Bexport'
9482 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9483 CYGWIN*)
9484 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9485 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486 *) LDSHARED="ld";;
9487 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9490$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009491LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009492BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009493# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009494# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9496$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009497if test -z "$CCSHARED"
9498then
Guido van Rossum07397971997-04-29 21:49:50 +00009499 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009500 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009501 then CCSHARED="-fPIC";
9502 elif test `uname -p` = sparc;
9503 then CCSHARED="-xcode=pic32";
9504 else CCSHARED="-Kpic";
9505 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009506 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009507 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009508 else CCSHARED="+z";
9509 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009510 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009511 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009512 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009513 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009514 if test "$GCC" = "yes"
9515 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009516 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009517 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009518 SCO_SV*)
9519 if test "$GCC" = "yes"
9520 then CCSHARED="-fPIC"
9521 else CCSHARED="-Kpic -belf"
9522 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009523 VxWorks*)
9524 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9528$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009529# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009530# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9532$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533if test -z "$LINKFORSHARED"
9534then
Guido van Rossum07397971997-04-29 21:49:50 +00009535 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009536 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009537 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009538 LINKFORSHARED="-Wl,-E -Wl,+s";;
9539# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009540 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009541 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009542 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009544 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009545
9546 # Issue #18075: the default maximum stack size (8MBytes) is too
9547 # small for the default recursion limit. Increase the stack size
9548 # to ensure that tests don't crash
9549 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9550
Jack Jansene578a632001-08-15 01:27:14 +00009551 if test "$enable_framework"
9552 then
Jack Jansenda49e192005-01-07 13:08:22 +00009553 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009554 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009555 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009556 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009557 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009558 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009559 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009560 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9561 then
9562 LINKFORSHARED="-Wl,--export-dynamic"
9563 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009564 SunOS/5*) case $CC in
9565 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009566 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009567 then
9568 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009569 fi;;
9570 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009571 CYGWIN*)
9572 if test $enable_shared = "no"
9573 then
9574 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9575 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009576 QNX*)
9577 # -Wl,-E causes the symbols to be added to the dynamic
9578 # symbol table so that they can be found when a module
9579 # is loaded. -N 2048K causes the stack size to be set
9580 # to 2048 kilobytes so that the stack doesn't overflow
9581 # when running test_compile.py.
9582 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009583 VxWorks*)
9584 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009585 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9588$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009589
Michael W. Hudson54241132001-12-07 15:38:26 +00009590
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009591
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9593$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009594if test ! "$LIBRARY" = "$LDLIBRARY"
9595then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009596 case $ac_sys_system in
9597 CYGWIN*)
9598 # Cygwin needs CCSHARED when building extension DLLs
9599 # but not when building the interpreter DLL.
9600 CFLAGSFORSHARED='';;
9601 *)
9602 CFLAGSFORSHARED='$(CCSHARED)'
9603 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9606$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009607
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009608# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9609# library (with --enable-shared).
9610# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009611# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9612# if it is not required, since it creates a dependency of the shared library
9613# to LIBS. This, in turn, means that applications linking the shared libpython
9614# don't need to link LIBS explicitly. The default should be only changed
9615# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009616
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9618$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009619case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009620 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009621 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009622esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9624$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009625
9626
Guido van Rossum627b2d71993-12-24 10:39:16 +00009627# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9629$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009630if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009631 $as_echo_n "(cached) " >&6
9632else
9633 ac_check_lib_save_LIBS=$LIBS
9634LIBS="-lsendfile $LIBS"
9635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9636/* end confdefs.h. */
9637
9638/* Override any GCC internal prototype to avoid an error.
9639 Use char because int might match the return type of a GCC
9640 builtin and then its argument prototype would still apply. */
9641#ifdef __cplusplus
9642extern "C"
9643#endif
9644char sendfile ();
9645int
9646main ()
9647{
9648return sendfile ();
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653if ac_fn_c_try_link "$LINENO"; then :
9654 ac_cv_lib_sendfile_sendfile=yes
9655else
9656 ac_cv_lib_sendfile_sendfile=no
9657fi
9658rm -f core conftest.err conftest.$ac_objext \
9659 conftest$ac_exeext conftest.$ac_ext
9660LIBS=$ac_check_lib_save_LIBS
9661fi
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9663$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009664if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009665 cat >>confdefs.h <<_ACEOF
9666#define HAVE_LIBSENDFILE 1
9667_ACEOF
9668
9669 LIBS="-lsendfile $LIBS"
9670
9671fi
9672
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9674$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009677else
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009679LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009686#ifdef __cplusplus
9687extern "C"
9688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009689char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009700else
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9708$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 cat >>confdefs.h <<_ACEOF
9711#define HAVE_LIBDL 1
9712_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009716fi
9717 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9719$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009720if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009724LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728/* Override any GCC internal prototype to avoid an error.
9729 Use char because int might match the return type of a GCC
9730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009731#ifdef __cplusplus
9732extern "C"
9733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009734char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735int
9736main ()
9737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9753$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009754if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 cat >>confdefs.h <<_ACEOF
9756#define HAVE_LIBDLD 1
9757_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009758
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009759 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009760
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009761fi
9762 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009763
Michael Felt0d3ccb42017-12-30 22:39:20 +01009764# checks for uuid.h location
9765for ac_header in uuid/uuid.h uuid.h
9766do :
9767 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9768ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9769if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9770 cat >>confdefs.h <<_ACEOF
9771#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9772_ACEOF
9773
9774fi
9775
9776done
9777
9778
Berker Peksag9a10ff42017-11-08 23:09:16 +03009779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9780$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9782/* end confdefs.h. */
9783#include <uuid/uuid.h>
9784int
9785main ()
9786{
9787
9788#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009789void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009790#endif
9791
9792 ;
9793 return 0;
9794}
9795_ACEOF
9796if ac_fn_c_try_compile "$LINENO"; then :
9797
9798$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9799
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9801$as_echo "yes" >&6; }
9802else
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805
9806fi
9807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9808
Michael Felt0d3ccb42017-12-30 22:39:20 +01009809# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009810# FreeBSD and OpenBSD provides support as well
9811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9812$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9814/* end confdefs.h. */
9815#include <uuid.h>
9816int
9817main ()
9818{
9819
9820#ifndef uuid_create
9821void *x = uuid_create
9822#endif
9823
9824 ;
9825 return 0;
9826}
9827_ACEOF
9828if ac_fn_c_try_compile "$LINENO"; then :
9829
9830$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9831
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9833$as_echo "yes" >&6; }
9834else
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
9837
9838fi
9839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9840
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009841# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9842# stream in big-endian byte-order
9843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9844$as_echo_n "checking for uuid_enc_be... " >&6; }
9845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9846/* end confdefs.h. */
9847#include <uuid.h>
9848int
9849main ()
9850{
9851
9852#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009853void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009854#endif
9855
9856 ;
9857 return 0;
9858}
9859_ACEOF
9860if ac_fn_c_try_compile "$LINENO"; then :
9861
9862$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9863
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9865$as_echo "yes" >&6; }
9866else
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869
9870fi
9871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9872
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009873# 'Real Time' functions on Solaris
9874# posix4 on Solaris 2.6
9875# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009877$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009878if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009880else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009881 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900for ac_lib in '' pthread rt posix4; do
9901 if test -z "$ac_lib"; then
9902 ac_res="none required"
9903 else
9904 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009910rm -f core conftest.err conftest.$ac_objext \
9911 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009912 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915done
Victor Stinnere0be4232011-10-25 13:06:09 +02009916if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918else
9919 ac_cv_search_sem_init=no
9920fi
9921rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009922LIBS=$ac_func_search_save_LIBS
9923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9925$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009927if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009929
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009930fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009931
Martin v. Löwis519adae2003-09-20 10:47:47 +00009932
Martin v. Löwis19d17342003-06-14 21:03:05 +00009933# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9935$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009936if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009938else
9939 ac_check_lib_save_LIBS=$LIBS
9940LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944/* Override any GCC internal prototype to avoid an error.
9945 Use char because int might match the return type of a GCC
9946 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009950char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009951int
9952main ()
9953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009955 ;
9956 return 0;
9957}
9958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009960 ac_cv_lib_intl_textdomain=yes
9961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964rm -f core conftest.err conftest.$ac_objext \
9965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009966LIBS=$ac_check_lib_save_LIBS
9967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9969$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009970if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009973
Brett Cannonc6d936e2009-06-07 20:09:53 +00009974 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009975fi
9976
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009977
9978# checks for system dependent C++ extensions support
9979case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9981$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009983/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009984
Georg Brandl59e87bd2011-02-15 19:48:59 +00009985 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009986int
9987main ()
9988{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009989loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ;
9991 return 0;
9992}
Matthias Kloseb159a552010-04-25 21:00:44 +00009993
Martin v. Löwis11437992002-04-12 09:54:03 +00009994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009996
Matthias Kloseb159a552010-04-25 21:00:44 +00009997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009999
Matthias Kloseb159a552010-04-25 21:00:44 +000010000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010001$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010002
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010003else
Matthias Kloseb159a552010-04-25 21:00:44 +000010004
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010007
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010009rm -f core conftest.err conftest.$ac_objext \
10010 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010011 *) ;;
10012esac
10013
Christian Heimes985ecdc2013-11-20 11:46:18 +010010014# check for systems that require aligned memory access
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10016$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010017if ${ac_cv_aligned_required+:} false; then :
10018 $as_echo_n "(cached) " >&6
10019else
10020 if test "$cross_compiling" = yes; then :
10021 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010022else
10023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10024/* end confdefs.h. */
10025
10026int main()
10027{
10028 char s[16];
10029 int i, *p1, *p2;
10030 for (i=0; i < 16; i++)
10031 s[i] = i;
10032 p1 = (int*)(s+1);
10033 p2 = (int*)(s+2);
10034 if (*p1 == *p2)
10035 return 1;
10036 return 0;
10037}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010038_ACEOF
10039if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010040 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010041else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010042 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010043fi
10044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10045 conftest.$ac_objext conftest.beam conftest.$ac_ext
10046fi
10047
10048
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010049fi
10050
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10052$as_echo "$ac_cv_aligned_required" >&6; }
10053if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010054
10055$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10056
10057fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010058
10059# str, bytes and memoryview hash algorithm
10060
10061
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10063$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10064
10065# Check whether --with-hash_algorithm was given.
10066if test "${with_hash_algorithm+set}" = set; then :
10067 withval=$with_hash_algorithm;
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10069$as_echo "$withval" >&6; }
10070case "$withval" in
10071 siphash24)
10072 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10073
10074 ;;
10075 fnv)
10076 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10077
10078 ;;
10079 *)
10080 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10081 ;;
10082esac
10083
10084else
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10086$as_echo "default" >&6; }
10087fi
10088
10089
Charles-François Natalid30b0222014-05-08 23:08:51 +010010090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10091$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10092
10093# Check whether --with-address_sanitizer was given.
10094if test "${with_address_sanitizer+set}" = set; then :
10095 withval=$with_address_sanitizer;
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10097$as_echo "$withval" >&6; }
10098BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10099LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010100# ASan works by controlling memory allocation, our own malloc interferes.
10101with_pymalloc="no"
10102
10103else
10104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10105$as_echo "no" >&6; }
10106fi
10107
10108
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10110$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10111
10112# Check whether --with-memory_sanitizer was given.
10113if test "${with_memory_sanitizer+set}" = set; then :
10114 withval=$with_memory_sanitizer;
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10116$as_echo "$withval" >&6; }
10117BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10118LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10119# MSan works by controlling memory allocation, our own malloc interferes.
10120with_pymalloc="no"
10121
10122else
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
10125fi
10126
10127
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10129$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10130
10131# Check whether --with-undefined_behavior_sanitizer was given.
10132if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10133 withval=$with_undefined_behavior_sanitizer;
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10135$as_echo "$withval" >&6; }
10136BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10137LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010138
10139else
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
10142fi
10143
10144
Guido van Rossum70c7f481998-03-26 18:44:10 +000010145# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10147$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010148if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010150else
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010152LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156/* Override any GCC internal prototype to avoid an error.
10157 Use char because int might match the return type of a GCC
10158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010159#ifdef __cplusplus
10160extern "C"
10161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010162char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010163int
10164main ()
10165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ;
10168 return 0;
10169}
10170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010173else
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010176rm -f core conftest.err conftest.$ac_objext \
10177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010178LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10181$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010182if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010183 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010184fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010185 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10187$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010188if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010190else
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010192LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196/* Override any GCC internal prototype to avoid an error.
10197 Use char because int might match the return type of a GCC
10198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010199#ifdef __cplusplus
10200extern "C"
10201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010202char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010203int
10204main ()
10205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ;
10208 return 0;
10209}
10210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010211if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010213else
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010216rm -f core conftest.err conftest.$ac_objext \
10217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010218LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10221$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010222if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010223 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010224fi
10225 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010226
Matthias Kloseb9621712010-04-24 17:59:49 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10228$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010231if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10234$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010235LIBS="$withval $LIBS"
10236
10237else
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10239$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240fi
10241
Guido van Rossum7f43da71994-08-01 12:15:30 +000010242
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010243
10244
10245
10246
10247
10248
Victor Stinner23a683a2019-04-12 21:27:37 +020010249
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010250if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10251 if test -n "$ac_tool_prefix"; then
10252 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10253set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10255$as_echo_n "checking for $ac_word... " >&6; }
10256if ${ac_cv_path_PKG_CONFIG+:} false; then :
10257 $as_echo_n "(cached) " >&6
10258else
10259 case $PKG_CONFIG in
10260 [\\/]* | ?:[\\/]*)
10261 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10262 ;;
10263 *)
10264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10265for as_dir in $PATH
10266do
10267 IFS=$as_save_IFS
10268 test -z "$as_dir" && as_dir=.
10269 for ac_exec_ext in '' $ac_executable_extensions; do
10270 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10271 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10273 break 2
10274 fi
10275done
10276 done
10277IFS=$as_save_IFS
10278
10279 ;;
10280esac
10281fi
10282PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10283if test -n "$PKG_CONFIG"; then
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10285$as_echo "$PKG_CONFIG" >&6; }
10286else
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10288$as_echo "no" >&6; }
10289fi
10290
10291
10292fi
10293if test -z "$ac_cv_path_PKG_CONFIG"; then
10294 ac_pt_PKG_CONFIG=$PKG_CONFIG
10295 # Extract the first word of "pkg-config", so it can be a program name with args.
10296set dummy pkg-config; ac_word=$2
10297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10298$as_echo_n "checking for $ac_word... " >&6; }
10299if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10300 $as_echo_n "(cached) " >&6
10301else
10302 case $ac_pt_PKG_CONFIG in
10303 [\\/]* | ?:[\\/]*)
10304 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10305 ;;
10306 *)
10307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10308for as_dir in $PATH
10309do
10310 IFS=$as_save_IFS
10311 test -z "$as_dir" && as_dir=.
10312 for ac_exec_ext in '' $ac_executable_extensions; do
10313 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10314 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10316 break 2
10317 fi
10318done
10319 done
10320IFS=$as_save_IFS
10321
10322 ;;
10323esac
10324fi
10325ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10326if test -n "$ac_pt_PKG_CONFIG"; then
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10328$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10329else
10330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
10332fi
10333
10334 if test "x$ac_pt_PKG_CONFIG" = x; then
10335 PKG_CONFIG=""
10336 else
10337 case $cross_compiling:$ac_tool_warned in
10338yes:)
10339{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10340$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10341ac_tool_warned=yes ;;
10342esac
10343 PKG_CONFIG=$ac_pt_PKG_CONFIG
10344 fi
10345else
10346 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10347fi
10348
10349fi
10350if test -n "$PKG_CONFIG"; then
10351 _pkg_min_version=0.9.0
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10353$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10354 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10356$as_echo "yes" >&6; }
10357 else
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360 PKG_CONFIG=""
10361 fi
10362fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010363
10364# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10366$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010367
10368# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010370 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010371else
10372 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010373fi
10374
10375
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10377$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010378
10379# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10381$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010382
10383# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010384if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010385 withval=$with_system_ffi;
10386fi
10387
10388
Zachary Waref40d4dd2016-09-17 01:25:24 -050010389if test "$ac_sys_system" = "Darwin"
10390then
10391 case "$with_system_ffi" in
10392 "")
10393 with_system_ffi="no"
10394 ;;
10395 yes|no)
10396 ;;
10397 *)
10398 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10399 ;;
10400 esac
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10402$as_echo "$with_system_ffi" >&6; }
10403else
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10405$as_echo "yes" >&6; }
10406 if test "$with_system_ffi" != ""
10407 then
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10409$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10410 fi
10411 with_system_ffi="yes"
10412fi
Zachary Ware935043d2016-09-09 17:01:21 -070010413
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010414if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010415 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10416else
10417 LIBFFI_INCLUDEDIR=""
10418fi
10419
10420
Stefan Krah60187b52012-03-23 19:06:27 +010010421# Check for use of the system libmpdec library
10422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10423$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10424
10425# Check whether --with-system_libmpdec was given.
10426if test "${with_system_libmpdec+set}" = set; then :
10427 withval=$with_system_libmpdec;
10428else
10429 with_system_libmpdec="no"
10430fi
10431
10432
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10434$as_echo "$with_system_libmpdec" >&6; }
10435
Benjamin Peterson076ed002010-10-31 17:11:02 +000010436# Check for support for loadable sqlite extensions
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10438$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10439# Check whether --enable-loadable-sqlite-extensions was given.
10440if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10441 enableval=$enable_loadable_sqlite_extensions;
10442else
10443 enable_loadable_sqlite_extensions="no"
10444fi
10445
10446
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10448$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10449
Ned Deilyd819b932013-09-06 01:07:05 -070010450# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10451
10452
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10454$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10455
10456# Check whether --with-tcltk-includes was given.
10457if test "${with_tcltk_includes+set}" = set; then :
10458 withval=$with_tcltk_includes;
10459else
10460 with_tcltk_includes="default"
10461fi
10462
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10464$as_echo "$with_tcltk_includes" >&6; }
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10466$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10467
10468# Check whether --with-tcltk-libs was given.
10469if test "${with_tcltk_libs+set}" = set; then :
10470 withval=$with_tcltk_libs;
10471else
10472 with_tcltk_libs="default"
10473fi
10474
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10476$as_echo "$with_tcltk_libs" >&6; }
10477if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10478then
10479 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10480 then
10481 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10482 fi
10483 TCLTK_INCLUDES=""
10484 TCLTK_LIBS=""
10485else
10486 TCLTK_INCLUDES="$with_tcltk_includes"
10487 TCLTK_LIBS="$with_tcltk_libs"
10488fi
10489
Matthias Klose55708cc2009-04-30 08:06:49 +000010490# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10492$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010493
10494# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010495if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010496 withval=$with_dbmliborder;
10497if test x$with_dbmliborder = xyes
10498then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010499as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010500else
10501 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10502 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10503 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010504 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010505 fi
10506 done
10507fi
10508fi
10509
Matthias Kloseb9621712010-04-24 17:59:49 +000010510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10511$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010512
Martin v. Löwis11437992002-04-12 09:54:03 +000010513# Templates for things AC_DEFINEd more than once.
10514# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010515
10516
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010517if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010518then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010519 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010521
10522 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010523elif test "$ac_cv_kpthread" = "yes"
10524then
10525 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010526 if test "$ac_cv_cxx_thread" = "yes"; then
10527 CXX="$CXX -Kpthread"
10528 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010529 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010530elif test "$ac_cv_kthread" = "yes"
10531then
10532 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010533 if test "$ac_cv_cxx_thread" = "yes"; then
10534 CXX="$CXX -Kthread"
10535 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010536 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010537elif test "$ac_cv_pthread" = "yes"
10538then
10539 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010540 if test "$ac_cv_cxx_thread" = "yes"; then
10541 CXX="$CXX -pthread"
10542 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010543 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 if test ! -z "$withval" -a -d "$withval"
10546 then LDFLAGS="$LDFLAGS -L$withval"
10547 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010548
10549 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010550 # define _POSIX_THREADS in unistd.h. Some apparently don't
10551 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10553$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010555/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010556
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010557#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010558#ifdef _POSIX_THREADS
10559yes
10560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010561
10562_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565 unistd_defines_pthreads=yes
10566else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010567 unistd_defines_pthreads=no
10568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010569rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010570
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10572$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010575
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010576 # Just looking for pthread_create in libpthread is not enough:
10577 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10578 # So we really have to include pthread.h, and then link.
10579 _libs=$LIBS
10580 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10582$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010585
10586#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010587#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010588
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010589void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010590int
10591main ()
10592{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010593
10594pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 ;
10596 return 0;
10597}
10598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010600
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10602$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010603 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010604
Guido van Rossum02a1c402000-02-25 19:26:31 +000010605else
Martin v. Löwis11437992002-04-12 09:54:03 +000010606
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010607 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010609if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010610
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010611 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010612
Guido van Rossumad678af1998-10-02 14:42:15 +000010613else
Guido van Rossumad678af1998-10-02 14:42:15 +000010614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10616$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010617if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619else
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010621LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625/* Override any GCC internal prototype to avoid an error.
10626 Use char because int might match the return type of a GCC
10627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010628#ifdef __cplusplus
10629extern "C"
10630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010631char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 ;
10637 return 0;
10638}
10639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010642else
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010645rm -f core conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010647LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10650$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010651if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010653 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010654 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010655
Greg Steinadf63d62000-07-05 10:38:09 +000010656else
Greg Steinadf63d62000-07-05 10:38:09 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10659$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010660if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010662else
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010664LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668/* Override any GCC internal prototype to avoid an error.
10669 Use char because int might match the return type of a GCC
10670 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010671#ifdef __cplusplus
10672extern "C"
10673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010674char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010675int
10676main ()
10677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 ;
10680 return 0;
10681}
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688rm -f core conftest.err conftest.$ac_objext \
10689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010690LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10693$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010694if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010695
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010696 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010697 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010698
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010699else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010700
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10702$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010703if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010705else
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010707LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711/* Override any GCC internal prototype to avoid an error.
10712 Use char because int might match the return type of a GCC
10713 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010714#ifdef __cplusplus
10715extern "C"
10716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010717char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010718int
10719main ()
10720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 ;
10723 return 0;
10724}
10725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010726if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010728else
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010731rm -f core conftest.err conftest.$ac_objext \
10732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010733LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10736$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010737if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010739 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010740 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010741
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010742else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10745$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010746if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010748else
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010750LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754/* Override any GCC internal prototype to avoid an error.
10755 Use char because int might match the return type of a GCC
10756 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010757#ifdef __cplusplus
10758extern "C"
10759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010760char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010761int
10762main ()
10763{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010764return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 ;
10766 return 0;
10767}
10768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010769if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010771else
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010774rm -f core conftest.err conftest.$ac_objext \
10775 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010776LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10779$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010780if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010781
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010782 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010783 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010784
Guido van Rossumb93a8621998-05-07 13:27:32 +000010785else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010786
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010787 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10788
Guido van Rossum2d38f911996-06-26 19:47:01 +000010789fi
10790
Guido van Rossum627b2d71993-12-24 10:39:16 +000010791
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010792fi
10793
Guido van Rossum0be3e491997-05-22 20:33:33 +000010794fi
10795
Guido van Rossum49545951997-12-02 19:28:29 +000010796fi
10797
Guido van Rossumb93a8621998-05-07 13:27:32 +000010798fi
10799
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801rm -f core conftest.err conftest.$ac_objext \
10802 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10805$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010806if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808else
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010810LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814/* Override any GCC internal prototype to avoid an error.
10815 Use char because int might match the return type of a GCC
10816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010817#ifdef __cplusplus
10818extern "C"
10819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010820char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010821int
10822main ()
10823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010824return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ;
10826 return 0;
10827}
10828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010831else
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010834rm -f core conftest.err conftest.$ac_objext \
10835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010836LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10839$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010840if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010841
Martin v. Löwis130fb172001-07-19 11:00:41 +000010842 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010843
Guido van Rossum627b2d71993-12-24 10:39:16 +000010844fi
10845
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010848
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849if test "$posix_threads" = "yes"; then
10850 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010853
10854 fi
10855
10856 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10857 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010858 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010860
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861 ;;
10862 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864
10865 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010866 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010868
10869 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010870 esac
10871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10873$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010874 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876else
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878 ac_cv_pthread_system_supported=no
10879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010882
10883 #include <stdio.h>
10884 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 void *foo(void *parm) {
10886 return NULL;
10887 }
10888 main() {
10889 pthread_attr_t attr;
10890 pthread_t id;
10891 if (pthread_attr_init(&attr)) exit(-1);
10892 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10893 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10894 exit(0);
10895 }
10896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010897if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010898 ac_cv_pthread_system_supported=yes
10899else
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10903 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010904fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906
Guido van Rossum627b2d71993-12-24 10:39:16 +000010907fi
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10910$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010911 if test "$ac_cv_pthread_system_supported" = "yes"; then
10912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010914
10915 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 for ac_func in pthread_sigmask
10917do :
10918 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010919if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010920 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010922_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010923 case $ac_sys_system in
10924 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010927
10928 ;;
10929 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010930fi
10931done
10932
pdoxe14679c2017-10-05 00:01:56 -070010933 for ac_func in pthread_getcpuclockid
10934do :
10935 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10936if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10937 cat >>confdefs.h <<_ACEOF
10938#define HAVE_PTHREAD_GETCPUCLOCKID 1
10939_ACEOF
10940
10941fi
10942done
10943
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010944fi
10945
10946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10950$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010952if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10956$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957 ipv6=no
10958 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10960$as_echo "yes" >&6; }
10961 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962
10963 ipv6=yes
10964 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966else
Martin v. Löwis11437992002-04-12 09:54:03 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970 /* AF_INET6 available check */
10971#include <sys/types.h>
10972#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010973int
10974main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010975{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010976int domain = AF_INET6;
10977 ;
10978 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979}
Martin v. Löwis11437992002-04-12 09:54:03 +000010980_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010981if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10984$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987else
Matthias Kloseb159a552010-04-25 21:00:44 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10990$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010996if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10998$as_echo_n "checking if RFC2553 API is available... " >&6; }
10999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011000/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011001
11002 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011003#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011004int
11005main ()
11006{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011007struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011008 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011009 ;
11010 return 0;
11011}
Matthias Kloseb159a552010-04-25 21:00:44 +000011012
Martin v. Löwis11437992002-04-12 09:54:03 +000011013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011015
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011018 ipv6=yes
11019
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011020else
Matthias Kloseb159a552010-04-25 21:00:44 +000011021
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011024 ipv6=no
11025
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011028fi
11029
11030if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011032
11033fi
11034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035fi
11036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011037
11038ipv6type=unknown
11039ipv6lib=none
11040ipv6trylibc=no
11041
11042if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11044$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011045 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11046 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011047 case $i in
11048 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011050/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052#include <netinet/in.h>
11053#ifdef IPV6_INRIA_VERSION
11054yes
11055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011056_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011059 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011061rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011062
11063 ;;
11064 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068#include <netinet/in.h>
11069#ifdef __KAME__
11070yes
11071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075 ipv6type=$i;
11076 ipv6lib=inet6
11077 ipv6libdir=/usr/local/v6/lib
11078 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081
11082 ;;
11083 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011085/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011087#include <features.h>
11088#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11089yes
11090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011091_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094 ipv6type=$i;
11095 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011097rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011098
11099 ;;
11100 linux-inet6)
11101 if test -d /usr/inet6; then
11102 ipv6type=$i
11103 ipv6lib=inet6
11104 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011105 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106 fi
11107 ;;
11108 solaris)
11109 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011110 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111 ipv6type=$i
11112 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113 fi
11114 fi
11115 ;;
11116 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120#include <sys/param.h>
11121#ifdef _TOSHIBA_INET6
11122yes
11123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011124_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127 ipv6type=$i;
11128 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011129 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011131rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132
11133 ;;
11134 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011136/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011137
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138#include </usr/local/v6/include/sys/v6config.h>
11139#ifdef __V6D__
11140yes
11141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011142_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011145 ipv6type=$i;
11146 ipv6lib=v6;
11147 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011148 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011150rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011151
11152 ;;
11153 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011155/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011156
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011157#include <sys/param.h>
11158#ifdef _ZETA_MINAMI_INET6
11159yes
11160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011161_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011164 ipv6type=$i;
11165 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011166 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011168rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011169
11170 ;;
11171 esac
11172 if test "$ipv6type" != "unknown"; then
11173 break
11174 fi
11175 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11177$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011178fi
11179
11180if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11181 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11182 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11183 echo "using lib$ipv6lib"
11184 else
11185 if test $ipv6trylibc = "yes"; then
11186 echo "using libc"
11187 else
11188 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11189 echo "You need to fetch lib$ipv6lib.a from appropriate"
11190 echo 'ipv6 kit and compile beforehand.'
11191 exit 1
11192 fi
11193 fi
11194fi
11195
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11197$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11199/* end confdefs.h. */
11200 /* CAN_RAW_FD_FRAMES available check */
11201#include <linux/can/raw.h>
11202int
11203main ()
11204{
11205int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11206 ;
11207 return 0;
11208}
11209_ACEOF
11210if ac_fn_c_try_compile "$LINENO"; then :
11211
11212
11213$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11214
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11216$as_echo "yes" >&6; }
11217
11218else
11219
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
11222
11223fi
11224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11225
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011226# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11228$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011231if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232 withval=$with_doc_strings;
11233fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011234
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011235
11236if test -z "$with_doc_strings"
11237then with_doc_strings="yes"
11238fi
11239if test "$with_doc_strings" != "no"
11240then
11241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011243
11244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11246$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011247
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011248# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11250$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011252# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254 withval=$with_pymalloc;
11255fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011256
Neil Schemenauera35c6882001-02-27 04:45:05 +000011257
Neil Schemenauer16c22972002-03-22 15:34:49 +000011258if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011259then
11260 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011261fi
11262if test "$with_pymalloc" != "no"
11263then
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011266
11267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11269$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011270
Nick Coghlan6ea41862017-06-11 13:16:15 +100011271# Check for --with-c-locale-coercion
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11273$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11274
11275# Check whether --with-c-locale-coercion was given.
11276if test "${with_c_locale_coercion+set}" = set; then :
11277 withval=$with_c_locale_coercion;
11278fi
11279
11280
11281if test -z "$with_c_locale_coercion"
11282then
11283 with_c_locale_coercion="yes"
11284fi
11285if test "$with_c_locale_coercion" != "no"
11286then
11287
11288$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11289
11290fi
11291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11292$as_echo "$with_c_locale_coercion" >&6; }
11293
Benjamin Peterson05159c42009-12-03 03:01:27 +000011294# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11296$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011297
11298# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011299if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011300 withval=$with_valgrind;
11301else
11302 with_valgrind=no
11303fi
11304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11306$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011307if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 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 +020011309if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011312
11313else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011314 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011315
11316fi
11317
11318
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011319 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011320fi
11321
Łukasz Langaa785c872016-09-09 17:37:37 -070011322# Check for DTrace support
11323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11324$as_echo_n "checking for --with-dtrace... " >&6; }
11325
11326# Check whether --with-dtrace was given.
11327if test "${with_dtrace+set}" = set; then :
11328 withval=$with_dtrace;
11329else
11330 with_dtrace=no
11331fi
11332
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11334$as_echo "$with_dtrace" >&6; }
11335
11336
11337
11338
11339
11340DTRACE=
11341DFLAGS=
11342DTRACE_HEADERS=
11343DTRACE_OBJS=
11344
11345if test "$with_dtrace" = "yes"
11346then
11347 # Extract the first word of "dtrace", so it can be a program name with args.
11348set dummy dtrace; ac_word=$2
11349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11350$as_echo_n "checking for $ac_word... " >&6; }
11351if ${ac_cv_path_DTRACE+:} false; then :
11352 $as_echo_n "(cached) " >&6
11353else
11354 case $DTRACE in
11355 [\\/]* | ?:[\\/]*)
11356 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11357 ;;
11358 *)
11359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11360for as_dir in $PATH
11361do
11362 IFS=$as_save_IFS
11363 test -z "$as_dir" && as_dir=.
11364 for ac_exec_ext in '' $ac_executable_extensions; do
11365 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11366 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11367 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11368 break 2
11369 fi
11370done
11371 done
11372IFS=$as_save_IFS
11373
11374 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11375 ;;
11376esac
11377fi
11378DTRACE=$ac_cv_path_DTRACE
11379if test -n "$DTRACE"; then
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11381$as_echo "$DTRACE" >&6; }
11382else
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
11385fi
11386
11387
11388 if test "$DTRACE" = "not found"; then
11389 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11390 fi
11391
11392$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11393
11394 DTRACE_HEADERS="Include/pydtrace_probes.h"
11395
11396 # On OS X, DTrace providers do not need to be explicitly compiled and
11397 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11398 # generation flag '-G'. We check for presence of this flag, rather than
11399 # hardcoding support by OS, in the interest of robustness.
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11401$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11402if ${ac_cv_dtrace_link+:} false; then :
11403 $as_echo_n "(cached) " >&6
11404else
11405 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011406 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011407 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11408 ac_cv_dtrace_link=yes
11409
11410fi
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11412$as_echo "$ac_cv_dtrace_link" >&6; }
11413 if test "$ac_cv_dtrace_link" = "yes"; then
11414 DTRACE_OBJS="Python/pydtrace.o"
11415 fi
11416fi
11417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011418# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011419
Guido van Rossum98935bf2001-09-05 19:13:16 +000011420DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011421
Guido van Rossume97ee181999-12-20 21:27:22 +000011422# the dlopen() function means we might want to use dynload_shlib.o. some
11423# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011424for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011425do :
11426 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011427if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011430_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011431
Guido van Rossume97ee181999-12-20 21:27:22 +000011432fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011433done
Guido van Rossume97ee181999-12-20 21:27:22 +000011434
Michael W. Hudson54241132001-12-07 15:38:26 +000011435
Guido van Rossume97ee181999-12-20 21:27:22 +000011436# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11437# loading of modules.
11438
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11440$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011441if test -z "$DYNLOADFILE"
11442then
11443 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011444 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11445 if test "$ac_cv_func_dlopen" = yes
11446 then DYNLOADFILE="dynload_shlib.o"
11447 else DYNLOADFILE="dynload_aix.o"
11448 fi
11449 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011450 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011451 *)
11452 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11453 # out any dynamic loading
11454 if test "$ac_cv_func_dlopen" = yes
11455 then DYNLOADFILE="dynload_shlib.o"
11456 else DYNLOADFILE="dynload_stub.o"
11457 fi
11458 ;;
11459 esac
11460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11462$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011463if test "$DYNLOADFILE" != "dynload_stub.o"
11464then
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011467
11468fi
11469
Neil Schemenauer4e425612001-06-19 15:44:15 +000011470# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11474$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011475if test -z "$MACHDEP_OBJS"
11476then
Jack Jansene578a632001-08-15 01:27:14 +000011477 MACHDEP_OBJS=$extra_machdep_objs
11478else
11479 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011480fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011481if test -z "$MACHDEP_OBJS"; then
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11483$as_echo "none" >&6; }
11484else
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11486$as_echo "$MACHDEP_OBJS" >&6; }
11487fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011488
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011490for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011491 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011492 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011493 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011494 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011495 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011496 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011497 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011498 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011499 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011500 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011501 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011502 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11503 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011504 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011505 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011506 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011507 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11508 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011509 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011510 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011511 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011512 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011513 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011514do :
11515 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11516ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011517if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011519#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011520_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011521
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011522fi
11523done
11524
Michael W. Hudson54241132001-12-07 15:38:26 +000011525
Benjamin Peterson40caa052018-09-12 15:52:40 -070011526# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11527# links. Some libc implementations have a stub lchmod implementation that always
11528# returns an error.
11529if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011530 for ac_func in lchmod
11531do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011532 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11533if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011534 cat >>confdefs.h <<_ACEOF
11535#define HAVE_LCHMOD 1
11536_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011537
11538fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011539done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011540
11541fi
11542
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011543ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11544 #include <dirent.h>
11545"
11546if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11547
11548$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11549
11550fi
11551
11552
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011553# For some functions, having a definition is not sufficient, since
11554# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11556$as_echo_n "checking for chroot... " >&6; }
11557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011558/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011560int
11561main ()
11562{
11563void *x=chroot
11564 ;
11565 return 0;
11566}
11567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011571
Matthias Kloseb159a552010-04-25 21:00:44 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011574else
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011577
11578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11581$as_echo_n "checking for link... " >&6; }
11582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585int
11586main ()
11587{
11588void *x=link
11589 ;
11590 return 0;
11591}
11592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011596
Matthias Kloseb159a552010-04-25 21:00:44 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011602
11603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11606$as_echo_n "checking for symlink... " >&6; }
11607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011608/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011610int
11611main ()
11612{
11613void *x=symlink
11614 ;
11615 return 0;
11616}
11617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011621
Matthias Kloseb159a552010-04-25 21:00:44 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11626$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011627
11628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11631$as_echo_n "checking for fchdir... " >&6; }
11632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011634#include <unistd.h>
11635int
11636main ()
11637{
11638void *x=fchdir
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011646
Matthias Kloseb159a552010-04-25 21:00:44 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011652
11653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11656$as_echo_n "checking for fsync... " >&6; }
11657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011658/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011659#include <unistd.h>
11660int
11661main ()
11662{
11663void *x=fsync
11664 ;
11665 return 0;
11666}
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011671
Matthias Kloseb159a552010-04-25 21:00:44 +000011672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011673$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11676$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011677
11678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11681$as_echo_n "checking for fdatasync... " >&6; }
11682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011684#include <unistd.h>
11685int
11686main ()
11687{
11688void *x=fdatasync
11689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011694
Matthias Kloseb9621712010-04-24 17:59:49 +000011695$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011696
Matthias Kloseb159a552010-04-25 21:00:44 +000011697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011698$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11701$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011702
11703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11706$as_echo_n "checking for epoll... " >&6; }
11707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011708/* end confdefs.h. */
11709#include <sys/epoll.h>
11710int
11711main ()
11712{
11713void *x=epoll_create
11714 ;
11715 return 0;
11716}
11717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011721
Matthias Kloseb159a552010-04-25 21:00:44 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011723$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011727
11728fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11731$as_echo_n "checking for epoll_create1... " >&6; }
11732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733/* end confdefs.h. */
11734#include <sys/epoll.h>
11735int
11736main ()
11737{
11738void *x=epoll_create1
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743if ac_fn_c_try_compile "$LINENO"; then :
11744
11745$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11746
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11748$as_echo "yes" >&6; }
11749else
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
11752
11753fi
11754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11756$as_echo_n "checking for kqueue... " >&6; }
11757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011758/* end confdefs.h. */
11759
11760#include <sys/types.h>
11761#include <sys/event.h>
11762
11763int
11764main ()
11765{
11766int x=kqueue()
11767 ;
11768 return 0;
11769}
11770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011774
Matthias Kloseb159a552010-04-25 21:00:44 +000011775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011776$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011780
11781fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11784$as_echo_n "checking for prlimit... " >&6; }
11785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11786/* end confdefs.h. */
11787
11788#include <sys/time.h>
11789#include <sys/resource.h>
11790
11791int
11792main ()
11793{
11794void *x=prlimit
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799if ac_fn_c_try_compile "$LINENO"; then :
11800
11801$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11802
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11804$as_echo "yes" >&6; }
11805else
11806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11807$as_echo "no" >&6; }
11808
11809fi
11810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11811
Martin v. Löwisd5843682002-11-21 20:41:28 +000011812# On some systems (eg. FreeBSD 5), we would find a definition of the
11813# functions ctermid_r, setgroups in the library, but no prototype
11814# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11815# address to avoid compiler warnings and potential miscompilations
11816# because of the missing prototypes.
11817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11819$as_echo_n "checking for ctermid_r... " >&6; }
11820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011822
Martin v. Löwisd5843682002-11-21 20:41:28 +000011823#include <stdio.h>
11824
Martin v. Löwisd5843682002-11-21 20:41:28 +000011825int
11826main ()
11827{
11828void* p = ctermid_r
11829 ;
11830 return 0;
11831}
11832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011836
Matthias Kloseb159a552010-04-25 21:00:44 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11841$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011842
11843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11845
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11847$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011848if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011849 $as_echo_n "(cached) " >&6
11850else
11851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011852/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011853#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011854int
11855main ()
11856{
11857void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011858
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011859 ;
11860 return 0;
11861}
11862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011864 ac_cv_flock_decl=yes
11865else
11866 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011867
11868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011870
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011871fi
11872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11873$as_echo "$ac_cv_flock_decl" >&6; }
11874if test "x${ac_cv_flock_decl}" = xyes; then
11875 for ac_func in flock
11876do :
11877 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011878if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011879 cat >>confdefs.h <<_ACEOF
11880#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011881_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011882
Antoine Pitroua3000072010-09-07 14:52:42 +000011883else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011885$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011887 $as_echo_n "(cached) " >&6
11888else
11889 ac_check_lib_save_LIBS=$LIBS
11890LIBS="-lbsd $LIBS"
11891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892/* end confdefs.h. */
11893
11894/* Override any GCC internal prototype to avoid an error.
11895 Use char because int might match the return type of a GCC
11896 builtin and then its argument prototype would still apply. */
11897#ifdef __cplusplus
11898extern "C"
11899#endif
11900char flock ();
11901int
11902main ()
11903{
11904return flock ();
11905 ;
11906 return 0;
11907}
11908_ACEOF
11909if ac_fn_c_try_link "$LINENO"; then :
11910 ac_cv_lib_bsd_flock=yes
11911else
11912 ac_cv_lib_bsd_flock=no
11913fi
11914rm -f core conftest.err conftest.$ac_objext \
11915 conftest$ac_exeext conftest.$ac_ext
11916LIBS=$ac_check_lib_save_LIBS
11917fi
11918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11919$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011921 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011922
11923
11924$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11925
11926
11927fi
11928
11929
11930fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011931done
11932
Antoine Pitroua3000072010-09-07 14:52:42 +000011933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11936$as_echo_n "checking for getpagesize... " >&6; }
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011939
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011940#include <unistd.h>
11941
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011942int
11943main ()
11944{
11945void* p = getpagesize
11946 ;
11947 return 0;
11948}
11949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011953
Matthias Kloseb159a552010-04-25 21:00:44 +000011954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11958$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011959
11960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011962
Victor Stinner984890f2011-11-24 13:53:38 +010011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11964$as_echo_n "checking for broken unsetenv... " >&6; }
11965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966/* end confdefs.h. */
11967
11968#include <stdlib.h>
11969
11970int
11971main ()
11972{
11973int res = unsetenv("DUMMY")
11974 ;
11975 return 0;
11976}
11977_ACEOF
11978if ac_fn_c_try_compile "$LINENO"; then :
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11980$as_echo "no" >&6; }
11981else
11982
11983$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11984
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11986$as_echo "yes" >&6; }
11987
11988fi
11989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11990
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011991for ac_prog in true
11992do
11993 # Extract the first word of "$ac_prog", so it can be a program name with args.
11994set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11996$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011997if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011999else
12000 if test -n "$TRUE"; then
12001 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12002else
12003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12004for as_dir in $PATH
12005do
12006 IFS=$as_save_IFS
12007 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012010 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 $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 +000012012 break 2
12013 fi
12014done
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012017
12018fi
12019fi
12020TRUE=$ac_cv_prog_TRUE
12021if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12023$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012024else
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12026$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012027fi
12028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012029
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012030 test -n "$TRUE" && break
12031done
12032test -n "$TRUE" || TRUE="/bin/true"
12033
12034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12036$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012039else
12040 ac_check_lib_save_LIBS=$LIBS
12041LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012043/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045/* Override any GCC internal prototype to avoid an error.
12046 Use char because int might match the return type of a GCC
12047 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012048#ifdef __cplusplus
12049extern "C"
12050#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012051char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012052int
12053main ()
12054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056 ;
12057 return 0;
12058}
12059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061 ac_cv_lib_c_inet_aton=yes
12062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012065rm -f core conftest.err conftest.$ac_objext \
12066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012067LIBS=$ac_check_lib_save_LIBS
12068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12070$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012071if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012072 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073else
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12075$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078else
12079 ac_check_lib_save_LIBS=$LIBS
12080LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012082/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012084/* Override any GCC internal prototype to avoid an error.
12085 Use char because int might match the return type of a GCC
12086 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012087#ifdef __cplusplus
12088extern "C"
12089#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012090char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012091int
12092main ()
12093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012095 ;
12096 return 0;
12097}
12098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012100 ac_cv_lib_resolv_inet_aton=yes
12101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012104rm -f core conftest.err conftest.$ac_objext \
12105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012106LIBS=$ac_check_lib_save_LIBS
12107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12109$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012111 cat >>confdefs.h <<_ACEOF
12112#define HAVE_LIBRESOLV 1
12113_ACEOF
12114
12115 LIBS="-lresolv $LIBS"
12116
12117fi
12118
12119
12120fi
12121
12122
Christian Heimesd0764e22007-12-04 15:00:33 +000012123# On Tru64, chflags seems to be present, but calling it will
12124# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12126$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012131 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012134/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012135
Christian Heimesd0764e22007-12-04 15:00:33 +000012136#include <sys/stat.h>
12137#include <unistd.h>
12138int main(int argc, char*argv[])
12139{
12140 if(chflags(argv[0], 0) != 0)
12141 return 1;
12142 return 0;
12143}
Ned Deily3eb67d52011-06-28 00:00:28 -070012144
Christian Heimesd0764e22007-12-04 15:00:33 +000012145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012146if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012147 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012153fi
12154
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012155
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12158$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012159if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012161if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012162 ac_cv_have_chflags="yes"
12163else
12164 ac_cv_have_chflags="no"
12165fi
12166
12167fi
12168if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012171
12172fi
12173
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12175$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012176if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012180 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012183/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012184
Christian Heimesd0764e22007-12-04 15:00:33 +000012185#include <sys/stat.h>
12186#include <unistd.h>
12187int main(int argc, char*argv[])
12188{
12189 if(lchflags(argv[0], 0) != 0)
12190 return 1;
12191 return 0;
12192}
Ned Deily3eb67d52011-06-28 00:00:28 -070012193
Christian Heimesd0764e22007-12-04 15:00:33 +000012194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012195if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012196 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12201 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012202fi
12203
12204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12207$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012208if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012210if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012211 ac_cv_have_lchflags="yes"
12212else
12213 ac_cv_have_lchflags="no"
12214fi
12215
12216fi
12217if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012220
12221fi
12222
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012223case $ac_sys_system/$ac_sys_release in
12224Darwin/*)
12225 _CUR_CFLAGS="${CFLAGS}"
12226 _CUR_LDFLAGS="${LDFLAGS}"
12227 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12228 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12229 ;;
12230esac
12231
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12233$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012236else
12237 ac_check_lib_save_LIBS=$LIBS
12238LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012240/* end confdefs.h. */
12241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242/* Override any GCC internal prototype to avoid an error.
12243 Use char because int might match the return type of a GCC
12244 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012245#ifdef __cplusplus
12246extern "C"
12247#endif
12248char inflateCopy ();
12249int
12250main ()
12251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012258 ac_cv_lib_z_inflateCopy=yes
12259else
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012262rm -f core conftest.err conftest.$ac_objext \
12263 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012264LIBS=$ac_check_lib_save_LIBS
12265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12267$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012268if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012271
12272fi
12273
12274
12275case $ac_sys_system/$ac_sys_release in
12276Darwin/*)
12277 CFLAGS="${_CUR_CFLAGS}"
12278 LDFLAGS="${_CUR_LDFLAGS}"
12279 ;;
12280esac
12281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12283$as_echo_n "checking for hstrerror... " >&6; }
12284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012285/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012286
Martin v. Löwise9416172003-05-03 10:12:45 +000012287#include <netdb.h>
12288
Martin v. Löwise9416172003-05-03 10:12:45 +000012289int
12290main ()
12291{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012292void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012293 ;
12294 return 0;
12295}
12296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012300
Matthias Kloseb159a552010-04-25 21:00:44 +000012301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012302$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12305$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012306
12307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012308rm -f core conftest.err conftest.$ac_objext \
12309 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12312$as_echo_n "checking for inet_aton... " >&6; }
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012315
Martin v. Löwis86d66262006-02-17 08:40:11 +000012316#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012317#include <sys/socket.h>
12318#include <netinet/in.h>
12319#include <arpa/inet.h>
12320
Martin v. Löwise9416172003-05-03 10:12:45 +000012321int
12322main ()
12323{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012324void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012332
Matthias Kloseb159a552010-04-25 21:00:44 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012334$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012335else
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012338
12339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012340rm -f core conftest.err conftest.$ac_objext \
12341 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12344$as_echo_n "checking for inet_pton... " >&6; }
12345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012347
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012348#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012349#include <sys/socket.h>
12350#include <netinet/in.h>
12351#include <arpa/inet.h>
12352
Martin v. Löwise9416172003-05-03 10:12:45 +000012353int
12354main ()
12355{
12356void* p = inet_pton
12357 ;
12358 return 0;
12359}
12360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012364
Matthias Kloseb159a552010-04-25 21:00:44 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012367else
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12369$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012370
12371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012373
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012374# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12376$as_echo_n "checking for setgroups... " >&6; }
12377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012379
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012380#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012381#ifdef HAVE_GRP_H
12382#include <grp.h>
12383#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012384
Martin v. Löwisd5843682002-11-21 20:41:28 +000012385int
12386main ()
12387{
12388void* p = setgroups
12389 ;
12390 return 0;
12391}
12392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012394
Matthias Kloseb9621712010-04-24 17:59:49 +000012395$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012396
Matthias Kloseb159a552010-04-25 21:00:44 +000012397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012398$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012399else
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12401$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012402
12403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012406# check for openpty and forkpty
12407
12408for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012409do :
12410 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012414_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12418$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012421else
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012423LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427/* Override any GCC internal prototype to avoid an error.
12428 Use char because int might match the return type of a GCC
12429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012430#ifdef __cplusplus
12431extern "C"
12432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012433char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444else
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012447rm -f core conftest.err conftest.$ac_objext \
12448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012449LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12452$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012453if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012456else
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12458$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012461else
12462 ac_check_lib_save_LIBS=$LIBS
12463LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012465/* end confdefs.h. */
12466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467/* Override any GCC internal prototype to avoid an error.
12468 Use char because int might match the return type of a GCC
12469 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012470#ifdef __cplusplus
12471extern "C"
12472#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012473char openpty ();
12474int
12475main ()
12476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012478 ;
12479 return 0;
12480}
12481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012483 ac_cv_lib_bsd_openpty=yes
12484else
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012487rm -f core conftest.err conftest.$ac_objext \
12488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012489LIBS=$ac_check_lib_save_LIBS
12490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12492$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012493if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012495 LIBS="$LIBS -lbsd"
12496fi
12497
12498
12499fi
12500
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501
12502fi
12503done
12504
12505for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012506do :
12507 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012508if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012510#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012511_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012512
Fred Drake8cef4cf2000-06-28 16:40:38 +000012513else
Matthias Kloseb9621712010-04-24 17:59:49 +000012514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12515$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012516if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518else
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012520LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524/* Override any GCC internal prototype to avoid an error.
12525 Use char because int might match the return type of a GCC
12526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012527#ifdef __cplusplus
12528extern "C"
12529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012530char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012531int
12532main ()
12533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ;
12536 return 0;
12537}
12538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012539if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012544rm -f core conftest.err conftest.$ac_objext \
12545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012546LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12549$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012550if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012552 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012553else
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12555$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012556if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012558else
12559 ac_check_lib_save_LIBS=$LIBS
12560LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012562/* end confdefs.h. */
12563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564/* Override any GCC internal prototype to avoid an error.
12565 Use char because int might match the return type of a GCC
12566 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012567#ifdef __cplusplus
12568extern "C"
12569#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012570char forkpty ();
12571int
12572main ()
12573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012575 ;
12576 return 0;
12577}
12578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012579if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012580 ac_cv_lib_bsd_forkpty=yes
12581else
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012584rm -f core conftest.err conftest.$ac_objext \
12585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012586LIBS=$ac_check_lib_save_LIBS
12587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12589$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012590if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012592 LIBS="$LIBS -lbsd"
12593fi
12594
12595
12596fi
12597
Fred Drake8cef4cf2000-06-28 16:40:38 +000012598
12599fi
12600done
12601
Jack Jansendd19cf82001-12-06 22:36:17 +000012602
Michael W. Hudson54241132001-12-07 15:38:26 +000012603# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012604for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012605do :
12606 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12607ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012608if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012610#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012611_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012614done
12615
Michael W. Hudson54241132001-12-07 15:38:26 +000012616
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012617ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012618if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012619 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012620
Martin v. Löwis1142de32002-03-29 16:28:31 +000012621else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012622 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012623 *" dup2.$ac_objext "* ) ;;
12624 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012626esac
12627
Martin v. Löwis1142de32002-03-29 16:28:31 +000012628fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012629
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012630ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012631if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012632 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12633
12634else
12635 case " $LIBOBJS " in
12636 *" strdup.$ac_objext "* ) ;;
12637 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12638 ;;
12639esac
12640
12641fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012642
12643
12644for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012645do :
12646 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012647if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012648 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012649#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ;
12659 return 0;
12660}
12661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012662if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012665
Guido van Rossum627b2d71993-12-24 10:39:16 +000012666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012668
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012670done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671
Jack Jansen150753c2003-03-29 22:07:47 +000012672for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012673do :
12674 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012675if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012676 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012681#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012682int
12683main ()
12684{
12685setpgrp(0,0);
12686 ;
12687 return 0;
12688}
12689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012690if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012693
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012696
12697fi
12698done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012699
Thomas Wouters3a584202000-08-05 23:28:51 +000012700for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012701do :
12702 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012703if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012705#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012708/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012709#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012710int
12711main ()
12712{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012713gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if ac_fn_c_try_compile "$LINENO"; then :
12719
Guido van Rossum627b2d71993-12-24 10:39:16 +000012720else
Skip Montanaro6dead952003-09-25 14:50:04 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012723
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Guido van Rossum627b2d71993-12-24 10:39:16 +000012725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012729done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730
Michael W. Hudson54241132001-12-07 15:38:26 +000012731
Gregory P. Smith387512c2018-12-30 15:42:32 -080012732# We search for both crypt and crypt_r as one or the other may be defined
12733# This gets us our -lcrypt in LIBS when required on the target platform.
12734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12735$as_echo_n "checking for library containing crypt... " >&6; }
12736if ${ac_cv_search_crypt+:} false; then :
12737 $as_echo_n "(cached) " >&6
12738else
12739 ac_func_search_save_LIBS=$LIBS
12740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741/* end confdefs.h. */
12742
12743/* Override any GCC internal prototype to avoid an error.
12744 Use char because int might match the return type of a GCC
12745 builtin and then its argument prototype would still apply. */
12746#ifdef __cplusplus
12747extern "C"
12748#endif
12749char crypt ();
12750int
12751main ()
12752{
12753return crypt ();
12754 ;
12755 return 0;
12756}
12757_ACEOF
12758for ac_lib in '' crypt; do
12759 if test -z "$ac_lib"; then
12760 ac_res="none required"
12761 else
12762 ac_res=-l$ac_lib
12763 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12764 fi
12765 if ac_fn_c_try_link "$LINENO"; then :
12766 ac_cv_search_crypt=$ac_res
12767fi
12768rm -f core conftest.err conftest.$ac_objext \
12769 conftest$ac_exeext
12770 if ${ac_cv_search_crypt+:} false; then :
12771 break
12772fi
12773done
12774if ${ac_cv_search_crypt+:} false; then :
12775
12776else
12777 ac_cv_search_crypt=no
12778fi
12779rm conftest.$ac_ext
12780LIBS=$ac_func_search_save_LIBS
12781fi
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12783$as_echo "$ac_cv_search_crypt" >&6; }
12784ac_res=$ac_cv_search_crypt
12785if test "$ac_res" != no; then :
12786 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12787
12788fi
12789
12790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12791$as_echo_n "checking for library containing crypt_r... " >&6; }
12792if ${ac_cv_search_crypt_r+:} false; then :
12793 $as_echo_n "(cached) " >&6
12794else
12795 ac_func_search_save_LIBS=$LIBS
12796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797/* end confdefs.h. */
12798
12799/* Override any GCC internal prototype to avoid an error.
12800 Use char because int might match the return type of a GCC
12801 builtin and then its argument prototype would still apply. */
12802#ifdef __cplusplus
12803extern "C"
12804#endif
12805char crypt_r ();
12806int
12807main ()
12808{
12809return crypt_r ();
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814for ac_lib in '' crypt; do
12815 if test -z "$ac_lib"; then
12816 ac_res="none required"
12817 else
12818 ac_res=-l$ac_lib
12819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12820 fi
12821 if ac_fn_c_try_link "$LINENO"; then :
12822 ac_cv_search_crypt_r=$ac_res
12823fi
12824rm -f core conftest.err conftest.$ac_objext \
12825 conftest$ac_exeext
12826 if ${ac_cv_search_crypt_r+:} false; then :
12827 break
12828fi
12829done
12830if ${ac_cv_search_crypt_r+:} false; then :
12831
12832else
12833 ac_cv_search_crypt_r=no
12834fi
12835rm conftest.$ac_ext
12836LIBS=$ac_func_search_save_LIBS
12837fi
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12839$as_echo "$ac_cv_search_crypt_r" >&6; }
12840ac_res=$ac_cv_search_crypt_r
12841if test "$ac_res" != no; then :
12842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12843
12844fi
12845
12846
12847ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12848if test "x$ac_cv_func_crypt_r" = xyes; then :
12849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12850/* end confdefs.h. */
12851
12852#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12853#include <crypt.h>
12854
12855int
12856main ()
12857{
12858
12859struct crypt_data d;
12860char *r = crypt_r("", "", &d);
12861
12862 ;
12863 return 0;
12864}
12865_ACEOF
12866if ac_fn_c_try_compile "$LINENO"; then :
12867
12868$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12869
12870fi
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12872
12873fi
12874
12875
Victor Stinnere0be4232011-10-25 13:06:09 +020012876for ac_func in clock_gettime
12877do :
12878 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12879if test "x$ac_cv_func_clock_gettime" = xyes; then :
12880 cat >>confdefs.h <<_ACEOF
12881#define HAVE_CLOCK_GETTIME 1
12882_ACEOF
12883
12884else
12885
12886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12887$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12888if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12889 $as_echo_n "(cached) " >&6
12890else
12891 ac_check_lib_save_LIBS=$LIBS
12892LIBS="-lrt $LIBS"
12893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12894/* end confdefs.h. */
12895
12896/* Override any GCC internal prototype to avoid an error.
12897 Use char because int might match the return type of a GCC
12898 builtin and then its argument prototype would still apply. */
12899#ifdef __cplusplus
12900extern "C"
12901#endif
12902char clock_gettime ();
12903int
12904main ()
12905{
12906return clock_gettime ();
12907 ;
12908 return 0;
12909}
12910_ACEOF
12911if ac_fn_c_try_link "$LINENO"; then :
12912 ac_cv_lib_rt_clock_gettime=yes
12913else
12914 ac_cv_lib_rt_clock_gettime=no
12915fi
12916rm -f core conftest.err conftest.$ac_objext \
12917 conftest$ac_exeext conftest.$ac_ext
12918LIBS=$ac_check_lib_save_LIBS
12919fi
12920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12921$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12922if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12923
Victor Stinner7efb8332014-08-29 15:41:08 +020012924 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012925 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12926
12927
12928$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12929
12930
12931fi
12932
12933
12934fi
12935done
12936
12937
12938for ac_func in clock_getres
12939do :
12940 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12941if test "x$ac_cv_func_clock_getres" = xyes; then :
12942 cat >>confdefs.h <<_ACEOF
12943#define HAVE_CLOCK_GETRES 1
12944_ACEOF
12945
12946else
12947
12948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12949$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12950if ${ac_cv_lib_rt_clock_getres+:} false; then :
12951 $as_echo_n "(cached) " >&6
12952else
12953 ac_check_lib_save_LIBS=$LIBS
12954LIBS="-lrt $LIBS"
12955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12956/* end confdefs.h. */
12957
12958/* Override any GCC internal prototype to avoid an error.
12959 Use char because int might match the return type of a GCC
12960 builtin and then its argument prototype would still apply. */
12961#ifdef __cplusplus
12962extern "C"
12963#endif
12964char clock_getres ();
12965int
12966main ()
12967{
12968return clock_getres ();
12969 ;
12970 return 0;
12971}
12972_ACEOF
12973if ac_fn_c_try_link "$LINENO"; then :
12974 ac_cv_lib_rt_clock_getres=yes
12975else
12976 ac_cv_lib_rt_clock_getres=no
12977fi
12978rm -f core conftest.err conftest.$ac_objext \
12979 conftest$ac_exeext conftest.$ac_ext
12980LIBS=$ac_check_lib_save_LIBS
12981fi
12982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12983$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12984if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12985
12986 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12987
12988
12989fi
12990
12991
12992fi
12993done
12994
12995
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012996for ac_func in clock_settime
12997do :
12998 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12999if test "x$ac_cv_func_clock_settime" = xyes; then :
13000 cat >>confdefs.h <<_ACEOF
13001#define HAVE_CLOCK_SETTIME 1
13002_ACEOF
13003
13004else
13005
13006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13007$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13008if ${ac_cv_lib_rt_clock_settime+:} false; then :
13009 $as_echo_n "(cached) " >&6
13010else
13011 ac_check_lib_save_LIBS=$LIBS
13012LIBS="-lrt $LIBS"
13013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13014/* end confdefs.h. */
13015
13016/* Override any GCC internal prototype to avoid an error.
13017 Use char because int might match the return type of a GCC
13018 builtin and then its argument prototype would still apply. */
13019#ifdef __cplusplus
13020extern "C"
13021#endif
13022char clock_settime ();
13023int
13024main ()
13025{
13026return clock_settime ();
13027 ;
13028 return 0;
13029}
13030_ACEOF
13031if ac_fn_c_try_link "$LINENO"; then :
13032 ac_cv_lib_rt_clock_settime=yes
13033else
13034 ac_cv_lib_rt_clock_settime=no
13035fi
13036rm -f core conftest.err conftest.$ac_objext \
13037 conftest$ac_exeext conftest.$ac_ext
13038LIBS=$ac_check_lib_save_LIBS
13039fi
13040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13041$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13042if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13043
13044 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13045
13046
13047fi
13048
13049
13050fi
13051done
13052
13053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13055$as_echo_n "checking for major... " >&6; }
13056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013057/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013058
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013059#if defined(MAJOR_IN_MKDEV)
13060#include <sys/mkdev.h>
13061#elif defined(MAJOR_IN_SYSMACROS)
13062#include <sys/sysmacros.h>
13063#else
13064#include <sys/types.h>
13065#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013066
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013067int
13068main ()
13069{
13070
13071 makedev(major(0),minor(0));
13072
13073 ;
13074 return 0;
13075}
13076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013078
13079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13083$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013084
13085else
Skip Montanaro6dead952003-09-25 14:50:04 +000013086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13088$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013089
13090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013091rm -f core conftest.err conftest.$ac_objext \
13092 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013093
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013094# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013095# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13097$as_echo_n "checking for getaddrinfo... " >&6; }
13098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013099/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013100
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013101#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013102#include <sys/socket.h>
13103#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013104#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106int
13107main ()
13108{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013109getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013110 ;
13111 return 0;
13112}
13113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013114if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013115 have_getaddrinfo=yes
13116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013119rm -f core conftest.err conftest.$ac_objext \
13120 conftest$ac_exeext conftest.$ac_ext
13121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13122$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013123if test $have_getaddrinfo = yes
13124then
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13126$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013127 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013131
13132if test "${enable_ipv6+set}" = set; then
13133 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13134else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013135 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013136fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140
Stefan Krah19c21392012-11-22 23:47:32 +010013141#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142#include <sys/types.h>
13143#include <netdb.h>
13144#include <string.h>
13145#include <sys/socket.h>
13146#include <netinet/in.h>
13147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013149{
13150 int passive, gaierr, inet4 = 0, inet6 = 0;
13151 struct addrinfo hints, *ai, *aitop;
13152 char straddr[INET6_ADDRSTRLEN], strport[16];
13153
13154 for (passive = 0; passive <= 1; passive++) {
13155 memset(&hints, 0, sizeof(hints));
13156 hints.ai_family = AF_UNSPEC;
13157 hints.ai_flags = passive ? AI_PASSIVE : 0;
13158 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013159 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13161 (void)gai_strerror(gaierr);
13162 goto bad;
13163 }
13164 for (ai = aitop; ai; ai = ai->ai_next) {
13165 if (ai->ai_addr == NULL ||
13166 ai->ai_addrlen == 0 ||
13167 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13168 straddr, sizeof(straddr), strport, sizeof(strport),
13169 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13170 goto bad;
13171 }
13172 switch (ai->ai_family) {
13173 case AF_INET:
13174 if (strcmp(strport, "54321") != 0) {
13175 goto bad;
13176 }
13177 if (passive) {
13178 if (strcmp(straddr, "0.0.0.0") != 0) {
13179 goto bad;
13180 }
13181 } else {
13182 if (strcmp(straddr, "127.0.0.1") != 0) {
13183 goto bad;
13184 }
13185 }
13186 inet4++;
13187 break;
13188 case AF_INET6:
13189 if (strcmp(strport, "54321") != 0) {
13190 goto bad;
13191 }
13192 if (passive) {
13193 if (strcmp(straddr, "::") != 0) {
13194 goto bad;
13195 }
13196 } else {
13197 if (strcmp(straddr, "::1") != 0) {
13198 goto bad;
13199 }
13200 }
13201 inet6++;
13202 break;
13203 case AF_UNSPEC:
13204 goto bad;
13205 break;
13206 default:
13207 /* another family support? */
13208 break;
13209 }
13210 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013211 freeaddrinfo(aitop);
13212 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013213 }
13214
13215 if (!(inet4 == 0 || inet4 == 2))
13216 goto bad;
13217 if (!(inet6 == 0 || inet6 == 2))
13218 goto bad;
13219
13220 if (aitop)
13221 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223
13224 bad:
13225 if (aitop)
13226 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013227 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228}
13229
Martin v. Löwis11437992002-04-12 09:54:03 +000013230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013232 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233else
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013240fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13245$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13246
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013247if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248then
13249 if test $ipv6 = yes
13250 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251 echo 'Fatal: You must get working getaddrinfo() function.'
13252 echo ' or you can specify "--disable-ipv6"'.
13253 exit 1
13254 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013255else
Martin v. Löwis11437992002-04-12 09:54:03 +000013256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013258
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013259fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013260
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013261for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013262do :
13263 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013264if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013266#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013267_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269fi
13270done
13271
Michael W. Hudson54241132001-12-07 15:38:26 +000013272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013273# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13275$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013276if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281#include <sys/types.h>
13282#include <sys/time.h>
13283#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
13288if ((struct tm *) 0)
13289return 0;
13290 ;
13291 return 0;
13292}
13293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13302$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013303if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306
13307fi
13308
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13310$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013311if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013315/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316#include <sys/types.h>
13317#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319int
13320main ()
13321{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013322struct tm tm;
13323 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013325 ;
13326 return 0;
13327}
13328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013329if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330 ac_cv_struct_tm=time.h
13331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13337$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013338if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341
13342fi
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344ac_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 +000013345#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347"
Victor Stinnere0be4232011-10-25 13:06:09 +020013348if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
13350cat >>confdefs.h <<_ACEOF
13351#define HAVE_STRUCT_TM_TM_ZONE 1
13352_ACEOF
13353
13354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013356
Martin v. Löwis11437992002-04-12 09:54:03 +000013357if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360
13361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13363"
Victor Stinnere0be4232011-10-25 13:06:09 +020013364if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368fi
13369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013372_ACEOF
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13375$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013376if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378else
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013380/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013381#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382#if !HAVE_DECL_TZNAME
13383extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386int
13387main ()
13388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 ;
13391 return 0;
13392}
13393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395 ac_cv_var_tzname=yes
13396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013399rm -f core conftest.err conftest.$ac_objext \
13400 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13403$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013404 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408 fi
13409fi
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411ac_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 +020013412if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013413
13414cat >>confdefs.h <<_ACEOF
13415#define HAVE_STRUCT_STAT_ST_RDEV 1
13416_ACEOF
13417
13418
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421ac_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 +020013422if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424cat >>confdefs.h <<_ACEOF
13425#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13426_ACEOF
13427
13428
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013429fi
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431ac_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 +020013432if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013433
13434cat >>confdefs.h <<_ACEOF
13435#define HAVE_STRUCT_STAT_ST_FLAGS 1
13436_ACEOF
13437
13438
13439fi
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441ac_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 +020013442if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013443
13444cat >>confdefs.h <<_ACEOF
13445#define HAVE_STRUCT_STAT_ST_GEN 1
13446_ACEOF
13447
13448
13449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451ac_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 +020013452if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013453
13454cat >>confdefs.h <<_ACEOF
13455#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13456_ACEOF
13457
13458
13459fi
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461ac_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 +020013462if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464cat >>confdefs.h <<_ACEOF
13465#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13466_ACEOF
13467
13468
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013469fi
13470
Stefan Krah267b6392016-04-26 01:09:18 +020013471ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13472 #include <sys/types.h>
13473 #include <pwd.h>
13474
13475"
13476if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13477
13478cat >>confdefs.h <<_ACEOF
13479#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13480_ACEOF
13481
13482
13483fi
13484ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13485 #include <sys/types.h>
13486 #include <pwd.h>
13487
13488"
13489if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13490
13491cat >>confdefs.h <<_ACEOF
13492#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13493_ACEOF
13494
13495
13496fi
13497
Zachary Ware6a6967e2016-10-01 00:47:27 -050013498# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13499ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13500"
13501if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13502
13503cat >>confdefs.h <<_ACEOF
13504#define HAVE_SIGINFO_T_SI_BAND 1
13505_ACEOF
13506
13507
13508fi
13509
Michael W. Hudson54241132001-12-07 15:38:26 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13512$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013513if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515else
Matthias Kloseb159a552010-04-25 21:00:44 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013518/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013520int
13521main ()
13522{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013523return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 ;
13525 return 0;
13526}
13527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013528if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529 ac_cv_header_time_altzone=yes
13530else
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013535fi
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13538$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542
13543fi
13544
Guido van Rossumda88dad1995-01-26 00:46:29 +000013545was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13547$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013549/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013550
13551#include <sys/types.h>
13552#include <sys/select.h>
13553#include <sys/time.h>
13554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555int
13556main ()
13557{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013558;
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ;
13560 return 0;
13561}
13562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
13565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013567
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013568 was_it_defined=yes
13569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13573$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013574
Matthias Kloseb9621712010-04-24 17:59:49 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13576$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013577if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013581/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013582#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013583int
13584main ()
13585{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013587 ;
13588 return 0;
13589}
13590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013592 ac_cv_struct_addrinfo=yes
13593else
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13597fi
13598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13600$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013601if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604
13605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13608$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013609if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611else
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013613/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013614
13615# include <sys/types.h>
13616# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013617int
13618main ()
13619{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 ;
13622 return 0;
13623}
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626 ac_cv_struct_sockaddr_storage=yes
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13631fi
13632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13634$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638
13639fi
13640
Christian Heimesdffa3942016-09-05 23:54:41 +020013641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13642$as_echo_n "checking for sockaddr_alg... " >&6; }
13643if ${ac_cv_struct_sockaddr_alg+:} false; then :
13644 $as_echo_n "(cached) " >&6
13645else
13646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647/* end confdefs.h. */
13648
13649# include <sys/types.h>
13650# include <sys/socket.h>
13651# include <linux/if_alg.h>
13652int
13653main ()
13654{
13655struct sockaddr_alg s
13656 ;
13657 return 0;
13658}
13659_ACEOF
13660if ac_fn_c_try_compile "$LINENO"; then :
13661 ac_cv_struct_sockaddr_alg=yes
13662else
13663 ac_cv_struct_sockaddr_alg=no
13664fi
13665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13666fi
13667
13668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13669$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13670if test $ac_cv_struct_sockaddr_alg = yes; then
13671
13672$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13673
13674fi
13675
Guido van Rossum627b2d71993-12-24 10:39:16 +000013676# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13679$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013680if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013682else
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013685$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013686int
13687main ()
13688{
13689static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013690test_array [0] = 0;
13691return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
13693 ;
13694 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013695}
Martin v. Löwis11437992002-04-12 09:54:03 +000013696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013697if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013698 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13705$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013706if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013708
13709fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13712$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013713if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013717/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013718
Martin v. Löwis11437992002-04-12 09:54:03 +000013719int
13720main ()
13721{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013722
Martin v. Löwis11437992002-04-12 09:54:03 +000013723#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013724 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013726 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728 char const *const *pcpcc;
13729 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 /* NEC SVR4.0.2 mips cc rejects this. */
13731 struct point {int x, y;};
13732 static struct point const zero = {0,0};
13733 /* AIX XL C 1.02.0.0 rejects this.
13734 It does not let you subtract one const X* pointer from another in
13735 an arm of an if-expression whose if-part is not a constant
13736 expression */
13737 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740 ++pcpcc;
13741 ppc = (char**) pcpcc;
13742 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013743 { /* SCO 3.2v4 cc rejects this sort of thing. */
13744 char tx;
13745 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 }
13751 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13752 int x[] = {25, 17};
13753 const int *foo = &x[0];
13754 ++foo;
13755 }
13756 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13757 typedef const int *iptr;
13758 iptr p = 0;
13759 ++p;
13760 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013761 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013763 struct s { int j; const int *ap[3]; } bx;
13764 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 }
13766 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13767 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013771#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ;
13774 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013775}
Martin v. Löwis11437992002-04-12 09:54:03 +000013776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778 ac_cv_c_const=yes
13779else
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13785$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013789
13790fi
13791
Michael W. Hudson54241132001-12-07 15:38:26 +000013792
Guido van Rossumda88dad1995-01-26 00:46:29 +000013793works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13795$as_echo_n "checking for working signed char... " >&6; }
13796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013797/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013798
Martin v. Löwis11437992002-04-12 09:54:03 +000013799int
13800main ()
13801{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ;
13804 return 0;
13805}
13806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013808 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013809else
Skip Montanaro6dead952003-09-25 14:50:04 +000013810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013813
Guido van Rossum7f43da71994-08-01 12:15:30 +000013814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13817$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013818
Guido van Rossumda88dad1995-01-26 00:46:29 +000013819have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13821$as_echo_n "checking for prototypes... " >&6; }
13822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013823/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013824int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013825int
13826main ()
13827{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 ;
13830 return 0;
13831}
13832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Matthias Kloseb159a552010-04-25 21:00:44 +000013837 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13841$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842
Guido van Rossumda88dad1995-01-26 00:46:29 +000013843works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13845$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013847/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013848
13849#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013850int foo(int x, ...) {
13851 va_list va;
13852 va_start(va, x);
13853 va_arg(va, int);
13854 va_arg(va, char *);
13855 va_arg(va, double);
13856 return 0;
13857}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013858
Martin v. Löwis11437992002-04-12 09:54:03 +000013859int
13860main ()
13861{
Guido van Rossum90eea071996-08-30 20:58:57 +000013862return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 ;
13864 return 0;
13865}
13866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
13869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013871
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013872 works=yes
13873
Guido van Rossum627b2d71993-12-24 10:39:16 +000013874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13877$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013878
Martin v. Löwisd6320502004-08-12 13:45:08 +000013879# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13881$as_echo_n "checking for socketpair... " >&6; }
13882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013883/* end confdefs.h. */
13884
13885#include <sys/types.h>
13886#include <sys/socket.h>
13887
13888int
13889main ()
13890{
13891void *x=socketpair
13892 ;
13893 return 0;
13894}
13895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013899
Matthias Kloseb159a552010-04-25 21:00:44 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013901$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13904$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013905
13906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013908
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013909# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13911$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013913/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013914#include <sys/types.h>
13915#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013916int
13917main ()
13918{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013919struct sockaddr x;
13920x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 ;
13922 return 0;
13923}
13924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if ac_fn_c_try_compile "$LINENO"; then :
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13927$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013930
13931else
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13933$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013934
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013937
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013938# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013939
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013942if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13947$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013948 OLD_CFLAGS=$CFLAGS
13949 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013951/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013952
13953# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
Martin v. Löwis11437992002-04-12 09:54:03 +000013955int
13956main ()
13957{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013958
13959 char *name;
13960 struct hostent *he, *res;
13961 char buffer[2048];
13962 int buflen = 2048;
13963 int h_errnop;
13964
13965 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
13967 ;
13968 return 0;
13969}
13970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013974
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13979$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013980
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013981else
Skip Montanaro6dead952003-09-25 14:50:04 +000013982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13984$as_echo "no" >&6; }
13985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13986$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013988/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992int
13993main ()
13994{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013995
13996 char *name;
13997 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013998 char buffer[2048];
13999 int buflen = 2048;
14000 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014001
Matthias Kloseb159a552010-04-25 21:00:44 +000014002 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
14004 ;
14005 return 0;
14006}
14007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012
Matthias Kloseb159a552010-04-25 21:00:44 +000014013$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14016$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018else
Skip Montanaro6dead952003-09-25 14:50:04 +000014019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14021$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14023$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14025/* end confdefs.h. */
14026
14027# include <netdb.h>
14028
14029int
14030main ()
14031{
14032
14033 char *name;
14034 struct hostent *he;
14035 struct hostent_data data;
14036
14037 (void) gethostbyname_r(name, he, &data);
14038
14039 ;
14040 return 0;
14041}
14042_ACEOF
14043if ac_fn_c_try_compile "$LINENO"; then :
14044
14045 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14046
14047
14048$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14049
14050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14051$as_echo "yes" >&6; }
14052
14053else
14054
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14056$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066 CFLAGS=$OLD_CFLAGS
14067
14068else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 for ac_func in gethostbyname
14071do :
14072 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014073if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014075#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014076_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014077
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014078fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014079done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080
Michael W. Hudson54241132001-12-07 15:38:26 +000014081
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014082fi
14083
Michael W. Hudson54241132001-12-07 15:38:26 +000014084
14085
14086
14087
14088
14089
Guido van Rossum627b2d71993-12-24 10:39:16 +000014090# checks for system services
14091# (none yet)
14092
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014093# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014094ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014095if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014096
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014097else
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14099$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014100if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014102else
Martin v. Löwis11437992002-04-12 09:54:03 +000014103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014104LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108/* Override any GCC internal prototype to avoid an error.
14109 Use char because int might match the return type of a GCC
14110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014111#ifdef __cplusplus
14112extern "C"
14113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014114char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014115int
14116main ()
14117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 ;
14120 return 0;
14121}
14122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014125else
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014128rm -f core conftest.err conftest.$ac_objext \
14129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14133$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014134if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014135 cat >>confdefs.h <<_ACEOF
14136#define HAVE_LIBIEEE 1
14137_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014138
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014139 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014140
Guido van Rossum627b2d71993-12-24 10:39:16 +000014141fi
14142
Michael W. Hudson54241132001-12-07 15:38:26 +000014143
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014144fi
14145
Michael W. Hudson54241132001-12-07 15:38:26 +000014146
Guido van Rossum7f43da71994-08-01 12:15:30 +000014147# check for --with-libm=...
14148
Guido van Rossum563e7081996-09-10 18:20:48 +000014149case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014150Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014151*) LIBM=-lm
14152esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14154$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014157if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014159if test "$withval" = no
14160then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14162$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014163elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014164then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14166$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014167else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014168fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14171$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172fi
14173
Guido van Rossum7f43da71994-08-01 12:15:30 +000014174
14175# check for --with-libc=...
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14178$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014181if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014183if test "$withval" = no
14184then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14186$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014187elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014188then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14190$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014191else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014192fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014193else
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14195$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196fi
14197
Guido van Rossum7f43da71994-08-01 12:15:30 +000014198
Stefan Krah1919b7e2012-03-21 18:25:23 +010014199# **************************************
14200# * Check for gcc x64 inline assembler *
14201# **************************************
14202
14203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14204$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206/* end confdefs.h. */
14207
14208int
14209main ()
14210{
14211
14212 __asm__ __volatile__ ("movq %rcx, %rax");
14213
14214 ;
14215 return 0;
14216}
14217_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014218if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014219 have_gcc_asm_for_x64=yes
14220else
14221 have_gcc_asm_for_x64=no
14222fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014223rm -f core conftest.err conftest.$ac_objext \
14224 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14226$as_echo "$have_gcc_asm_for_x64" >&6; }
14227if test "$have_gcc_asm_for_x64" = yes
14228then
14229
14230$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14231
14232fi
14233
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014234# **************************************************
14235# * Check for various properties of floating point *
14236# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014237
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14239$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14240if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014242else
14243
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014244
14245ax_cv_c_float_words_bigendian=unknown
14246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247/* end confdefs.h. */
14248
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014249
14250double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252
14253_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014254if ac_fn_c_try_compile "$LINENO"; then :
14255
14256
14257if grep noonsees conftest.$ac_objext >/dev/null ; then
14258 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014259fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014260if grep seesnoon conftest.$ac_objext >/dev/null ; then
14261 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14262 ax_cv_c_float_words_bigendian=no
14263 else
14264 ax_cv_c_float_words_bigendian=unknown
14265 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014266fi
14267
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014268
14269fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014271fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14273$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014274
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014275case $ax_cv_c_float_words_bigendian in
14276 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014277
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014278$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14279 ;;
14280 no)
14281 ;;
14282 *)
14283 as_fn_error $? "
14284
14285Unknown float word ordering. You need to manually preset
14286ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14287
14288 " "$LINENO" 5 ;;
14289esac
14290
14291
14292if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014293then
14294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014296
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014297elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298then
14299
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014300$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14301
14302else
14303 # Some ARM platforms use a mixed-endian representation for doubles.
14304 # While Python doesn't currently have full support for these platforms
14305 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14306 # conversions work.
14307 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14308 # or little, then it must be this?
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014311
14312fi
14313
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014314# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014315# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014316# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014317# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014318# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014319# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014320
14321# This inline assembler syntax may also work for suncc and icc,
14322# so we try it on all platforms.
14323
Matthias Kloseb9621712010-04-24 17:59:49 +000014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14325$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014327/* end confdefs.h. */
14328
14329int
14330main ()
14331{
14332
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014333 unsigned short cw;
14334 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14335 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014336
14337 ;
14338 return 0;
14339}
14340_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014341if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014342 have_gcc_asm_for_x87=yes
14343else
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014345fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014346rm -f core conftest.err conftest.$ac_objext \
14347 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14349$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014350if test "$have_gcc_asm_for_x87" = yes
14351then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014352
Matthias Kloseb9621712010-04-24 17:59:49 +000014353$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014354
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14358$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360/* end confdefs.h. */
14361
14362int
14363main ()
14364{
14365
14366 unsigned int fpcr;
14367 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14368 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14369
14370 ;
14371 return 0;
14372}
14373_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014374if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014375 have_gcc_asm_for_mc68881=yes
14376else
14377 have_gcc_asm_for_mc68881=no
14378fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014379rm -f core conftest.err conftest.$ac_objext \
14380 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14382$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14383if test "$have_gcc_asm_for_mc68881" = yes
14384then
14385
14386$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14387
14388fi
14389
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014390# Detect whether system arithmetic is subject to x87-style double
14391# rounding issues. The result of this test has little meaning on non
14392# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14393# mode is round-to-nearest and double rounding issues are present, and
14394# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14396$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014397# $BASECFLAGS may affect the result
14398ac_save_cc="$CC"
14399CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014401 ac_cv_x87_double_rounding=no
14402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014404/* end confdefs.h. */
14405
14406#include <stdlib.h>
14407#include <math.h>
14408int main() {
14409 volatile double x, y, z;
14410 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14411 x = 0.99999999999999989; /* 1-2**-53 */
14412 y = 1./x;
14413 if (y != 1.)
14414 exit(0);
14415 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14416 x = 1e16;
14417 y = 2.99999;
14418 z = x + y;
14419 if (z != 1e16+4.)
14420 exit(0);
14421 /* both tests show evidence of double rounding */
14422 exit(1);
14423}
14424
14425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014426if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014427 ac_cv_x87_double_rounding=no
14428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14432 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014433fi
14434
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014435CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14437$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014438if test "$ac_cv_x87_double_rounding" = yes
14439then
14440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014442
14443fi
14444
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014445# ************************************
14446# * Check for mathematical functions *
14447# ************************************
14448
14449LIBS_SAVE=$LIBS
14450LIBS="$LIBS $LIBM"
14451
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014452for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14453do :
14454 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14455ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014456if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014457 cat >>confdefs.h <<_ACEOF
14458#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14459_ACEOF
14460
14461fi
14462done
14463
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014464for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014465do :
14466 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14467ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014468if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014469 cat >>confdefs.h <<_ACEOF
14470#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14471_ACEOF
14472
14473fi
14474done
14475
14476ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14477"
Victor Stinnere0be4232011-10-25 13:06:09 +020014478if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014479 ac_have_decl=1
14480else
14481 ac_have_decl=0
14482fi
14483
14484cat >>confdefs.h <<_ACEOF
14485#define HAVE_DECL_ISINF $ac_have_decl
14486_ACEOF
14487ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14488"
Victor Stinnere0be4232011-10-25 13:06:09 +020014489if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014490 ac_have_decl=1
14491else
14492 ac_have_decl=0
14493fi
14494
14495cat >>confdefs.h <<_ACEOF
14496#define HAVE_DECL_ISNAN $ac_have_decl
14497_ACEOF
14498ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14499"
Victor Stinnere0be4232011-10-25 13:06:09 +020014500if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014501 ac_have_decl=1
14502else
14503 ac_have_decl=0
14504fi
14505
14506cat >>confdefs.h <<_ACEOF
14507#define HAVE_DECL_ISFINITE $ac_have_decl
14508_ACEOF
14509
14510
Mark Dickinsona614f042009-11-28 12:48:43 +000014511# For multiprocessing module, check that sem_open
14512# actually works. For FreeBSD versions <= 7.2,
14513# the kernel module that provides POSIX semaphores
14514# isn't loaded by default, so an attempt to call
14515# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14517$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014522 ac_cv_posix_semaphores_enabled=yes
14523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014525/* end confdefs.h. */
14526
14527#include <unistd.h>
14528#include <fcntl.h>
14529#include <stdio.h>
14530#include <semaphore.h>
14531#include <sys/stat.h>
14532
14533int main(void) {
14534 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14535 if (a == SEM_FAILED) {
14536 perror("sem_open");
14537 return 1;
14538 }
14539 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014540 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014541 return 0;
14542}
14543
14544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014546 ac_cv_posix_semaphores_enabled=yes
14547else
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14551 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014552fi
14553
14554
Mark Dickinsona614f042009-11-28 12:48:43 +000014555fi
14556
Matthias Kloseb9621712010-04-24 17:59:49 +000014557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14558$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014559if test $ac_cv_posix_semaphores_enabled = no
14560then
14561
Matthias Kloseb9621712010-04-24 17:59:49 +000014562$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014563
14564fi
14565
Mark Dickinson10683072009-04-18 21:18:19 +000014566# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14568$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014569if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014573 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014576/* end confdefs.h. */
14577
14578#include <unistd.h>
14579#include <fcntl.h>
14580#include <stdio.h>
14581#include <semaphore.h>
14582#include <sys/stat.h>
14583
14584int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014585 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014586 int count;
14587 int res;
14588 if(a==SEM_FAILED){
14589 perror("sem_open");
14590 return 1;
14591
14592 }
14593 res = sem_getvalue(a, &count);
14594 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014595 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014596 return res==-1 ? 1 : 0;
14597}
14598
Mark Dickinson10683072009-04-18 21:18:19 +000014599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014600if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014601 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014602else
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014607fi
14608
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014609
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014610fi
14611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14613$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014614if test $ac_cv_broken_sem_getvalue = yes
14615then
14616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014618
14619fi
14620
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014621ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14622"
14623if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14624 ac_have_decl=1
14625else
14626 ac_have_decl=0
14627fi
14628
14629cat >>confdefs.h <<_ACEOF
14630#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14631_ACEOF
14632ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14633"
14634if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14635 ac_have_decl=1
14636else
14637 ac_have_decl=0
14638fi
14639
14640cat >>confdefs.h <<_ACEOF
14641#define HAVE_DECL_RTLD_NOW $ac_have_decl
14642_ACEOF
14643ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14644"
14645if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14646 ac_have_decl=1
14647else
14648 ac_have_decl=0
14649fi
14650
14651cat >>confdefs.h <<_ACEOF
14652#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14653_ACEOF
14654ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14655"
14656if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14657 ac_have_decl=1
14658else
14659 ac_have_decl=0
14660fi
14661
14662cat >>confdefs.h <<_ACEOF
14663#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14664_ACEOF
14665ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14666"
14667if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14668 ac_have_decl=1
14669else
14670 ac_have_decl=0
14671fi
14672
14673cat >>confdefs.h <<_ACEOF
14674#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14675_ACEOF
14676ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14677"
14678if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14679 ac_have_decl=1
14680else
14681 ac_have_decl=0
14682fi
14683
14684cat >>confdefs.h <<_ACEOF
14685#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14686_ACEOF
14687ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14688"
14689if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14690 ac_have_decl=1
14691else
14692 ac_have_decl=0
14693fi
14694
14695cat >>confdefs.h <<_ACEOF
14696#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14697_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014698ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14699"
14700if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14701 ac_have_decl=1
14702else
14703 ac_have_decl=0
14704fi
14705
14706cat >>confdefs.h <<_ACEOF
14707#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14708_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014709
14710
Mark Dickinsonbd792642009-03-18 20:06:12 +000014711# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14713$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014714# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014716 enableval=$enable_big_digits; case $enable_big_digits in
14717yes)
14718 enable_big_digits=30 ;;
14719no)
14720 enable_big_digits=15 ;;
1472115|30)
14722 ;;
14723*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014724 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 +000014725esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14727$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014728
14729cat >>confdefs.h <<_ACEOF
14730#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14731_ACEOF
14732
14733
14734else
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14736$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014737fi
14738
14739
Guido van Rossumef2255b2000-03-10 22:30:29 +000014740# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014741ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014742if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
14744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014746
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014747 wchar_h="yes"
14748
Guido van Rossumef2255b2000-03-10 22:30:29 +000014749else
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014751
14752fi
14753
Michael W. Hudson54241132001-12-07 15:38:26 +000014754
Martin v. Löwis11437992002-04-12 09:54:03 +000014755
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014756# determine wchar_t size
14757if test "$wchar_h" = yes
14758then
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14761# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14762# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14764$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014765if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014767else
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14769"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771else
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 if test "$ac_cv_type_wchar_t" = yes; then
14773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014775as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014776See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777 else
14778 ac_cv_sizeof_wchar_t=0
14779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014781
Martin v. Löwis11437992002-04-12 09:54:03 +000014782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14784$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785
14786
14787
Martin v. Löwis11437992002-04-12 09:54:03 +000014788cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014789#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014790_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014791
Michael W. Hudson54241132001-12-07 15:38:26 +000014792
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014793fi
14794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14796$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014797have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014799/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014800
14801#include <tcl.h>
14802#if TCL_UTF_MAX != 6
14803# error "NOT UCS4_TCL"
14804#endif
14805int
14806main ()
14807{
14808
14809 ;
14810 return 0;
14811}
14812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014814
14815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014817
14818 have_ucs4_tcl=yes
14819
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14823$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014824
Skip Montanaro6dead952003-09-25 14:50:04 +000014825# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014826if test "$wchar_h" = yes
14827then
14828 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14830$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014831 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014833else
14834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014836 ac_cv_wchar_t_signed=yes
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014839/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014840
14841 #include <wchar.h>
14842 int main()
14843 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014844 /* Success: exit code 0 */
14845 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014846 }
14847
14848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014849if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014850 ac_cv_wchar_t_signed=yes
14851else
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014856fi
14857
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014858fi
14859
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14861$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862fi
14863
Michael Osipov3738fad2018-08-24 18:17:19 +020014864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14865$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014866# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014867if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014868 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014869then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014870
Matthias Kloseb9621712010-04-24 17:59:49 +000014871$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014872
Michael Osipov3738fad2018-08-24 18:17:19 +020014873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14874$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014875else
Michael Osipov3738fad2018-08-24 18:17:19 +020014876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14877$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014878fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014879
14880# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14882$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014883if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014885else
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 ac_cv_c_bigendian=unknown
14887 # See if we're dealing with a universal compiler.
14888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889/* end confdefs.h. */
14890#ifndef __APPLE_CC__
14891 not a universal capable compiler
14892 #endif
14893 typedef int dummy;
14894
Skip Montanaro6dead952003-09-25 14:50:04 +000014895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014896if ac_fn_c_try_compile "$LINENO"; then :
14897
14898 # Check for potential -arch flags. It is not universal unless
14899 # there are at least two -arch flags with different values.
14900 ac_arch=
14901 ac_prev=
14902 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14903 if test -n "$ac_prev"; then
14904 case $ac_word in
14905 i?86 | x86_64 | ppc | ppc64)
14906 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14907 ac_arch=$ac_word
14908 else
14909 ac_cv_c_bigendian=universal
14910 break
14911 fi
14912 ;;
14913 esac
14914 ac_prev=
14915 elif test "x$ac_word" = "x-arch"; then
14916 ac_prev=arch
14917 fi
14918 done
14919fi
14920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14921 if test $ac_cv_c_bigendian = unknown; then
14922 # See if sys/param.h defines the BYTE_ORDER macro.
14923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014924/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014927
Martin v. Löwis11437992002-04-12 09:54:03 +000014928int
14929main ()
14930{
Matthias Kloseb9621712010-04-24 17:59:49 +000014931#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14932 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14933 && LITTLE_ENDIAN)
14934 bogus endian macros
14935 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014936
14937 ;
14938 return 0;
14939}
14940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014941if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014942 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014944/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014945#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948int
14949main ()
14950{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014951#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 not big endian
14953 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
14955 ;
14956 return 0;
14957}
14958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014960 ac_cv_c_bigendian=yes
14961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014965fi
14966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14967 fi
14968 if test $ac_cv_c_bigendian = unknown; then
14969 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014971/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014972#include <limits.h>
14973
Martin v. Löwis11437992002-04-12 09:54:03 +000014974int
14975main ()
14976{
Matthias Kloseb9621712010-04-24 17:59:49 +000014977#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14978 bogus endian macros
14979 #endif
14980
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 ;
14982 return 0;
14983}
14984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014985if ac_fn_c_try_compile "$LINENO"; then :
14986 # It does; now see whether it defined to _BIG_ENDIAN or not.
14987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14988/* end confdefs.h. */
14989#include <limits.h>
14990
14991int
14992main ()
14993{
14994#ifndef _BIG_ENDIAN
14995 not big endian
14996 #endif
14997
14998 ;
14999 return 0;
15000}
15001_ACEOF
15002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015004else
Matthias Kloseb9621712010-04-24 17:59:49 +000015005 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15008fi
15009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15010 fi
15011 if test $ac_cv_c_bigendian = unknown; then
15012 # Compile a test program.
15013 if test "$cross_compiling" = yes; then :
15014 # Try to guess by grepping values from an object file.
15015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016/* end confdefs.h. */
15017short int ascii_mm[] =
15018 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15019 short int ascii_ii[] =
15020 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15021 int use_ascii (int i) {
15022 return ascii_mm[i] + ascii_ii[i];
15023 }
15024 short int ebcdic_ii[] =
15025 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15026 short int ebcdic_mm[] =
15027 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15028 int use_ebcdic (int i) {
15029 return ebcdic_mm[i] + ebcdic_ii[i];
15030 }
15031 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033int
15034main ()
15035{
15036return use_ascii (foo) == use_ebcdic (foo);
15037 ;
15038 return 0;
15039}
15040_ACEOF
15041if ac_fn_c_try_compile "$LINENO"; then :
15042 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15043 ac_cv_c_bigendian=yes
15044 fi
15045 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15046 if test "$ac_cv_c_bigendian" = unknown; then
15047 ac_cv_c_bigendian=no
15048 else
15049 # finding both strings is unlikely to happen, but who knows?
15050 ac_cv_c_bigendian=unknown
15051 fi
15052 fi
15053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015057/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015059int
15060main ()
15061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 /* Are we little or big endian? From Harbison&Steele. */
15064 union
15065 {
15066 long int l;
15067 char c[sizeof (long int)];
15068 } u;
15069 u.l = 1;
15070 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071
15072 ;
15073 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015074}
Martin v. Löwis11437992002-04-12 09:54:03 +000015075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015076if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015077 ac_cv_c_bigendian=no
15078else
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084
Matthias Kloseb9621712010-04-24 17:59:49 +000015085 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15088$as_echo "$ac_cv_c_bigendian" >&6; }
15089 case $ac_cv_c_bigendian in #(
15090 yes)
15091 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15092;; #(
15093 no)
15094 ;; #(
15095 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015096
Matthias Kloseb9621712010-04-24 17:59:49 +000015097$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015098
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 ;; #(
15100 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015101 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015102 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015104
Michael W. Hudson54241132001-12-07 15:38:26 +000015105
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015106# ABI version string for Python extension modules. This appears between the
15107# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15108# from the following attributes which affect the ABI of this Python build (in
15109# this order):
15110#
15111# * The Python implementation (always 'cpython-' for us)
15112# * The major and minor version numbers
15113# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015114#
15115# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015116# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15117# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015118#
15119# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15120# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015121
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15123$as_echo_n "checking ABIFLAGS... " >&6; }
15124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15125$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15127$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015128SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15130$as_echo "$SOABI" >&6; }
15131
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015132# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15133if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015134 # Similar to SOABI but remove "d" flag from ABIFLAGS
15135
15136 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15137
15138cat >>confdefs.h <<_ACEOF
15139#define ALT_SOABI "${ALT_SOABI}"
15140_ACEOF
15141
15142fi
15143
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015144
15145case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015146 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015147 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15148 *)
15149 EXT_SUFFIX=${SHLIB_SUFFIX};;
15150esac
15151
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15153$as_echo_n "checking LDVERSION... " >&6; }
15154LDVERSION='$(VERSION)$(ABIFLAGS)'
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15156$as_echo "$LDVERSION" >&6; }
15157
xdegaye254b3092019-04-29 09:27:40 +020015158# On Android the shared libraries must be linked with libpython.
15159
15160if test -z "$ANDROID_API_LEVEL"; then
15161 LIBPYTHON=''
15162else
15163 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
15164fi
15165
doko@python.org87421192013-01-26 11:39:31 +010015166
doko@ubuntu.com55532312016-06-14 08:55:19 +020015167if test x$PLATFORM_TRIPLET = x; then
15168 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15169else
15170 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15171fi
doko@python.org87421192013-01-26 11:39:31 +010015172
15173
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015174# Check whether right shifting a negative integer extends the sign bit
15175# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15177$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015180else
Martin v. Löwis11437992002-04-12 09:54:03 +000015181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015183 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015187
15188int main()
15189{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015190 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015191}
15192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015194if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015195 ac_cv_rshift_extends_sign=yes
15196else
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015201fi
15202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203fi
15204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15206$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015207if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015208then
Martin v. Löwis11437992002-04-12 09:54:03 +000015209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015211
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015212fi
15213
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015214# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15216$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015217if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015219else
Martin v. Löwis11437992002-04-12 09:54:03 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015222/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015223#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015224int
15225main ()
15226{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015227
15228 FILE *f = fopen("/dev/null", "r");
15229 flockfile(f);
15230 getc_unlocked(f);
15231 funlockfile(f);
15232
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 ;
15234 return 0;
15235}
15236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015237if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015238 ac_cv_have_getc_unlocked=yes
15239else
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 ac_cv_have_getc_unlocked=no
15241fi
15242rm -f core conftest.err conftest.$ac_objext \
15243 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15247$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015248if test "$ac_cv_have_getc_unlocked" = yes
15249then
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015252
15253fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015254
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015255# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015256# save the value of LIBS so we don't actually link Python with readline
15257LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015258
Gregory P. Smith18820942008-09-07 06:24:49 +000015259# On some systems we need to link readline to a termcap compatible
15260# library. NOTE: Keep the precedence of listed libraries synchronised
15261# with setup.py.
15262py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15264$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015265for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015266 if test -z "$py_libtermcap"; then
15267 READLINE_LIBS="-lreadline"
15268 else
15269 READLINE_LIBS="-lreadline -l$py_libtermcap"
15270 fi
15271 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015273/* end confdefs.h. */
15274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275/* Override any GCC internal prototype to avoid an error.
15276 Use char because int might match the return type of a GCC
15277 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015278#ifdef __cplusplus
15279extern "C"
15280#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015281char readline ();
15282int
15283main ()
15284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015286 ;
15287 return 0;
15288}
15289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015290if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015291 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015293rm -f core conftest.err conftest.$ac_objext \
15294 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015295 if test $py_cv_lib_readline = yes; then
15296 break
15297 fi
15298done
15299# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15300#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015301if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15303$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015304else
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15306$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015309
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015310fi
15311
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015312# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015314/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015315#include <readline/readline.h>
15316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015317if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015318 have_readline=yes
15319else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015320 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015321
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015322fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015323rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015324if test $have_readline = yes
15325then
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015328#include <readline/readline.h>
15329
15330_ACEOF
15331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015333
Matthias Kloseb9621712010-04-24 17:59:49 +000015334$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015335
15336fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015337rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015340/* end confdefs.h. */
15341#include <readline/readline.h>
15342
15343_ACEOF
15344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015348
15349fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015350rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015351
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015352fi
15353
Martin v. Löwis0daad592001-09-30 21:09:59 +000015354# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15356$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015357if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015358 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015359else
Martin v. Löwis11437992002-04-12 09:54:03 +000015360 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015361LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365/* Override any GCC internal prototype to avoid an error.
15366 Use char because int might match the return type of a GCC
15367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015368#ifdef __cplusplus
15369extern "C"
15370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015371char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015372int
15373main ()
15374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ;
15377 return 0;
15378}
15379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015382else
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015385rm -f core conftest.err conftest.$ac_objext \
15386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015387LIBS=$ac_check_lib_save_LIBS
15388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15390$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015391if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015392
Matthias Kloseb9621712010-04-24 17:59:49 +000015393$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015394
Martin v. Löwis0daad592001-09-30 21:09:59 +000015395fi
15396
Michael W. Hudson54241132001-12-07 15:38:26 +000015397
Thomas Wouters89d996e2007-09-08 17:39:28 +000015398# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15400$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015401if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015403else
15404 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015405LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015407/* end confdefs.h. */
15408
15409/* Override any GCC internal prototype to avoid an error.
15410 Use char because int might match the return type of a GCC
15411 builtin and then its argument prototype would still apply. */
15412#ifdef __cplusplus
15413extern "C"
15414#endif
15415char rl_completion_display_matches_hook ();
15416int
15417main ()
15418{
15419return rl_completion_display_matches_hook ();
15420 ;
15421 return 0;
15422}
15423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015424if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015425 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15426else
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015429rm -f core conftest.err conftest.$ac_objext \
15430 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015431LIBS=$ac_check_lib_save_LIBS
15432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15434$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015435if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015438
15439fi
15440
15441
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015442# also in 4.0, but not in editline
15443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15444$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15445if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15446 $as_echo_n "(cached) " >&6
15447else
15448 ac_check_lib_save_LIBS=$LIBS
15449LIBS="-lreadline $READLINE_LIBS $LIBS"
15450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15451/* end confdefs.h. */
15452
15453/* Override any GCC internal prototype to avoid an error.
15454 Use char because int might match the return type of a GCC
15455 builtin and then its argument prototype would still apply. */
15456#ifdef __cplusplus
15457extern "C"
15458#endif
15459char rl_resize_terminal ();
15460int
15461main ()
15462{
15463return rl_resize_terminal ();
15464 ;
15465 return 0;
15466}
15467_ACEOF
15468if ac_fn_c_try_link "$LINENO"; then :
15469 ac_cv_lib_readline_rl_resize_terminal=yes
15470else
15471 ac_cv_lib_readline_rl_resize_terminal=no
15472fi
15473rm -f core conftest.err conftest.$ac_objext \
15474 conftest$ac_exeext conftest.$ac_ext
15475LIBS=$ac_check_lib_save_LIBS
15476fi
15477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15478$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15479if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15480
15481$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15482
15483fi
15484
15485
Martin v. Löwis0daad592001-09-30 21:09:59 +000015486# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15488$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015489if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015493LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497/* Override any GCC internal prototype to avoid an error.
15498 Use char because int might match the return type of a GCC
15499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015500#ifdef __cplusplus
15501extern "C"
15502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015503char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015504int
15505main ()
15506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015507return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 ;
15509 return 0;
15510}
15511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015512if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015514else
Matthias Kloseb9621712010-04-24 17:59:49 +000015515 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015517rm -f core conftest.err conftest.$ac_objext \
15518 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015519LIBS=$ac_check_lib_save_LIBS
15520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15522$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015523if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015526
Guido van Rossum353ae582001-07-10 16:45:32 +000015527fi
15528
Jack Jansendd19cf82001-12-06 22:36:17 +000015529
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015530# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015532/* end confdefs.h. */
15533#include <readline/readline.h>
15534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015535if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015536 have_readline=yes
15537else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015538 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015539
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015540fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015541rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015542if test $have_readline = yes
15543then
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015545/* end confdefs.h. */
15546#include <readline/readline.h>
15547
15548_ACEOF
15549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015551
Matthias Kloseb9621712010-04-24 17:59:49 +000015552$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015553
15554fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015555rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015556
15557fi
15558
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15560$as_echo_n "checking for append_history in -lreadline... " >&6; }
15561if ${ac_cv_lib_readline_append_history+:} false; then :
15562 $as_echo_n "(cached) " >&6
15563else
15564 ac_check_lib_save_LIBS=$LIBS
15565LIBS="-lreadline $READLINE_LIBS $LIBS"
15566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15567/* end confdefs.h. */
15568
15569/* Override any GCC internal prototype to avoid an error.
15570 Use char because int might match the return type of a GCC
15571 builtin and then its argument prototype would still apply. */
15572#ifdef __cplusplus
15573extern "C"
15574#endif
15575char append_history ();
15576int
15577main ()
15578{
15579return append_history ();
15580 ;
15581 return 0;
15582}
15583_ACEOF
15584if ac_fn_c_try_link "$LINENO"; then :
15585 ac_cv_lib_readline_append_history=yes
15586else
15587 ac_cv_lib_readline_append_history=no
15588fi
15589rm -f core conftest.err conftest.$ac_objext \
15590 conftest$ac_exeext conftest.$ac_ext
15591LIBS=$ac_check_lib_save_LIBS
15592fi
15593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15594$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15595if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15596
15597$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15598
15599fi
15600
15601
Martin v. Löwis82bca632006-02-10 20:49:30 +000015602# End of readline checks: restore LIBS
15603LIBS=$LIBS_no_readline
15604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15606$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015607if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015609else
Martin v. Löwis11437992002-04-12 09:54:03 +000015610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015612 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015616
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015617#include <stdlib.h>
15618#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015619int main()
15620{
15621 int val1 = nice(1);
15622 if (val1 != -1 && val1 == nice(2))
15623 exit(0);
15624 exit(1);
15625}
15626
Martin v. Löwis11437992002-04-12 09:54:03 +000015627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015628if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015629 ac_cv_broken_nice=yes
15630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015635fi
15636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637fi
15638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15640$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015641if test "$ac_cv_broken_nice" = yes
15642then
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Matthias Kloseb9621712010-04-24 17:59:49 +000015644$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015645
15646fi
15647
Matthias Kloseb9621712010-04-24 17:59:49 +000015648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15649$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015650if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015652else
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015654 ac_cv_broken_poll=no
15655else
Matthias Kloseb9621712010-04-24 17:59:49 +000015656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015657/* end confdefs.h. */
15658
15659#include <poll.h>
15660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015661int main()
15662{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015663 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015664 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015665
15666 close (42);
15667
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015669 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015670 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015671 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015672 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015673 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015674 return 1;
15675}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015676
15677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015678if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015679 ac_cv_broken_poll=yes
15680else
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15684 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015686
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015687fi
15688
Matthias Kloseb9621712010-04-24 17:59:49 +000015689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15690$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015691if test "$ac_cv_broken_poll" = yes
15692then
15693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015695
15696fi
15697
Martin v. Löwis1d459062005-03-14 21:23:33 +000015698# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15700$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015701if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015703else
15704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015706 ac_cv_working_tzset=no
15707else
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015709/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015710
15711#include <stdlib.h>
15712#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015713#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015714
15715#if HAVE_TZNAME
15716extern char *tzname[];
15717#endif
15718
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719int main()
15720{
Brett Cannon18367812003-09-19 00:59:16 +000015721 /* Note that we need to ensure that not only does tzset(3)
15722 do 'something' with localtime, but it works as documented
15723 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015724 This includes making sure that tzname is set properly if
15725 tm->tm_zone does not exist since it is the alternative way
15726 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015727
15728 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015729 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015730 */
15731
Martin v. Löwis1d459062005-03-14 21:23:33 +000015732 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015733 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15734
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015735 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015736 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015737 if (localtime(&groundhogday)->tm_hour != 0)
15738 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015739#if HAVE_TZNAME
15740 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15741 if (strcmp(tzname[0], "UTC") ||
15742 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15743 exit(1);
15744#endif
Brett Cannon18367812003-09-19 00:59:16 +000015745
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015746 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015747 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015748 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015749 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015750#if HAVE_TZNAME
15751 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15752 exit(1);
15753#endif
Brett Cannon18367812003-09-19 00:59:16 +000015754
15755 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15756 tzset();
15757 if (localtime(&groundhogday)->tm_hour != 11)
15758 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015759#if HAVE_TZNAME
15760 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15761 exit(1);
15762#endif
15763
15764#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015765 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15766 exit(1);
15767 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15768 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015769#endif
Brett Cannon18367812003-09-19 00:59:16 +000015770
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015771 exit(0);
15772}
15773
15774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015775if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015776 ac_cv_working_tzset=yes
15777else
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015782fi
15783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784fi
15785
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15787$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015788if test "$ac_cv_working_tzset" = yes
15789then
15790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015792
15793fi
15794
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015795# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15797$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015798if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015800else
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015802/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015803#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015804int
15805main ()
15806{
15807
15808struct stat st;
15809st.st_mtim.tv_nsec = 1;
15810
15811 ;
15812 return 0;
15813}
15814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015816 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015817else
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15821fi
15822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15824$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015825if test "$ac_cv_stat_tv_nsec" = yes
15826then
15827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015829
15830fi
15831
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015832# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15834$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015835if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015837else
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015839/* end confdefs.h. */
15840#include <sys/stat.h>
15841int
15842main ()
15843{
15844
15845struct stat st;
15846st.st_mtimespec.tv_nsec = 1;
15847
15848 ;
15849 return 0;
15850}
15851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015852if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015853 ac_cv_stat_tv_nsec2=yes
15854else
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15858fi
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15861$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015862if test "$ac_cv_stat_tv_nsec2" = yes
15863then
15864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015866
15867fi
15868
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015869# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015870ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015871if test "$cross_compiling" = no; then
15872 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15873fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015874
15875for ac_header in curses.h ncurses.h
15876do :
15877 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15878ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15879if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15880 cat >>confdefs.h <<_ACEOF
15881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15882_ACEOF
15883
15884fi
15885
15886done
15887
15888
15889# On Solaris, term.h requires curses.h
15890for ac_header in term.h
15891do :
15892 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15893#ifdef HAVE_CURSES_H
15894#include <curses.h>
15895#endif
15896
15897"
15898if test "x$ac_cv_header_term_h" = xyes; then :
15899 cat >>confdefs.h <<_ACEOF
15900#define HAVE_TERM_H 1
15901_ACEOF
15902
15903fi
15904
15905done
15906
15907
Jack Jansen666b1e72001-10-31 12:11:48 +000015908# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15910$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015911if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015913else
Matthias Kloseb9621712010-04-24 17:59:49 +000015914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015915/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015916#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015917int
15918main ()
15919{
Jack Jansen666b1e72001-10-31 12:11:48 +000015920
15921 int rtn;
15922 rtn = mvwdelch(0,0,0);
15923
Martin v. Löwis11437992002-04-12 09:54:03 +000015924 ;
15925 return 0;
15926}
15927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015928if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015929 ac_cv_mvwdelch_is_expression=yes
15930else
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15934fi
15935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15937$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015938
15939if test "$ac_cv_mvwdelch_is_expression" = yes
15940then
Martin v. Löwis11437992002-04-12 09:54:03 +000015941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015943
15944fi
15945
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015946# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15947# structs since version 5.7. If the macro is defined as zero before including
15948# [n]curses.h, ncurses will expose fields of the structs regardless of the
15949# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15951$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015952if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015953 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015954else
Matthias Kloseb9621712010-04-24 17:59:49 +000015955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015956/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015957
15958 #define NCURSES_OPAQUE 0
15959 #include <curses.h>
15960
Martin v. Löwis11437992002-04-12 09:54:03 +000015961int
15962main ()
15963{
Jack Jansen666b1e72001-10-31 12:11:48 +000015964
15965 WINDOW *w;
15966 w->_flags = 0;
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 ;
15969 return 0;
15970}
15971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015972if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015973 ac_cv_window_has_flags=yes
15974else
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15978fi
15979
Matthias Kloseb9621712010-04-24 17:59:49 +000015980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15981$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015982
Jack Jansen666b1e72001-10-31 12:11:48 +000015983
15984if test "$ac_cv_window_has_flags" = yes
15985then
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015988
15989fi
15990
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15992$as_echo_n "checking for is_pad... " >&6; }
15993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15994/* end confdefs.h. */
15995#include <curses.h>
15996int
15997main ()
15998{
15999
16000#ifndef is_pad
16001void *x=is_pad
16002#endif
16003
16004 ;
16005 return 0;
16006}
16007_ACEOF
16008if ac_fn_c_try_compile "$LINENO"; then :
16009
16010$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16011
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16013$as_echo "yes" >&6; }
16014else
16015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16016$as_echo "no" >&6; }
16017
16018fi
16019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16020
Matthias Kloseb9621712010-04-24 17:59:49 +000016021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16022$as_echo_n "checking for is_term_resized... " >&6; }
16023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016024/* end confdefs.h. */
16025#include <curses.h>
16026int
16027main ()
16028{
16029void *x=is_term_resized
16030 ;
16031 return 0;
16032}
16033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016037
Matthias Kloseb159a552010-04-25 21:00:44 +000016038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016039$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016040else
Matthias Kloseb9621712010-04-24 17:59:49 +000016041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16042$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016043
16044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16046
Matthias Kloseb9621712010-04-24 17:59:49 +000016047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16048$as_echo_n "checking for resize_term... " >&6; }
16049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016050/* end confdefs.h. */
16051#include <curses.h>
16052int
16053main ()
16054{
16055void *x=resize_term
16056 ;
16057 return 0;
16058}
16059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016060if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016061
Matthias Kloseb9621712010-04-24 17:59:49 +000016062$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016063
Matthias Kloseb159a552010-04-25 21:00:44 +000016064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016066else
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16068$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016069
16070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16074$as_echo_n "checking for resizeterm... " >&6; }
16075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016076/* end confdefs.h. */
16077#include <curses.h>
16078int
16079main ()
16080{
16081void *x=resizeterm
16082 ;
16083 return 0;
16084}
16085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016086if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016089
Matthias Kloseb159a552010-04-25 21:00:44 +000016090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016091$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016092else
Matthias Kloseb9621712010-04-24 17:59:49 +000016093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16094$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016095
16096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016098
16099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16100$as_echo_n "checking for immedok... " >&6; }
16101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102/* end confdefs.h. */
16103#include <curses.h>
16104int
16105main ()
16106{
16107
16108#ifndef immedok
16109void *x=immedok
16110#endif
16111
16112 ;
16113 return 0;
16114}
16115_ACEOF
16116if ac_fn_c_try_compile "$LINENO"; then :
16117
16118$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16119
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16121$as_echo "yes" >&6; }
16122else
16123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16124$as_echo "no" >&6; }
16125
16126fi
16127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16128
16129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16130$as_echo_n "checking for syncok... " >&6; }
16131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16132/* end confdefs.h. */
16133#include <curses.h>
16134int
16135main ()
16136{
16137
16138#ifndef syncok
16139void *x=syncok
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_SYNCOK 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
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16160$as_echo_n "checking for wchgat... " >&6; }
16161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162/* end confdefs.h. */
16163#include <curses.h>
16164int
16165main ()
16166{
16167
16168#ifndef wchgat
16169void *x=wchgat
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_WCHGAT 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 Storchakabaac01e2017-10-31 13:56:44 +020016189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16190$as_echo_n "checking for filter... " >&6; }
16191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192/* end confdefs.h. */
16193#include <curses.h>
16194int
16195main ()
16196{
16197
16198#ifndef filter
16199void *x=filter
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_FILTER 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
16219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16220$as_echo_n "checking for has_key... " >&6; }
16221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16222/* end confdefs.h. */
16223#include <curses.h>
16224int
16225main ()
16226{
16227
16228#ifndef has_key
16229void *x=has_key
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_HAS_KEY 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 typeahead" >&5
16250$as_echo_n "checking for typeahead... " >&6; }
16251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16252/* end confdefs.h. */
16253#include <curses.h>
16254int
16255main ()
16256{
16257
16258#ifndef typeahead
16259void *x=typeahead
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_TYPEAHEAD 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 use_env" >&5
16280$as_echo_n "checking for use_env... " >&6; }
16281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16282/* end confdefs.h. */
16283#include <curses.h>
16284int
16285main ()
16286{
16287
16288#ifndef use_env
16289void *x=use_env
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_USE_ENV 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
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016308# last curses configure check
16309CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16312$as_echo "$as_me: checking for device files" >&6;}
16313
16314if test "x$cross_compiling" = xyes; then
16315 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16317$as_echo_n "checking for /dev/ptmx... " >&6; }
16318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16319$as_echo "not set" >&6; }
16320 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16321 fi
16322 if test "${ac_cv_file__dev_ptc+set}" != set; then
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16324$as_echo_n "checking for /dev/ptc... " >&6; }
16325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16326$as_echo "not set" >&6; }
16327 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16328 fi
16329fi
16330
Matthias Kloseb9621712010-04-24 17:59:49 +000016331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16332$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016333if ${ac_cv_file__dev_ptmx+:} false; then :
16334 $as_echo_n "(cached) " >&6
16335else
16336 test "$cross_compiling" = yes &&
16337 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16338if test -r "/dev/ptmx"; then
16339 ac_cv_file__dev_ptmx=yes
16340else
16341 ac_cv_file__dev_ptmx=no
16342fi
16343fi
16344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16345$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16346if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016347
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016348fi
16349
16350if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016351
Matthias Kloseb9621712010-04-24 17:59:49 +000016352$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016353
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16356$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016357if ${ac_cv_file__dev_ptc+:} false; then :
16358 $as_echo_n "(cached) " >&6
16359else
16360 test "$cross_compiling" = yes &&
16361 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16362if test -r "/dev/ptc"; then
16363 ac_cv_file__dev_ptc=yes
16364else
16365 ac_cv_file__dev_ptc=no
16366fi
16367fi
16368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16369$as_echo "$ac_cv_file__dev_ptc" >&6; }
16370if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016371
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016372fi
16373
16374if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016375
Matthias Kloseb9621712010-04-24 17:59:49 +000016376$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016377
Neal Norwitz865400f2003-03-21 01:42:58 +000016378fi
16379
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016380if test $ac_sys_system = Darwin
16381then
16382 LIBS="$LIBS -framework CoreFoundation"
16383fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016384
Matthias Kloseb9621712010-04-24 17:59:49 +000016385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16386$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016387if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016389else
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016391 ac_cv_have_size_t_format="cross -- assuming yes"
16392
Thomas Wouters477c8d52006-05-27 19:21:47 +000016393else
Matthias Kloseb9621712010-04-24 17:59:49 +000016394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016395/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016396
Thomas Wouters477c8d52006-05-27 19:21:47 +000016397#include <stdio.h>
16398#include <stddef.h>
16399#include <string.h>
16400
Christian Heimes2c181612007-12-17 20:04:13 +000016401#ifdef HAVE_SYS_TYPES_H
16402#include <sys/types.h>
16403#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016404
16405#ifdef HAVE_SSIZE_T
16406typedef ssize_t Py_ssize_t;
16407#elif SIZEOF_VOID_P == SIZEOF_LONG
16408typedef long Py_ssize_t;
16409#else
16410typedef int Py_ssize_t;
16411#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016412
Christian Heimes2c181612007-12-17 20:04:13 +000016413int main()
16414{
16415 char buffer[256];
16416
Thomas Wouters477c8d52006-05-27 19:21:47 +000016417 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16418 return 1;
16419
Thomas Wouters89f507f2006-12-13 04:49:30 +000016420 if (strcmp(buffer, "123"))
16421 return 1;
16422
16423 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16424 return 1;
16425
16426 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016427 return 1;
16428
16429 return 0;
16430}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016431
Thomas Wouters477c8d52006-05-27 19:21:47 +000016432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016433if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016434 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016435else
Matthias Kloseb9621712010-04-24 17:59:49 +000016436 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16439 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016440fi
16441
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16444$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016445if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016446
Matthias Kloseb9621712010-04-24 17:59:49 +000016447$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016448
16449fi
16450
Matthias Kloseb9621712010-04-24 17:59:49 +000016451ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016452#ifdef HAVE_SYS_TYPES_H
16453#include <sys/types.h>
16454#endif
16455#ifdef HAVE_SYS_SOCKET_H
16456#include <sys/socket.h>
16457#endif
16458
Matthias Kloseb9621712010-04-24 17:59:49 +000016459"
Victor Stinnere0be4232011-10-25 13:06:09 +020016460if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016461
Martin v. Löwis11437992002-04-12 09:54:03 +000016462else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016463
Matthias Kloseb9621712010-04-24 17:59:49 +000016464$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016465
16466fi
16467
Michael W. Hudson54241132001-12-07 15:38:26 +000016468
Matthias Kloseb9621712010-04-24 17:59:49 +000016469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16470$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016471if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016472 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016473else
Matthias Kloseb9621712010-04-24 17:59:49 +000016474 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016475 ac_cv_broken_mbstowcs=no
16476else
Matthias Kloseb9621712010-04-24 17:59:49 +000016477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016478/* end confdefs.h. */
16479
Stefan Krah19c21392012-11-22 23:47:32 +010016480#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016481#include<stdlib.h>
16482int main() {
16483 size_t len = -1;
16484 const char *str = "text";
16485 len = mbstowcs(NULL, str, 0);
16486 return (len != 4);
16487}
16488
16489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016490if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016491 ac_cv_broken_mbstowcs=no
16492else
Matthias Kloseb9621712010-04-24 17:59:49 +000016493 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016497fi
16498
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016499fi
16500
Matthias Kloseb9621712010-04-24 17:59:49 +000016501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16502$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016503if test "$ac_cv_broken_mbstowcs" = yes
16504then
16505
Matthias Kloseb9621712010-04-24 17:59:49 +000016506$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016507
16508fi
16509
Antoine Pitroub52ec782009-01-25 16:34:23 +000016510# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16512$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016513
16514# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016515if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016516 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016517if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016518then
16519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016521
Matthias Kloseb9621712010-04-24 17:59:49 +000016522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16523$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016524fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016525if test "$withval" = no
16526then
16527
16528$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16529
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16531$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016532fi
16533
Antoine Pitrou042b1282010-08-13 21:15:58 +000016534else
16535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16536$as_echo "no value specified" >&6; }
16537fi
16538
Antoine Pitroub52ec782009-01-25 16:34:23 +000016539
Matthias Kloseb17289e2012-03-15 19:51:34 +010016540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16541$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16542if ${ac_cv_computed_gotos+:} false; then :
16543 $as_echo_n "(cached) " >&6
16544else
16545 if test "$cross_compiling" = yes; then :
16546 if test "${with_computed_gotos+set}" = set; then
16547 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16548 else
16549 ac_cv_computed_gotos=no
16550 fi
16551else
16552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16553/* end confdefs.h. */
16554
16555int main(int argc, char **argv)
16556{
16557 static void *targets[1] = { &&LABEL1 };
16558 goto LABEL2;
16559LABEL1:
16560 return 0;
16561LABEL2:
16562 goto *targets[0];
16563 return 1;
16564}
16565
16566_ACEOF
16567if ac_fn_c_try_run "$LINENO"; then :
16568 ac_cv_computed_gotos=yes
16569else
16570 ac_cv_computed_gotos=no
16571fi
16572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16573 conftest.$ac_objext conftest.beam conftest.$ac_ext
16574fi
16575
16576fi
16577
16578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16579$as_echo "$ac_cv_computed_gotos" >&6; }
16580case "$ac_cv_computed_gotos" in yes*)
16581
16582$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16583
16584esac
16585
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016586case $ac_sys_system in
16587AIX*)
16588
16589$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16590 ;;
16591esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016592
Michael W. Hudson54241132001-12-07 15:38:26 +000016593
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016594
16595
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016596for h in `(cd $srcdir;echo Python/thread_*.h)`
16597do
16598 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16599done
16600
Michael W. Hudson54241132001-12-07 15:38:26 +000016601
Victor Stinner21a74a92019-04-11 22:28:12 +020016602SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16604$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016605for dir in $SRCDIRS; do
16606 if test ! -d $dir; then
16607 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016608 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016609done
Matthias Kloseb9621712010-04-24 17:59:49 +000016610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16611$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016612
Stefan Krah1919b7e2012-03-21 18:25:23 +010016613# Availability of -O2:
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16615$as_echo_n "checking for -O2... " >&6; }
16616saved_cflags="$CFLAGS"
16617CFLAGS="-O2"
16618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16619/* end confdefs.h. */
16620
16621int
16622main ()
16623{
16624
16625
16626 ;
16627 return 0;
16628}
16629_ACEOF
16630if ac_fn_c_try_compile "$LINENO"; then :
16631 have_O2=yes
16632else
16633 have_O2=no
16634fi
16635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16637$as_echo "$have_O2" >&6; }
16638CFLAGS="$saved_cflags"
16639
16640# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16641# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16643$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16644saved_cflags="$CFLAGS"
16645CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16646if test "$have_O2" = no; then
16647 CFLAGS=""
16648fi
16649if test "$cross_compiling" = yes; then :
16650 have_glibc_memmove_bug=undefined
16651else
16652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16653/* end confdefs.h. */
16654
16655#include <stdio.h>
16656#include <stdlib.h>
16657#include <string.h>
16658void foo(void *p, void *q) { memmove(p, q, 19); }
16659int main() {
16660 char a[32] = "123456789000000000";
16661 foo(&a[9], a);
16662 if (strcmp(a, "123456789123456789000000000") != 0)
16663 return 1;
16664 foo(a, &a[9]);
16665 if (strcmp(a, "123456789000000000") != 0)
16666 return 1;
16667 return 0;
16668}
16669
16670_ACEOF
16671if ac_fn_c_try_run "$LINENO"; then :
16672 have_glibc_memmove_bug=no
16673else
16674 have_glibc_memmove_bug=yes
16675fi
16676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16677 conftest.$ac_objext conftest.beam conftest.$ac_ext
16678fi
16679
16680CFLAGS="$saved_cflags"
16681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16682$as_echo "$have_glibc_memmove_bug" >&6; }
16683if test "$have_glibc_memmove_bug" = yes; then
16684
16685$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16686
16687fi
16688
16689if test "$have_gcc_asm_for_x87" = yes; then
16690 # Some versions of gcc miscompile inline asm:
16691 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16692 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16693 case $CC in
16694 *gcc*)
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16696$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16697 saved_cflags="$CFLAGS"
16698 CFLAGS="-O2"
16699 if test "$cross_compiling" = yes; then :
16700 have_ipa_pure_const_bug=undefined
16701else
16702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16703/* end confdefs.h. */
16704
16705 __attribute__((noinline)) int
16706 foo(int *p) {
16707 int r;
16708 asm ( "movl \$6, (%1)\n\t"
16709 "xorl %0, %0\n\t"
16710 : "=r" (r) : "r" (p) : "memory"
16711 );
16712 return r;
16713 }
16714 int main() {
16715 int p = 8;
16716 if ((foo(&p) ? : p) != 6)
16717 return 1;
16718 return 0;
16719 }
16720
16721_ACEOF
16722if ac_fn_c_try_run "$LINENO"; then :
16723 have_ipa_pure_const_bug=no
16724else
16725 have_ipa_pure_const_bug=yes
16726fi
16727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16728 conftest.$ac_objext conftest.beam conftest.$ac_ext
16729fi
16730
16731 CFLAGS="$saved_cflags"
16732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16733$as_echo "$have_ipa_pure_const_bug" >&6; }
16734 if test "$have_ipa_pure_const_bug" = yes; then
16735
16736$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16737
16738 fi
16739 ;;
16740 esac
16741fi
16742
Victor Stinner4f5366e2015-01-09 02:13:19 +010016743# Check for stdatomic.h
16744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16745$as_echo_n "checking for stdatomic.h... " >&6; }
16746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16747/* end confdefs.h. */
16748
16749
16750 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016751 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016752 int main() {
16753 int loaded_value = atomic_load(&value);
16754 return 0;
16755 }
16756
16757
16758_ACEOF
16759if ac_fn_c_try_link "$LINENO"; then :
16760 have_stdatomic_h=yes
16761else
16762 have_stdatomic_h=no
16763fi
16764rm -f core conftest.err conftest.$ac_objext \
16765 conftest$ac_exeext conftest.$ac_ext
16766
16767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16768$as_echo "$have_stdatomic_h" >&6; }
16769
16770if test "$have_stdatomic_h" = yes; then
16771
16772$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16773
16774fi
16775
16776# Check for GCC >= 4.7 __atomic builtins
16777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16778$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16780/* end confdefs.h. */
16781
16782
16783 volatile int val = 1;
16784 int main() {
16785 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16786 return 0;
16787 }
16788
16789
16790_ACEOF
16791if ac_fn_c_try_link "$LINENO"; then :
16792 have_builtin_atomic=yes
16793else
16794 have_builtin_atomic=no
16795fi
16796rm -f core conftest.err conftest.$ac_objext \
16797 conftest$ac_exeext conftest.$ac_ext
16798
16799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16800$as_echo "$have_builtin_atomic" >&6; }
16801
16802if test "$have_builtin_atomic" = yes; then
16803
16804$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16805
16806fi
16807
Ned Deily322f5ba2013-11-21 23:01:59 -080016808# ensurepip option
16809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16810$as_echo_n "checking for ensurepip... " >&6; }
16811
16812# Check whether --with-ensurepip was given.
16813if test "${with_ensurepip+set}" = set; then :
16814 withval=$with_ensurepip;
16815else
16816 with_ensurepip=upgrade
16817fi
16818
16819case $with_ensurepip in #(
16820 yes|upgrade) :
16821 ENSUREPIP=upgrade ;; #(
16822 install) :
16823 ENSUREPIP=install ;; #(
16824 no) :
16825 ENSUREPIP=no ;; #(
16826 *) :
16827 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16828esac
16829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16830$as_echo "$ENSUREPIP" >&6; }
16831
16832
Victor Stinner35a97c02015-03-08 02:59:09 +010016833# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16835$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16837/* end confdefs.h. */
16838
16839
16840 #include <dirent.h>
16841
16842 int main() {
16843 struct dirent entry;
16844 return entry.d_type == DT_UNKNOWN;
16845 }
16846
16847
16848_ACEOF
16849if ac_fn_c_try_link "$LINENO"; then :
16850 have_dirent_d_type=yes
16851else
16852 have_dirent_d_type=no
16853fi
16854rm -f core conftest.err conftest.$ac_objext \
16855 conftest$ac_exeext conftest.$ac_ext
16856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16857$as_echo "$have_dirent_d_type" >&6; }
16858
16859if test "$have_dirent_d_type" = yes; then
16860
16861$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16862
16863fi
16864
Victor Stinner9eb57c52015-03-19 22:21:49 +010016865# check if the Linux getrandom() syscall is available
16866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16867$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16869/* end confdefs.h. */
16870
16871
Victor Stinner1b80b242016-04-12 22:34:58 +020016872 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016873 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016874 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016875
16876 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016877 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016878 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016879 const int flags = GRND_NONBLOCK;
16880 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016881 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016882 return 0;
16883 }
16884
16885
16886_ACEOF
16887if ac_fn_c_try_link "$LINENO"; then :
16888 have_getrandom_syscall=yes
16889else
16890 have_getrandom_syscall=no
16891fi
16892rm -f core conftest.err conftest.$ac_objext \
16893 conftest$ac_exeext conftest.$ac_ext
16894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16895$as_echo "$have_getrandom_syscall" >&6; }
16896
16897if test "$have_getrandom_syscall" = yes; then
16898
16899$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16900
16901fi
16902
Victor Stinner3abf44e2015-09-18 15:38:37 +020016903# check if the getrandom() function is available
16904# the test was written for the Solaris function of <sys/random.h>
16905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16906$as_echo_n "checking for the getrandom() function... " >&6; }
16907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908/* end confdefs.h. */
16909
16910
16911 #include <sys/random.h>
16912
16913 int main() {
16914 char buffer[1];
16915 const size_t buflen = sizeof(buffer);
16916 const int flags = 0;
16917 /* ignore the result, Python checks for ENOSYS at runtime */
16918 (void)getrandom(buffer, buflen, flags);
16919 return 0;
16920 }
16921
16922
16923_ACEOF
16924if ac_fn_c_try_link "$LINENO"; then :
16925 have_getrandom=yes
16926else
16927 have_getrandom=no
16928fi
16929rm -f core conftest.err conftest.$ac_objext \
16930 conftest$ac_exeext conftest.$ac_ext
16931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16932$as_echo "$have_getrandom" >&6; }
16933
16934if test "$have_getrandom" = yes; then
16935
16936$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16937
16938fi
16939
Neil Schemenauer5741c452019-02-08 10:48:46 -080016940# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16941# shm_* may only be available if linking against librt
16942save_LIBS="$LIBS"
16943save_includes_default="$ac_includes_default"
16944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16945$as_echo_n "checking for library containing shm_open... " >&6; }
16946if ${ac_cv_search_shm_open+:} false; then :
16947 $as_echo_n "(cached) " >&6
16948else
16949 ac_func_search_save_LIBS=$LIBS
16950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16951/* end confdefs.h. */
16952
16953/* Override any GCC internal prototype to avoid an error.
16954 Use char because int might match the return type of a GCC
16955 builtin and then its argument prototype would still apply. */
16956#ifdef __cplusplus
16957extern "C"
16958#endif
16959char shm_open ();
16960int
16961main ()
16962{
16963return shm_open ();
16964 ;
16965 return 0;
16966}
16967_ACEOF
16968for ac_lib in '' rt; do
16969 if test -z "$ac_lib"; then
16970 ac_res="none required"
16971 else
16972 ac_res=-l$ac_lib
16973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16974 fi
16975 if ac_fn_c_try_link "$LINENO"; then :
16976 ac_cv_search_shm_open=$ac_res
16977fi
16978rm -f core conftest.err conftest.$ac_objext \
16979 conftest$ac_exeext
16980 if ${ac_cv_search_shm_open+:} false; then :
16981 break
16982fi
16983done
16984if ${ac_cv_search_shm_open+:} false; then :
16985
16986else
16987 ac_cv_search_shm_open=no
16988fi
16989rm conftest.$ac_ext
16990LIBS=$ac_func_search_save_LIBS
16991fi
16992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16993$as_echo "$ac_cv_search_shm_open" >&6; }
16994ac_res=$ac_cv_search_shm_open
16995if test "$ac_res" != no; then :
16996 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16997
16998fi
16999
17000if test "$ac_cv_search_shm_open" = "-lrt"; then
17001
17002$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
17003
17004fi
17005for ac_header in sys/mman.h
17006do :
17007 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17008if test "x$ac_cv_header_sys_mman_h" = xyes; then :
17009 cat >>confdefs.h <<_ACEOF
17010#define HAVE_SYS_MMAN_H 1
17011_ACEOF
17012
17013fi
17014
17015done
17016
17017# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17018ac_includes_default="\
17019${ac_includes_default}
17020#ifndef __cplusplus
17021# ifdef HAVE_SYS_MMAN_H
17022# include <sys/mman.h>
17023# endif
17024#endif
17025"
17026for ac_func in shm_open shm_unlink
17027do :
17028 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17029ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17030if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17031 cat >>confdefs.h <<_ACEOF
17032#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17033_ACEOF
17034
17035fi
17036done
17037
17038# we don't want to link with librt always, restore LIBS
17039LIBS="$save_LIBS"
17040ac_includes_default="$save_includes_default"
17041
Christian Heimesff5be6e2018-01-20 13:19:21 +010017042# Check for usable OpenSSL
17043
17044 found=false
17045
17046# Check whether --with-openssl was given.
17047if test "${with_openssl+set}" = set; then :
17048 withval=$with_openssl;
17049 case "$withval" in
17050 "" | y | ye | yes | n | no)
17051 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17052 ;;
17053 *) ssldirs="$withval"
17054 ;;
17055 esac
17056
17057else
17058
17059 # if pkg-config is installed and openssl has installed a .pc file,
17060 # then use that information and don't search ssldirs
17061 if test -n "$ac_tool_prefix"; then
17062 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17063set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17065$as_echo_n "checking for $ac_word... " >&6; }
17066if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17067 $as_echo_n "(cached) " >&6
17068else
17069 if test -n "$PKG_CONFIG"; then
17070 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17071else
17072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17073for as_dir in $PATH
17074do
17075 IFS=$as_save_IFS
17076 test -z "$as_dir" && as_dir=.
17077 for ac_exec_ext in '' $ac_executable_extensions; do
17078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17079 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17081 break 2
17082 fi
17083done
17084 done
17085IFS=$as_save_IFS
17086
17087fi
17088fi
17089PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17090if test -n "$PKG_CONFIG"; then
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17092$as_echo "$PKG_CONFIG" >&6; }
17093else
17094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17095$as_echo "no" >&6; }
17096fi
17097
17098
17099fi
17100if test -z "$ac_cv_prog_PKG_CONFIG"; then
17101 ac_ct_PKG_CONFIG=$PKG_CONFIG
17102 # Extract the first word of "pkg-config", so it can be a program name with args.
17103set dummy pkg-config; ac_word=$2
17104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17105$as_echo_n "checking for $ac_word... " >&6; }
17106if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17107 $as_echo_n "(cached) " >&6
17108else
17109 if test -n "$ac_ct_PKG_CONFIG"; then
17110 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17111else
17112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17113for as_dir in $PATH
17114do
17115 IFS=$as_save_IFS
17116 test -z "$as_dir" && as_dir=.
17117 for ac_exec_ext in '' $ac_executable_extensions; do
17118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17119 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17121 break 2
17122 fi
17123done
17124 done
17125IFS=$as_save_IFS
17126
17127fi
17128fi
17129ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17130if test -n "$ac_ct_PKG_CONFIG"; then
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17132$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17133else
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17135$as_echo "no" >&6; }
17136fi
17137
17138 if test "x$ac_ct_PKG_CONFIG" = x; then
17139 PKG_CONFIG=""
17140 else
17141 case $cross_compiling:$ac_tool_warned in
17142yes:)
17143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17145ac_tool_warned=yes ;;
17146esac
17147 PKG_CONFIG=$ac_ct_PKG_CONFIG
17148 fi
17149else
17150 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17151fi
17152
17153 if test x"$PKG_CONFIG" != x""; then
17154 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17155 if test $? = 0; then
17156 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17157 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17158 found=true
17159 fi
17160 fi
17161
17162 # no such luck; use some default ssldirs
17163 if ! $found; then
17164 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17165 fi
17166
17167
17168fi
17169
17170
17171
17172 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17173 # an 'openssl' subdirectory
17174
17175 if ! $found; then
17176 OPENSSL_INCLUDES=
17177 for ssldir in $ssldirs; do
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17179$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17180 if test -f "$ssldir/include/openssl/ssl.h"; then
17181 OPENSSL_INCLUDES="-I$ssldir/include"
17182 OPENSSL_LDFLAGS="-L$ssldir/lib"
17183 OPENSSL_LIBS="-lssl -lcrypto"
17184 found=true
17185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17186$as_echo "yes" >&6; }
17187 break
17188 else
17189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17190$as_echo "no" >&6; }
17191 fi
17192 done
17193
17194 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17195 # it will just work!
17196 fi
17197
17198 # try the preprocessor and linker with our new flags,
17199 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17200
17201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17202$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17203 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17204 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17205
17206 save_LIBS="$LIBS"
17207 save_LDFLAGS="$LDFLAGS"
17208 save_CPPFLAGS="$CPPFLAGS"
17209 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17210 LIBS="$OPENSSL_LIBS $LIBS"
17211 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17213/* end confdefs.h. */
17214#include <openssl/ssl.h>
17215int
17216main ()
17217{
17218SSL_new(NULL)
17219 ;
17220 return 0;
17221}
17222_ACEOF
17223if ac_fn_c_try_link "$LINENO"; then :
17224
17225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17226$as_echo "yes" >&6; }
17227 have_openssl=yes
17228
17229else
17230
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17232$as_echo "no" >&6; }
17233 have_openssl=no
17234
17235fi
17236rm -f core conftest.err conftest.$ac_objext \
17237 conftest$ac_exeext conftest.$ac_ext
17238 CPPFLAGS="$save_CPPFLAGS"
17239 LDFLAGS="$save_LDFLAGS"
17240 LIBS="$save_LIBS"
17241
17242
17243
17244
17245
17246
17247if test "$have_openssl" = yes; then
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17249$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17250
17251 save_LIBS="$LIBS"
17252 save_LDFLAGS="$LDFLAGS"
17253 save_CPPFLAGS="$CPPFLAGS"
17254 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17255 LIBS="$OPENSSL_LIBS $LIBS"
17256 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17257
17258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17259/* end confdefs.h. */
17260
17261 #include <openssl/x509_vfy.h>
17262
17263int
17264main ()
17265{
17266
17267 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17268 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17269 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17270 X509_VERIFY_PARAM_set_hostflags(p, 0);
17271
17272 ;
17273 return 0;
17274}
17275
17276_ACEOF
17277if ac_fn_c_try_link "$LINENO"; then :
17278
17279 ac_cv_has_x509_verify_param_set1_host=yes
17280
17281else
17282
17283 ac_cv_has_x509_verify_param_set1_host=no
17284
17285fi
17286rm -f core conftest.err conftest.$ac_objext \
17287 conftest$ac_exeext conftest.$ac_ext
17288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17289$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17290 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17291
17292$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17293
17294 fi
17295
17296 CPPFLAGS="$save_CPPFLAGS"
17297 LDFLAGS="$save_LDFLAGS"
17298 LIBS="$save_LIBS"
17299fi
17300
Christian Heimes892d66e2018-01-29 14:10:18 +010017301# ssl module default cipher suite string
17302
17303
17304
17305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17306$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17307
17308# Check whether --with-ssl-default-suites was given.
17309if test "${with_ssl_default_suites+set}" = set; then :
17310 withval=$with_ssl_default_suites;
17311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17312$as_echo "$withval" >&6; }
17313case "$withval" in
17314 python)
17315 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17316
17317 ;;
17318 openssl)
17319 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17320
17321 ;;
17322 *)
17323 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17324
17325 cat >>confdefs.h <<_ACEOF
17326#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17327_ACEOF
17328
17329 ;;
17330esac
17331
17332else
17333
17334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17335$as_echo "python" >&6; }
17336$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17337
17338
17339fi
17340
17341
17342
Guido van Rossum627b2d71993-12-24 10:39:16 +000017343# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017344ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017345
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017346ac_config_files="$ac_config_files Modules/ld_so_aix"
17347
Martin v. Löwis11437992002-04-12 09:54:03 +000017348cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017349# This file is a shell script that caches the results of configure
17350# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017351# scripts and configure runs, see configure's option --config-cache.
17352# It is not useful on other systems. If it contains results you don't
17353# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017354#
Martin v. Löwis11437992002-04-12 09:54:03 +000017355# config.status only pays attention to the cache file if you give it
17356# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017357#
Skip Montanaro6dead952003-09-25 14:50:04 +000017358# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017359# loading this file, other *unset* `ac_cv_foo' will be assigned the
17360# following values.
17361
17362_ACEOF
17363
Guido van Rossumf78abae1997-01-21 22:02:36 +000017364# The following way of writing the cache mishandles newlines in values,
17365# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017367# Ultrix sh set writes to stderr and can't be redirected directly,
17368# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369(
17370 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17371 eval ac_val=\$$ac_var
17372 case $ac_val in #(
17373 *${as_nl}*)
17374 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17376$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 esac
17378 case $ac_var in #(
17379 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017380 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17381 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 esac ;;
17383 esac
17384 done
17385
Martin v. Löwis11437992002-04-12 09:54:03 +000017386 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17388 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017389 # `set' does not quote correctly, so add quotes: double-quote
17390 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017391 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017392 "s/'/'\\\\''/g;
17393 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017395 *)
17396 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 esac |
17400 sort
17401) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017406 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17407 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17409 :end' >>confcache
17410if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17411 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017412 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017413 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17414$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017415 if test ! -f "$cache_file" || test -h "$cache_file"; then
17416 cat confcache >"$cache_file"
17417 else
17418 case $cache_file in #(
17419 */* | ?:*)
17420 mv -f confcache "$cache_file"$$ &&
17421 mv -f "$cache_file"$$ "$cache_file" ;; #(
17422 *)
17423 mv -f confcache "$cache_file" ;;
17424 esac
17425 fi
17426 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017427 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017428 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17429$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017430 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017431fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017432rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017434test "x$prefix" = xNONE && prefix=$ac_default_prefix
17435# Let make expand exec_prefix.
17436test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017438DEFS=-DHAVE_CONFIG_H
17439
Skip Montanaro6dead952003-09-25 14:50:04 +000017440ac_libobjs=
17441ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017442U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017443for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17444 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017446 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17448 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017449 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17450 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017451done
17452LIBOBJS=$ac_libobjs
17453
17454LTLIBOBJS=$ac_ltlibobjs
17455
17456
Martin v. Löwis11437992002-04-12 09:54:03 +000017457
Matthias Kloseb9621712010-04-24 17:59:49 +000017458
Victor Stinnere0be4232011-10-25 13:06:09 +020017459: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017460ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017461ac_clean_files_save=$ac_clean_files
17462ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017463{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17464$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17465as_write_fail=0
17466cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017467#! $SHELL
17468# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017469# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017470# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017471# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017472
Martin v. Löwis11437992002-04-12 09:54:03 +000017473debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017474ac_cs_recheck=false
17475ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017476
Matthias Kloseb9621712010-04-24 17:59:49 +000017477SHELL=\${CONFIG_SHELL-$SHELL}
17478export SHELL
17479_ASEOF
17480cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17481## -------------------- ##
17482## M4sh Initialization. ##
17483## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485# Be more Bourne compatible
17486DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017487if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 emulate sh
17489 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017491 # is contrary to our usage. Disable this feature.
17492 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017494else
Matthias Kloseb9621712010-04-24 17:59:49 +000017495 case `(set -o) 2>/dev/null` in #(
17496 *posix*) :
17497 set -o posix ;; #(
17498 *) :
17499 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017501fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017502
17503
Matthias Kloseb9621712010-04-24 17:59:49 +000017504as_nl='
17505'
17506export as_nl
17507# Printing a long string crashes Solaris 7 /usr/bin/printf.
17508as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17509as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17510as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17511# Prefer a ksh shell builtin over an external printf program on Solaris,
17512# but without wasting forks for bash or zsh.
17513if test -z "$BASH_VERSION$ZSH_VERSION" \
17514 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17515 as_echo='print -r --'
17516 as_echo_n='print -rn --'
17517elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17518 as_echo='printf %s\n'
17519 as_echo_n='printf %s'
17520else
17521 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17522 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17523 as_echo_n='/usr/ucb/echo -n'
17524 else
17525 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17526 as_echo_n_body='eval
17527 arg=$1;
17528 case $arg in #(
17529 *"$as_nl"*)
17530 expr "X$arg" : "X\\(.*\\)$as_nl";
17531 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17532 esac;
17533 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17534 '
17535 export as_echo_n_body
17536 as_echo_n='sh -c $as_echo_n_body as_echo'
17537 fi
17538 export as_echo_body
17539 as_echo='sh -c $as_echo_body as_echo'
17540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017541
17542# The user is always right.
17543if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017544 PATH_SEPARATOR=:
17545 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17546 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17547 PATH_SEPARATOR=';'
17548 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551
17552# IFS
17553# We need space, tab and new line, in precisely that order. Quoting is
17554# there to prevent editors from complaining about space-tab.
17555# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17556# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557IFS=" "" $as_nl"
17558
17559# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017560as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017561case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 *[\\/]* ) as_myself=$0 ;;
17563 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017564for as_dir in $PATH
17565do
17566 IFS=$as_save_IFS
17567 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17569 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572 ;;
17573esac
17574# We did not find ourselves, most probably we were run as `sh COMMAND'
17575# in which case we are not to be found in the path.
17576if test "x$as_myself" = x; then
17577 as_myself=$0
17578fi
17579if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17581 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582fi
17583
Matthias Kloseb9621712010-04-24 17:59:49 +000017584# Unset variables that we do not need and which cause bugs (e.g. in
17585# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17586# suppresses any "Segmentation fault" message there. '((' could
17587# trigger a bug in pdksh 5.2.14.
17588for as_var in BASH_ENV ENV MAIL MAILPATH
17589do eval test x\${$as_var+set} = xset \
17590 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591done
17592PS1='$ '
17593PS2='> '
17594PS4='+ '
17595
17596# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017597LC_ALL=C
17598export LC_ALL
17599LANGUAGE=C
17600export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601
Matthias Kloseb9621712010-04-24 17:59:49 +000017602# CDPATH.
17603(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17604
17605
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017606# as_fn_error STATUS ERROR [LINENO LOG_FD]
17607# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017608# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17609# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017610# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017611as_fn_error ()
17612{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017613 as_status=$1; test $as_status -eq 0 && as_status=1
17614 if test "$4"; then
17615 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17616 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017617 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017618 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017619 as_fn_exit $as_status
17620} # as_fn_error
17621
17622
17623# as_fn_set_status STATUS
17624# -----------------------
17625# Set $? to STATUS, without forking.
17626as_fn_set_status ()
17627{
17628 return $1
17629} # as_fn_set_status
17630
17631# as_fn_exit STATUS
17632# -----------------
17633# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17634as_fn_exit ()
17635{
17636 set +e
17637 as_fn_set_status $1
17638 exit $1
17639} # as_fn_exit
17640
17641# as_fn_unset VAR
17642# ---------------
17643# Portably unset VAR.
17644as_fn_unset ()
17645{
17646 { eval $1=; unset $1;}
17647}
17648as_unset=as_fn_unset
17649# as_fn_append VAR VALUE
17650# ----------------------
17651# Append the text in VALUE to the end of the definition contained in VAR. Take
17652# advantage of any shell optimizations that allow amortized linear growth over
17653# repeated appends, instead of the typical quadratic growth present in naive
17654# implementations.
17655if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17656 eval 'as_fn_append ()
17657 {
17658 eval $1+=\$2
17659 }'
17660else
17661 as_fn_append ()
17662 {
17663 eval $1=\$$1\$2
17664 }
17665fi # as_fn_append
17666
17667# as_fn_arith ARG...
17668# ------------------
17669# Perform arithmetic evaluation on the ARGs, and store the result in the
17670# global $as_val. Take advantage of shells that can avoid forks. The arguments
17671# must be portable across $(()) and expr.
17672if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17673 eval 'as_fn_arith ()
17674 {
17675 as_val=$(( $* ))
17676 }'
17677else
17678 as_fn_arith ()
17679 {
17680 as_val=`expr "$@" || test $? -eq 1`
17681 }
17682fi # as_fn_arith
17683
17684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685if expr a : '\(a\)' >/dev/null 2>&1 &&
17686 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17687 as_expr=expr
17688else
17689 as_expr=false
17690fi
17691
17692if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17693 as_basename=basename
17694else
17695 as_basename=false
17696fi
17697
Matthias Kloseb9621712010-04-24 17:59:49 +000017698if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17699 as_dirname=dirname
17700else
17701 as_dirname=false
17702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704as_me=`$as_basename -- "$0" ||
17705$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17706 X"$0" : 'X\(//\)$' \| \
17707 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017708$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 sed '/^.*\/\([^/][^/]*\)\/*$/{
17710 s//\1/
17711 q
17712 }
17713 /^X\/\(\/\/\)$/{
17714 s//\1/
17715 q
17716 }
17717 /^X\/\(\/\).*/{
17718 s//\1/
17719 q
17720 }
17721 s/.*/./; q'`
17722
Matthias Kloseb9621712010-04-24 17:59:49 +000017723# Avoid depending upon Character Ranges.
17724as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17725as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17726as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17727as_cr_digits='0123456789'
17728as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729
17730ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017731case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017733 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017735 xy) ECHO_C='\c';;
17736 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17737 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738 esac;;
17739*)
17740 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017742
Martin v. Löwis11437992002-04-12 09:54:03 +000017743rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744if test -d conf$$.dir; then
17745 rm -f conf$$.dir/conf$$.file
17746else
17747 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017748 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017750if (echo >conf$$.file) 2>/dev/null; then
17751 if ln -s conf$$.file conf$$ 2>/dev/null; then
17752 as_ln_s='ln -s'
17753 # ... but there are two gotchas:
17754 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17755 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017756 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017757 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017758 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017759 elif ln conf$$.file conf$$ 2>/dev/null; then
17760 as_ln_s=ln
17761 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017762 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017764else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017765 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17768rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017769
Matthias Kloseb9621712010-04-24 17:59:49 +000017770
17771# as_fn_mkdir_p
17772# -------------
17773# Create "$as_dir" as a directory, including parents if necessary.
17774as_fn_mkdir_p ()
17775{
17776
17777 case $as_dir in #(
17778 -*) as_dir=./$as_dir;;
17779 esac
17780 test -d "$as_dir" || eval $as_mkdir_p || {
17781 as_dirs=
17782 while :; do
17783 case $as_dir in #(
17784 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17785 *) as_qdir=$as_dir;;
17786 esac
17787 as_dirs="'$as_qdir' $as_dirs"
17788 as_dir=`$as_dirname -- "$as_dir" ||
17789$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17790 X"$as_dir" : 'X\(//\)[^/]' \| \
17791 X"$as_dir" : 'X\(//\)$' \| \
17792 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17793$as_echo X"$as_dir" |
17794 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17795 s//\1/
17796 q
17797 }
17798 /^X\(\/\/\)[^/].*/{
17799 s//\1/
17800 q
17801 }
17802 /^X\(\/\/\)$/{
17803 s//\1/
17804 q
17805 }
17806 /^X\(\/\).*/{
17807 s//\1/
17808 q
17809 }
17810 s/.*/./; q'`
17811 test -d "$as_dir" && break
17812 done
17813 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017814 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017815
17816
17817} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017818if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017819 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017820else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017821 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017822 as_mkdir_p=false
17823fi
17824
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017825
17826# as_fn_executable_p FILE
17827# -----------------------
17828# Test if FILE is an executable regular file.
17829as_fn_executable_p ()
17830{
17831 test -f "$1" && test -x "$1"
17832} # as_fn_executable_p
17833as_test_x='test -x'
17834as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017835
17836# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017837as_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 +000017838
17839# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017840as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017841
17842
Martin v. Löwis11437992002-04-12 09:54:03 +000017843exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017844## ----------------------------------- ##
17845## Main body of $CONFIG_STATUS script. ##
17846## ----------------------------------- ##
17847_ASEOF
17848test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017849
Matthias Kloseb9621712010-04-24 17:59:49 +000017850cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17851# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017852# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853# values after options handling.
17854ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017855This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017856generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017857
17858 CONFIG_FILES = $CONFIG_FILES
17859 CONFIG_HEADERS = $CONFIG_HEADERS
17860 CONFIG_LINKS = $CONFIG_LINKS
17861 CONFIG_COMMANDS = $CONFIG_COMMANDS
17862 $ $0 $@
17863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864on `(hostname || uname -n) 2>/dev/null | sed 1q`
17865"
17866
Martin v. Löwis11437992002-04-12 09:54:03 +000017867_ACEOF
17868
Matthias Kloseb9621712010-04-24 17:59:49 +000017869case $ac_config_files in *"
17870"*) set x $ac_config_files; shift; ac_config_files=$*;;
17871esac
17872
17873case $ac_config_headers in *"
17874"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17875esac
17876
17877
17878cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017879# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017880config_files="$ac_config_files"
17881config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017883_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017884
Matthias Kloseb9621712010-04-24 17:59:49 +000017885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017886ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017887\`$as_me' instantiates files and other configuration actions
17888from templates according to the current configuration. Unless the files
17889and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017890
Matthias Kloseb9621712010-04-24 17:59:49 +000017891Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017892
17893 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017895 --config print configuration, then exit
17896 -q, --quiet, --silent
17897 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 -d, --debug don't remove temporary files
17899 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 --file=FILE[:TEMPLATE]
17901 instantiate the configuration file FILE
17902 --header=FILE[:TEMPLATE]
17903 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017904
17905Configuration files:
17906$config_files
17907
17908Configuration headers:
17909$config_headers
17910
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017911Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17915ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017916ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017917python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017918configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017919 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017920
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017921Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017922This config.status script is free software; the Free Software Foundation
17923gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924
17925ac_pwd='$ac_pwd'
17926srcdir='$srcdir'
17927INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017928MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017929test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017930_ACEOF
17931
Matthias Kloseb9621712010-04-24 17:59:49 +000017932cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17933# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017934ac_need_defaults=:
17935while test $# != 0
17936do
17937 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017938 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017939 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17940 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017941 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017942 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017943 --*=)
17944 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17945 ac_optarg=
17946 ac_shift=:
17947 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017949 ac_option=$1
17950 ac_optarg=$2
17951 ac_shift=shift
17952 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017953 esac
17954
Skip Montanaro6dead952003-09-25 14:50:04 +000017955 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017957 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17958 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017960 $as_echo "$ac_cs_version"; exit ;;
17961 --config | --confi | --conf | --con | --co | --c )
17962 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 debug=: ;;
17965 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017966 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017967 case $ac_optarg in
17968 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017969 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017970 esac
17971 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 ac_need_defaults=false;;
17973 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017974 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017975 case $ac_optarg in
17976 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17977 esac
17978 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980 --he | --h)
17981 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017982 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017983Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017985 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017986 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17987 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17988 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017989
17990 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017991 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017992Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017993
Matthias Kloseb9621712010-04-24 17:59:49 +000017994 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017996
17997 esac
17998 shift
17999done
18000
Skip Montanaro6dead952003-09-25 14:50:04 +000018001ac_configure_extra_args=
18002
18003if $ac_cs_silent; then
18004 exec 6>/dev/null
18005 ac_configure_extra_args="$ac_configure_extra_args --silent"
18006fi
18007
18008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018010if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018011 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018012 shift
18013 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18014 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018016 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018017fi
18018
Martin v. Löwis11437992002-04-12 09:54:03 +000018019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018020cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021exec 5>>config.log
18022{
18023 echo
18024 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18025## Running $as_me. ##
18026_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018027 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018033
Matthias Kloseb9621712010-04-24 17:59:49 +000018034cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035
18036# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018037for ac_config_target in $ac_config_targets
18038do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039 case $ac_config_target in
18040 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18041 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18042 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018043 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18044 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018046 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018047 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018048 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049
Victor Stinnere0be4232011-10-25 13:06:09 +020018050 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018051 esac
18052done
18053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054
Martin v. Löwis11437992002-04-12 09:54:03 +000018055# If the user did not use the arguments to specify the items to instantiate,
18056# then the envvar interface is used. Set only those that are not.
18057# We use the long form for the default assignment because of an extremely
18058# bizarre bug on SunOS 4.1.3.
18059if $ac_need_defaults; then
18060 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18061 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18062fi
18063
Skip Montanaro6dead952003-09-25 14:50:04 +000018064# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018066# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067# Hook for its removal unless debugging.
18068# Note that there is a small window in which the directory will not be cleaned:
18069# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018070$debug ||
18071{
Victor Stinnere0be4232011-10-25 13:06:09 +020018072 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018074 : "${ac_tmp:=$tmp}"
18075 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018077 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018078}
Martin v. Löwis11437992002-04-12 09:54:03 +000018079# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018080
Martin v. Löwis11437992002-04-12 09:54:03 +000018081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018083 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018084} ||
18085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 tmp=./conf$$-$RANDOM
18087 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018088} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018089ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018090
Matthias Kloseb9621712010-04-24 17:59:49 +000018091# Set up the scripts for CONFIG_FILES section.
18092# No need to generate them if there are no CONFIG_FILES.
18093# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018095
Matthias Kloseb9621712010-04-24 17:59:49 +000018096
18097ac_cr=`echo X | tr X '\015'`
18098# On cygwin, bash can eat \r inside `` if the user requested igncr.
18099# But we know of no other shell where ac_cr would be empty at this
18100# point, so we can use a bashism as a fallback.
18101if test "x$ac_cr" = x; then
18102 eval ac_cr=\$\'\\r\'
18103fi
18104ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18105if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018106 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018107else
18108 ac_cs_awk_cr=$ac_cr
18109fi
18110
Victor Stinnere0be4232011-10-25 13:06:09 +020018111echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018112_ACEOF
18113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114
Matthias Kloseb9621712010-04-24 17:59:49 +000018115{
18116 echo "cat >conf$$subs.awk <<_ACEOF" &&
18117 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18118 echo "_ACEOF"
18119} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018120 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18121ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122ac_delim='%!_!# '
18123for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018124 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018125 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126
Matthias Kloseb9621712010-04-24 17:59:49 +000018127 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18128 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129 break
18130 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018131 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132 else
18133 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135done
Matthias Kloseb9621712010-04-24 17:59:49 +000018136rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137
Matthias Kloseb9621712010-04-24 17:59:49 +000018138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018139cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018141sed -n '
18142h
18143s/^/S["/; s/!.*/"]=/
18144p
18145g
18146s/^[^!]*!//
18147:repl
18148t repl
18149s/'"$ac_delim"'$//
18150t delim
18151:nl
18152h
18153s/\(.\{148\}\)..*/\1/
18154t more1
18155s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18156p
18157n
18158b repl
18159:more1
18160s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18161p
18162g
18163s/.\{148\}//
18164t nl
18165:delim
18166h
18167s/\(.\{148\}\)..*/\1/
18168t more2
18169s/["\\]/\\&/g; s/^/"/; s/$/"/
18170p
18171b
18172:more2
18173s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18174p
18175g
18176s/.\{148\}//
18177t delim
18178' <conf$$subs.awk | sed '
18179/^[^""]/{
18180 N
18181 s/\n//
18182}
18183' >>$CONFIG_STATUS || ac_write_fail=1
18184rm -f conf$$subs.awk
18185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18186_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018187cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018188 for (key in S) S_is_set[key] = 1
18189 FS = ""
18190
18191}
18192{
18193 line = $ 0
18194 nfields = split(line, field, "@")
18195 substed = 0
18196 len = length(field[1])
18197 for (i = 2; i < nfields; i++) {
18198 key = field[i]
18199 keylen = length(key)
18200 if (S_is_set[key]) {
18201 value = S[key]
18202 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18203 len += length(value) + length(field[++i])
18204 substed = 1
18205 } else
18206 len += 1 + keylen
18207 }
18208
18209 print line
18210}
18211
18212_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18215if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18216 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18217else
18218 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018219fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018220 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018221_ACEOF
18222
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018223# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18224# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225# trailing colons and then remove the whole line if VPATH becomes empty
18226# (actually we leave an empty line to preserve line numbers).
18227if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018228 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18229h
18230s///
18231s/^/:/
18232s/[ ]*$/:/
18233s/:\$(srcdir):/:/g
18234s/:\${srcdir}:/:/g
18235s/:@srcdir@:/:/g
18236s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018238x
18239s/\(=[ ]*\).*/\1/
18240G
18241s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242s/^[^=]*=[ ]*$//
18243}'
18244fi
18245
Matthias Kloseb9621712010-04-24 17:59:49 +000018246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018247fi # test -n "$CONFIG_FILES"
18248
Matthias Kloseb9621712010-04-24 17:59:49 +000018249# Set up the scripts for CONFIG_HEADERS section.
18250# No need to generate them if there are no CONFIG_HEADERS.
18251# This happens for instance with `./config.status Makefile'.
18252if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018253cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018254BEGIN {
18255_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256
Matthias Kloseb9621712010-04-24 17:59:49 +000018257# Transform confdefs.h into an awk script `defines.awk', embedded as
18258# here-document in config.status, that substitutes the proper values into
18259# config.h.in to produce config.h.
18260
18261# Create a delimiter string that does not exist in confdefs.h, to ease
18262# handling of long lines.
18263ac_delim='%!_!# '
18264for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018265 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18266 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018267 break
18268 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018269 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018270 else
18271 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18272 fi
18273done
18274
18275# For the awk script, D is an array of macro values keyed by name,
18276# likewise P contains macro parameters if any. Preserve backslash
18277# newline sequences.
18278
18279ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18280sed -n '
18281s/.\{148\}/&'"$ac_delim"'/g
18282t rset
18283:rset
18284s/^[ ]*#[ ]*define[ ][ ]*/ /
18285t def
18286d
18287:def
18288s/\\$//
18289t bsnl
18290s/["\\]/\\&/g
18291s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18292D["\1"]=" \3"/p
18293s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18294d
18295:bsnl
18296s/["\\]/\\&/g
18297s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18298D["\1"]=" \3\\\\\\n"\\/p
18299t cont
18300s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18301t cont
18302d
18303:cont
18304n
18305s/.\{148\}/&'"$ac_delim"'/g
18306t clear
18307:clear
18308s/\\$//
18309t bsnlc
18310s/["\\]/\\&/g; s/^/"/; s/$/"/p
18311d
18312:bsnlc
18313s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18314b cont
18315' <confdefs.h | sed '
18316s/'"$ac_delim"'/"\\\
18317"/g' >>$CONFIG_STATUS || ac_write_fail=1
18318
18319cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18320 for (key in D) D_is_set[key] = 1
18321 FS = ""
18322}
18323/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18324 line = \$ 0
18325 split(line, arg, " ")
18326 if (arg[1] == "#") {
18327 defundef = arg[2]
18328 mac1 = arg[3]
18329 } else {
18330 defundef = substr(arg[1], 2)
18331 mac1 = arg[2]
18332 }
18333 split(mac1, mac2, "(") #)
18334 macro = mac2[1]
18335 prefix = substr(line, 1, index(line, defundef) - 1)
18336 if (D_is_set[macro]) {
18337 # Preserve the white space surrounding the "#".
18338 print prefix "define", macro P[macro] D[macro]
18339 next
18340 } else {
18341 # Replace #undef with comments. This is necessary, for example,
18342 # in the case of _POSIX_SOURCE, which is predefined and required
18343 # on some systems where configure will not decide to define it.
18344 if (defundef == "undef") {
18345 print "/*", prefix defundef, macro, "*/"
18346 next
18347 }
18348 }
18349}
18350{ print }
18351_ACAWK
18352_ACEOF
18353cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018354 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018355fi # test -n "$CONFIG_HEADERS"
18356
18357
18358eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18359shift
18360for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018361do
18362 case $ac_tag in
18363 :[FHLC]) ac_mode=$ac_tag; continue;;
18364 esac
18365 case $ac_mode$ac_tag in
18366 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018367 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368 :[FH]-) ac_tag=-:-;;
18369 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18370 esac
18371 ac_save_IFS=$IFS
18372 IFS=:
18373 set x $ac_tag
18374 IFS=$ac_save_IFS
18375 shift
18376 ac_file=$1
18377 shift
18378
18379 case $ac_mode in
18380 :L) ac_source=$1;;
18381 :[FH])
18382 ac_file_inputs=
18383 for ac_f
18384 do
18385 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018386 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387 *) # Look for the file first in the build tree, then in the source tree
18388 # (if the path is not absolute). The absolute path cannot be DOS-style,
18389 # because $ac_f cannot contain `:'.
18390 test -f "$ac_f" ||
18391 case $ac_f in
18392 [\\/$]*) false;;
18393 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18394 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018395 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018397 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18398 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399 done
18400
18401 # Let's still pretend it is `configure' which instantiates (i.e., don't
18402 # use $as_me), people would be surprised to read:
18403 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018404 configure_input='Generated from '`
18405 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18406 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018407 if test x"$ac_file" != x-; then
18408 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018409 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18410$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018412 # Neutralize special characters interpreted by sed in replacement strings.
18413 case $configure_input in #(
18414 *\&* | *\|* | *\\* )
18415 ac_sed_conf_input=`$as_echo "$configure_input" |
18416 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18417 *) ac_sed_conf_input=$configure_input;;
18418 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018419
18420 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018421 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18422 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018423 esac
18424 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018425 esac
18426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018428$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018429 X"$ac_file" : 'X\(//\)[^/]' \| \
18430 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018432$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18434 s//\1/
18435 q
18436 }
18437 /^X\(\/\/\)[^/].*/{
18438 s//\1/
18439 q
18440 }
18441 /^X\(\/\/\)$/{
18442 s//\1/
18443 q
18444 }
18445 /^X\(\/\).*/{
18446 s//\1/
18447 q
18448 }
18449 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018450 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 ac_builddir=.
18452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453case "$ac_dir" in
18454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18455*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459 case $ac_top_builddir_sub in
18460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18462 esac ;;
18463esac
18464ac_abs_top_builddir=$ac_pwd
18465ac_abs_builddir=$ac_pwd$ac_dir_suffix
18466# for backward compatibility:
18467ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018468
18469case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018470 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018471 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472 ac_top_srcdir=$ac_top_builddir_sub
18473 ac_abs_top_srcdir=$ac_pwd ;;
18474 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018475 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 ac_top_srcdir=$srcdir
18477 ac_abs_top_srcdir=$srcdir ;;
18478 *) # Relative name.
18479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18480 ac_top_srcdir=$ac_top_build_prefix$srcdir
18481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018482esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018484
Martin v. Löwis11437992002-04-12 09:54:03 +000018485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486 case $ac_mode in
18487 :F)
18488 #
18489 # CONFIG_FILE
18490 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018491
18492 case $INSTALL in
18493 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018496 ac_MKDIR_P=$MKDIR_P
18497 case $MKDIR_P in
18498 [\\/$]* | ?:[\\/]* ) ;;
18499 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18500 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018501_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502
Matthias Kloseb9621712010-04-24 17:59:49 +000018503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504# If the template does not know about datarootdir, expand it.
18505# FIXME: This hack should be removed a few years after 2.60.
18506ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018507ac_sed_dataroot='
18508/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509 p
18510 q
18511}
18512/@datadir@/p
18513/@docdir@/p
18514/@infodir@/p
18515/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018516/@mandir@/p'
18517case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518*datarootdir*) ac_datarootdir_seen=yes;;
18519*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18521$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524 ac_datarootdir_hack='
18525 s&@datadir@&$datadir&g
18526 s&@docdir@&$docdir&g
18527 s&@infodir@&$infodir&g
18528 s&@localedir@&$localedir&g
18529 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018530 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531esac
18532_ACEOF
18533
18534# Neutralize VPATH when `$srcdir' = `.'.
18535# Shell code in configure.ac might set extrasub.
18536# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18538ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018539$extrasub
18540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018542:t
18543/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018544s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018546s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547s&@srcdir@&$ac_srcdir&;t t
18548s&@abs_srcdir@&$ac_abs_srcdir&;t t
18549s&@top_srcdir@&$ac_top_srcdir&;t t
18550s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18551s&@builddir@&$ac_builddir&;t t
18552s&@abs_builddir@&$ac_abs_builddir&;t t
18553s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18554s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018555s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018557"
Victor Stinnere0be4232011-10-25 13:06:09 +020018558eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18559 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018561test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018562 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18563 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18564 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018566which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018567$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018568which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018569
Victor Stinnere0be4232011-10-25 13:06:09 +020018570 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018572 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18573 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018574 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018575 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576 ;;
18577 :H)
18578 #
18579 # CONFIG_HEADER
18580 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018582 {
18583 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018584 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18585 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018586 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018587 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018588 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18589$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018590 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018591 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018592 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018593 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018594 fi
18595 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018596 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018597 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018598 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018599 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602
18603 esac
18604
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018605
18606 case $ac_file$ac_mode in
18607 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18608
18609 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018610done # for ac_tag
18611
Guido van Rossum627b2d71993-12-24 10:39:16 +000018612
Matthias Kloseb9621712010-04-24 17:59:49 +000018613as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018614_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018615ac_clean_files=$ac_clean_files_save
18616
Matthias Kloseb9621712010-04-24 17:59:49 +000018617test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018618 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018619
Martin v. Löwis11437992002-04-12 09:54:03 +000018620
18621# configure is writing to config.log, and then calls config.status.
18622# config.status does its own redirection, appending to config.log.
18623# Unfortunately, on DOS this fails, as config.log is still kept open
18624# by configure, so config.status won't be able to write to it; its
18625# output is simply discarded. So we exec the FD to /dev/null,
18626# effectively closing config.log, so it can be properly (re)opened and
18627# appended to by config.status. When coming back to configure, we
18628# need to make the FD available again.
18629if test "$no_create" != yes; then
18630 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018631 ac_config_status_args=
18632 test "$silent" = yes &&
18633 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018635 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 exec 5>>config.log
18637 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18638 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018639 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018640fi
18641if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18643$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018644fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018645
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018646
Christian Heimes75ed8902013-11-20 01:11:18 +010018647echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018648if test ! -f Modules/Setup.local
18649then
18650 echo "# Edit this file for local setup changes" >Modules/Setup.local
18651fi
18652
Christian Heimes75ed8902013-11-20 01:11:18 +010018653echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018654$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018655 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018656 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018657mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018658
18659if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18660 echo "" >&6
18661 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018662 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 +000018663 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018664 echo "" >&6
18665 echo "" >&6
18666fi
18667